1。了解清楚磁盘大小
2。disklabel -e da1
3。修改分区为vinum分区
# size offset fstype [fsize bsize bps/cpg]
c: 2051000 0 unused 0 0 # (Cyl. 0 - 342*)
e: 2051000 0 vinum # (Cyl. 0 - 342*)
4。编辑vinum.conf配置文件
2。disklabel -e da1
3。修改分区为vinum分区
# size offset fstype [fsize bsize bps/cpg]
c: 2051000 0 unused 0 0 # (Cyl. 0 - 342*)
e: 2051000 0 vinum # (Cyl. 0 - 342*)
4。编辑vinum.conf配置文件
drive d1 device /dev/da1e drive d2 device /dev/da2e volume test plex org striped 256k <==== do not use a power of 2 like I did sd length 1001m drive d1 sd length 1001m drive d2
5。# vinum create -f /etc/vinum.conf Configuration summary Drives: 2 (4 configured) Volumes: 1 (4 configured) Plexes: 1 (8 configured) Subdisks: 2 (16 configured) D d1 State: up Device /dev/da1e Avail: 0/1001 MB (0%) D d2 State: up Device /dev/da2e Avail: 4/1005 MB (0%) V test State: up Plexes: 1 Size: 2002 MB P test.p0 S State: up Subdisks: 2 Size: 2002 MB S test.p0.s0 State: up PO: 0 B Size: 1001 MB S test.p0.s1 State: up PO: 256 kB Size: 1001 MB
6。建立文件系统# newfs -v /dev/vinum/test newfs: /dev/vinum/test: not a character-special device /dev/vinum/test: 4100096 sectors in 1001 cylinders of 1 tracks, 4096 sectors 2002.0MB in 63 cyl groups (16 c/g, 32.00MB/g, 7936 i/g) super-block backups (for fsck -b #) at: 32, 65568, 131104, 196640, 262176, 327712, 393248, 458784, 524320, 589856, 655392, 720928, 786464, 852000, 917536, 983072, etc...The
-voption is very interesting:-v Specify that the disk does not contain any partitions, and that newfs should build a file system on the whole disk. This option is useful for synthetic disks such as vinum.
7。# vinum resetconfig WARNING! This command will completely wipe out your vinum configuration. All data will be lost. If you really want to do this, enter the text NO FUTURE Enter text -> NO FUTURE Vinum configuration obliteratedDon't use
resetconfigunless you want to lose everything. Instead, userm.
Please note that resetting the configuration does not delete your data but
you must do another create with your original configuration.
8。# mount /dev/vinum/test /mnt9。
# grep vinum /etc/defaults/rc.conf start_vinum="" # set to YES to start vinumThen I added the following to /etc/rc.conf.
start_vinum="YES" # set to YES to start vinum vinum_drives="/dev/da1e /dev/da2e" # put in names of disks containing vinum drives # to start vinum on only specific disks.Here's what I found in dmesg:
# dmesg | grep vinum vinum: loaded vinum: reading configuration from /dev/da2e vinum: updating configuration from /dev/da1e

浙公网安备 33010602011771号