新进化论

道生一,一生二,二生三,三生万物。

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::
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配置文件
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 -v option 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 obliterated

Don't use resetconfig unless you want to lose everything. Instead, use rm.
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 /mnt

9。# grep vinum /etc/defaults/rc.conf start_vinum="" # set to YES to start vinum

Then 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



posted on 2004-09-16 11:22  岌岌可危  阅读(533)  评论(0)    收藏  举报