Vinum gvinum ja geom

Allikas: Kuutõrvaja
Redaktsioon seisuga 29. detsember 2007, kell 01:09 kasutajalt Jj (arutelu | kaastöö)

Geli

dd if=/dev/random of=/root/da0.key bs=64 count=1 1+0 records in 1+0 records out 64 bytes transferred in 0.000397 secs (161126 bytes/sec)


geli init -s 4096 -K /root/da0.key /dev/da0 Enter new passphrase: Reenter new passphrase:


geli attach -k /root/da0.key /dev/da0 Enter passphrase:

ls /dev/da0* /dev/da0 /dev/da0.eli

dd if=/dev/random of=/dev/da0.eli bs=1m 40859860992 bytes transferred in 10024.286856 secs (4076087 bytes/sec)

newfs /dev/da0.eli /dev/da0.eli: 69464.8MB (142263992 sectors) block size 16384, fragment size 4096

       using 207 cylinder groups of 336.98MB, 21567 blks, 21568 inodes.

super-block backups (for fsck -b #) at:


mount /dev/da0.eli /mnt

df

Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad2s1a 507630 130382 336638 28% / devfs 1 1 0 100% /dev /dev/ad2s1e 507630 12 467008 0% /tmp /dev/ad2s1f 35492564 131230 32521930 0% /usr /dev/ad2s1d 1120718 420 1030642 0% /var /dev/da0.eli 70009144 8 64408408 0% /mnt



vinum

http://www.vinumvm.org/


Starting up Vinum Early Enough for the Root Filesystem /boot/loader.conf

vinum_load="YES"

/boot/loader.conf grub start

geom_vinum_load="YES" vinum.autostart="YES"


fdisk -i teha disklabel -w disklabel -e devname


stripe

  drive c device /dev/da5h
   drive d device /dev/da6h
   volume stripe
   plex org striped 512k
     sd length 128m drive c
     sd length 128m drive d


mirroring

drive d1 device /dev/ad2s1a drive d2 device /dev/ad3s1a volume mirror setupstate

 plex org concat
   sd length 76000M drive d1
 plex org concat
   sd length 76000M drive d2


gvinum create -f /etc/vinum.conf

hiljem newfs -v


gstripe

kldload geom_mirror

/boot/loader.conf
geom_stripe_load="YES" 
    gstripe label -v -s 4096 data /dev/ad2 /dev/ad4
    newfs /dev/stripe/data
    mount /dev/stripe/data /mnt/tank2
    df -h
    /dev/stripe/data    289G    4.0K    266G     0%    /mnt/tank2
   cat /var/run/dmesg.boot | grep "ad"
   gstripe list
   umount /dev/stripe/data
   tunefs -m 2 -o space /dev/stripe/data
tunefs: minimum percentage of free space changes from 8% to 2%
tunefs: should optimize for space with minfree < 8%
tunefs: optimization preference changes from time to space
   mount /dev/stripe/data /mnt/tank2
   /dev/stripe/data    289G    4.0K    283G     0%    /mnt/tank2

-m 2 ütleb, et minfree peaks 2% olema ja -o space optimiseerib space'le, mitte access time'le aga kiiremat kaablit vaja, udma33 sucks ASS

fsck_ffs /dev/stripe/data


gmirror

katse# gmirror label -vnb round-robin gm0 /dev/da1
Metadata value stored on /dev/da1.
Done.
katse# gmirror load
katse# gmirror insert gm0 /dev/da2


newfs /dev/mirror/gm0
mount /dev/mirror/gm0s1d /mnt


raid 10

kettaid neil ad1 ad2 ad3 ad4

gmirror label -vnb round-robin gm0 /dev/da1
gmirror load
gmirror insert gm0 /dev/da2
gmirror label -vnb round-robin gm1 /dev/da3
gmirror insert gm1 /dev/da4
gstripe label -v -s 4096 data /dev/mirror/gm0 /dev/mirror/gm1
newfs /dev/stripe/data
mount /dev/stripe/data /mnt