(no commit message)
[ikiwiki.git] / docs / handbook / handbook-vinum-config.mdwn
1 \r
2 \r
3 ## 13.8 Configuring Vinum \r
4 \r
5 The `GENERIC` kernel does not contain Vinum. It is possible to build a special kernel which includes Vinum, but this is not recommended. The standard way to start Vinum is as a kernel module (kld). You do not even need to use [kldload(8)](http://leaf.dragonflybsd.org/cgi/web-man?command#kldload&section8) for Vinum: when you start [vinum(8)](http://leaf.dragonflybsd.org/cgi/web-man?command=vinum&section=8), it checks whether the module has been loaded, and if it is not, it loads it automatically.\r
6 \r
7 ### 13.8.1 Startup \r
8 \r
9 Vinum stores configuration information on the disk slices in essentially the same form as in the configuration files. When reading from the configuration database, Vinum recognizes a number of keywords which are not allowed in the configuration files. For example, a disk configuration might contain the following text:\r
10 \r
11     \r
12     volume myvol state up\r
13     volume bigraid state down\r
14     plex name myvol.p0 state up org concat vol myvol\r
15     plex name myvol.p1 state up org concat vol myvol\r
16     plex name myvol.p2 state init org striped 512b vol myvol\r
17     plex name bigraid.p0 state initializing org raid5 512b vol bigraid\r
18     sd name myvol.p0.s0 drive a plex myvol.p0 state up len 1048576b driveoffset 265b plexoffset 0b\r
19     sd name myvol.p0.s1 drive b plex myvol.p0 state up len 1048576b driveoffset 265b plexoffset 1048576b\r
20     sd name myvol.p1.s0 drive c plex myvol.p1 state up len 1048576b driveoffset 265b plexoffset 0b\r
21     sd name myvol.p1.s1 drive d plex myvol.p1 state up len 1048576b driveoffset 265b plexoffset 1048576b\r
22     sd name myvol.p2.s0 drive a plex myvol.p2 state init len 524288b driveoffset 1048841b plexoffset 0b\r
23     sd name myvol.p2.s1 drive b plex myvol.p2 state init len 524288b driveoffset 1048841b plexoffset 524288b\r
24     sd name myvol.p2.s2 drive c plex myvol.p2 state init len 524288b driveoffset 1048841b plexoffset 1048576b\r
25     sd name myvol.p2.s3 drive d plex myvol.p2 state init len 524288b driveoffset 1048841b plexoffset 1572864b\r
26     sd name bigraid.p0.s0 drive a plex bigraid.p0 state initializing len 4194304b driveoff set 1573129b plexoffset 0b\r
27     sd name bigraid.p0.s1 drive b plex bigraid.p0 state initializing len 4194304b driveoff set 1573129b plexoffset 4194304b\r
28     sd name bigraid.p0.s2 drive c plex bigraid.p0 state initializing len 4194304b driveoff set 1573129b plexoffset 8388608b\r
29     sd name bigraid.p0.s3 drive d plex bigraid.p0 state initializing len 4194304b driveoff set 1573129b plexoffset 12582912b\r
30     sd name bigraid.p0.s4 drive e plex bigraid.p0 state initializing len 4194304b driveoff set 1573129b plexoffset 16777216b\r
31 \r
32 \r
33 The obvious differences here are the presence of explicit location information and naming (both of which are also allowed, but discouraged, for use by the user) and the information on the states (which are not available to the user). Vinum does not store information about drives in the configuration information: it finds the drives by scanning the configured disk drives for partitions with a Vinum label. This enables Vinum to identify drives correctly even if they have been assigned different UNIX® drive IDs.\r
34 \r
35 #### 13.8.1.1 Automatic Startup \r
36 \r
37 In order to start Vinum automatically when you boot the system, ensure that you have the following line in your `/etc/rc.conf`:\r
38 \r
39     \r
40     start_vinum="YES"           # set to YES to start vinum\r
41 \r
42 \r
43 If you do not have a file `/etc/rc.conf`, create one with this content. This will cause the system to load the Vinum kld at startup, and to start any objects mentioned in the configuration. This is done before mounting file systems, so it is possible to automatically [fsck(8)](http://leaf.dragonflybsd.org/cgi/web-man?command#fsck&section8) and mount file systems on Vinum volumes.\r
44 \r
45 When you start Vinum with the `vinum start` command, Vinum reads the configuration database from one of the Vinum drives. Under normal circumstances, each drive contains an identical copy of the configuration database, so it does not matter which drive is read. After a crash, however, Vinum must determine which drive was updated most recently and read the configuration from this drive. It then updates the configuration if necessary from progressively older drives.\r
46 \r
47 \r
48 \r
49 CategoryHandbook\r
50 CategoryHandbook-vinum\r