Podręcznik FreeBSD
Poprzedni | Rozdział 19. The Vinum Volume Manager | Następny

# 19.7. Object Naming

As described above, Vinum assigns default names to plexes and subdisks, although they may be overridden. Overriding the default names is not recommended: experience with the VERITAS volume manager, which allows arbitrary naming of objects, has shown that this flexibility does not bring a significant advantage, and it can cause confusion.

Names may contain any non-blank character, but it is recommended to restrict them to letters, digits and the underscore characters. The names of volumes, plexes and subdisks may be up to 64 characters long, and the names of drives may be up to 32 characters long.

Vinum objects are assigned device nodes in the hierarchy `/dev/gvinum`. The configuration shown above would cause Vinum to create the following device nodes:

- > Notatka: This only applies to the historic Vinum implemenation.

  The control devices `/dev/vinum/control` and `/dev/vinum/controld`, which are used by gvinum(8) and the Vinum daemon respectively.

- Device entries for each volume. These are the main devices used by Vinum. Thus the configuration above would include the devices `/dev/gvinum/myvol`, `/dev/gvinum/mirror`, `/dev/gvinum/striped`, `/dev/gvinum/raid5` and `/dev/gvinum/raid10`.

- > Notatka: This only applies to the historic Vinum implemenation.

  A directory `/dev/vinum/drive` with entries for each drive. These entries are in fact symbolic links to the corresponding disk nodes.

- All volumes get direct entries under `/dev/gvinum/`.

- The directories `/dev/gvinum/plex`, and `/dev/gvinum/sd`, which contain device nodes for each plex and for each subdisk, respectively.

For example, consider the following configuration file:

           drive drive1 device /dev/sd1h
            drive drive2 device /dev/sd2h
            drive drive3 device /dev/sd3h
            drive drive4 device /dev/sd4h
        volume s64 setupstate
          plex org striped 64k
            sd length 100m drive drive1
            sd length 100m drive drive2
            sd length 100m drive drive3
            sd length 100m drive drive4

After processing this file, gvinum(8) creates the following structure in `/dev/gvinum`:

           drwxr-xr-x  2 root  wheel       512 Apr 13 16:46 plex
            crwxr-xr--  1 root  wheel   91,   2 Apr 13 16:46 s64
            drwxr-xr-x  2 root  wheel       512 Apr 13 16:46 sd

        /dev/vinum/plex:
        total 0
        crwxr-xr--  1 root  wheel   25, 0x10000002 Apr 13 16:46 s64.p0

        /dev/vinum/sd:
        total 0
        crwxr-xr--  1 root  wheel   91, 0x20000002 Apr 13 16:46 s64.p0.s0
        crwxr-xr--  1 root  wheel   91, 0x20100002 Apr 13 16:46 s64.p0.s1
        crwxr-xr--  1 root  wheel   91, 0x20200002 Apr 13 16:46 s64.p0.s2
        crwxr-xr--  1 root  wheel   91, 0x20300002 Apr 13 16:46 s64.p0.s3

Although it is recommended that plexes and subdisks should not be allocated specific names, Vinum drives must be named. This makes it possible to move a drive to a different location and still recognize it automatically. Drive names may be up to 32 characters long.

## 19.7.1. Creating File Systems

Volumes appear to the system to be identical to disks, with one exception. Unlike UNIXŽ drives, Vinum does not partition volumes, which thus do not contain a partition table. This has required modification to some disk utilities, notably newfs(8), which previously tried to interpret the last letter of a Vinum volume name as a partition identifier. For example, a disk drive may have a name like `/dev/ad0a` or `/dev/da2h`. These names represent the first partition (`a`) on the first (0) IDE disk (`ad`) and the eighth partition (`h`) on the third (2) SCSI disk (`da`) respectively. By contrast, a Vinum volume might be called `/dev/gvinum/concat`, a name which has no relationship with a partition name.

Normally, newfs(8) interprets the name of the disk and complains if it cannot understand it. For example:

    # newfs /dev/gvinum/concat
    newfs: /dev/gvinum/concat: can't figure out file system partition

In order to create a file system on this volume, use newfs(8):

    # newfs /dev/gvinum/concat

> Notatka: On FreeBSD versions prior to 5.0 newfs(8) requires an additional -v flag and the old device naming scheme:

    # newfs -v /dev/vinum/concat

Poprzedni | Spis treści | Następny
Some Examples | Początek rozdziału | Configuring Vinum

Ten i inne dokumenty można pobrać z ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

W przypadku pytań o FreeBSD prosimy przeczytać dostępną dokumentację przed kontaktem z <questions@FreeBSD.org>.
W sprawie zapytań o tę dokumentację prosimy o kontakt z <doc@FreeBSD.org>.