|
|
1. rida: |
1. rida: |
− | '''vinum'''
| + | ===vinum=== |
| | | |
| + | Starting up Vinum Early Enough for the Root Filesystem '''/boot/loader.conf''' |
| | | |
| + | vinum_load="YES" |
| | | |
− | Starting up Vinum Early Enough for the Root Filesystem
| |
− | /boot/loader.conf vinum_load="YES"
| |
| | | |
| fdisk -i teha | | fdisk -i teha |
38. rida: |
38. rida: |
| | | |
| gvinum create -f /etc/vinum.conf | | gvinum create -f /etc/vinum.conf |
− |
| |
| | | |
| hiljem newfs -v | | hiljem newfs -v |
− |
| |
− |
| |
− |
| |
− |
| |
− | ////////////////////////////////////////////////
| |
− |
| |
− | kõige alguses fdisk -i ketas
| |
− |
| |
− | 105 13:53 fdisk /dev/da1
| |
− | 106 13:54 fdisk /dev/da2
| |
− | 107 13:54 fdisk /dev/da3
| |
− | 108 13:54 fdisk /dev/da4
| |
− | 109 13:54 fdisk /dev/da5
| |
− | 110 13:54 disklabel /dev/da1s1
| |
− | 111 13:54 disklabel /dev/da2s1
| |
− | 112 13:54 disklabel /dev/da3s1
| |
− | 113 13:54 disklabel /dev/da4s1
| |
− | 114 13:54 disklabel -w /dev/da1s1
| |
− | 115 13:54 disklabel /dev/da1s1
| |
− | 116 13:55 disklabel -w /dev/da2s1
| |
− | 117 13:55 disklabel -w /dev/da3s1
| |
− | 118 13:55 disklabel -w /dev/da4s1
| |
− | 119 13:55 disklabel -e /dev/da1s1
| |
− | 120 13:55 disklabel /dev/da1s1
| |
− | 121 13:55 disklabel /dev/da2s1
| |
− | 122 13:55 disklabel /dev/da3s1
| |
− | 123 13:56 disklabel /dev/da4s1
| |
− |
| |
− |
| |
− | # /dev/da1s1:
| |
− | 8 partitions:
| |
− | # size offset fstype [fsize bsize bps/cpg]
| |
− | a: 35840936 16 unused 0 0
| |
− | c: 35840952 0 unused 0 0 # "raw" part, don't edit
| |
− |
| |
− |
| |
− |
| |
− | muuda a ümber b'ks, size kõige väiksema ketta järgi ja fstype vinum
| |
− |
| |
− | kui midagi läheb sassi
| |
− |
| |
− | dd if=/dev/zero of=/dev/da1 bs=1024 count=2048
| |
− |
| |
− | lihtsalt kirjutada kaks mega ketta algusesse nulle
| |
− |
| |
− |
| |
− |
| |
− | mate
| |
− |
| |
− | gvinum l -rv root
| |
− |
| |
− | Volume root: Size: 268435456 bytes (256 MB)
| |
− | State: up
| |
− | Plex root.p3: Size: 268435456 bytes (256 MB)
| |
− |
| |
− | volume root
| |
− | 268435456 / 512 + 16=281
| |
− |
| |
− | plex root
| |
− | 268435456 /512 = 524288
| |
− |
| |
− |
| |
− |
| |
− | # size offset fstype [fsize bsize bps/cpg]
| |
− | a: 524288 281 4.2BSD 2048 16384 0
| |
− | b: 35840936 16 vinum
| |
− | c: 35840952 0 unused 0 0 # "raw" part, don't edit
| |
− |
| |
− | testida saab fsck -n /dev/da1s1a
| |
− |
| |
− |
| |
− | konfiguratsioon
| |
− |
| |
− | drive a device /dev/da1s1b
| |
− | drive b device /dev/da2s1b
| |
− | drive c device /dev/da3s1b
| |
− | drive d device /dev/da4s1b
| |
− |
| |
− | volume root
| |
− | plex org concat
| |
− | sd length 256m drive a
| |
− | plex org concat
| |
− | sd length 256m drive b
| |
− | plex org concat
| |
− | sd length 256m drive c
| |
− | plex org concat
| |
− | sd length 256m drive d
| |
− |
| |
− | volume swap
| |
− | plex org striped 272k
| |
− | sd length 512m drive a
| |
− | sd length 512m drive b
| |
− | plex org striped 272k
| |
− | sd length 512m drive c
| |
− | sd length 512m drive d
| |
− |
| |
− | volume usr
| |
− | plex org striped 272k
| |
− | sd length 1024m drive a
| |
− | sd length 1024m drive b
| |
− | plex org striped 272k
| |
− | sd length 1024m drive c
| |
− | sd length 1024m drive d
| |
− |
| |
− | volume var
| |
− | plex org striped 272k
| |
− | sd length 512m drive a
| |
− | sd length 512m drive b
| |
− | plex org striped 272k
| |
− | sd length 512m drive c
| |
− | sd length 512m drive d
| |
− |
| |
− | volume home
| |
− | plex org striped 272k
| |
− | sd drive a
| |
− | sd drive b
| |
− | plex org striped 272k
| |
− | sd drive c
| |
− | sd drive d
| |
− |
| |
− |
| |
− |
| |
− | newfs ketastele
| |
− | veel süsteem ketastele
| |
− |
| |
− | gvinum root mountida
| |
− | dumbime juursüsteemi
| |
− | cd /mnt
| |
− | dump -0 -C 8 -f - -L / | restore -r -f -
| |
− |
| |
− |
| |
− | mount /dev/gvinum/usr /mnt/usr
| |
− | mount /dev/gvinum/var/mnt/var
| |
− |
| |
− | cd usr/
| |
− | dump -0 -C 8 -f - -L /usr | restore -r -f -
| |
− |
| |
− | järgmisena /var
| |
− |
| |
− | paigaldada grub
| |
− |
| |
− | //laseb kirjutada tööajal bootsektorit
| |
− | sysctl kern.geom.debugflags=16
| |
− |
| |
| | | |
| /boot/loader.conf grub start | | /boot/loader.conf grub start |
190. rida: |
45. rida: |
| geom_vinum_load="YES" | | geom_vinum_load="YES" |
| vinum.autostart="YES" | | vinum.autostart="YES" |
− |
| |
− |
| |
− | muudame fstab'i
| |
− |
| |
− | # Device Mountpoint FStype Options Dump Pass#
| |
− | /dev/gvinum/swap none swap sw 0 0
| |
− | /dev/gvinum/root / ufs rw 1 1
| |
− | /dev/gvinum/usr /usr ufs rw 2 2
| |
− | /dev/gvinum/var /var ufs rw 2 2
| |
− | /dev/gvinum/home /home ufs rw 2 2
| |
− | /dev/acd0 /cdrom cd9660 ro,noauto 0 0
| |
− | proc /proc procfs rw 0 0
| |
− |
| |
− |
| |
− |
| |
− | //lülitab softupdate sisse ...metainfo kirjutamise kohta
| |
− | tunefs -n /enable /dev/gvinum/usr
| |
− | tunefs -n /enable /dev/gvinum/var
| |
− |
| |
− | grubikonf teha
| |
− | muuda bootivaks kõik kettad ehk siis
| |
− |
| |
− | root (hd4,0,a)
| |
− | setup(hd4)
| |
− |
| |
− | peale bootimist tuleb grub üles
| |
− |
| |
− | root (hd0,0,a)
| |
− | kernel /boot/loader
| |
− | sym
| |
− | /boot/grub/menu.lst
| |
− |
| |
− | timeout 20
| |
− | default 0
| |
− | fallback 2
| |
− |
| |
− | title FreeBSD 1. kettalt
| |
− | root (hd0,0,a)
| |
− | kernel /boot/loader
| |
− |
| |
− | title FreeBSD 2. kettalt
| |
− | root (hd1,0,a)
| |
− | kernel /boot/loader
| |
− |
| |
− |
| |
− | title FreeBSD 3. kettalt
| |
− | root (hd2,0,a)
| |
− | kernel /boot/loader
| |
− |
| |
− |
| |
− | title FreeBSD 4. kettalt
| |
− | root (hd3,0,a)
| |
− | kernel /boot/loader
| |
− |
| |
| | | |
| | | |
vinum
Starting up Vinum Early Enough for the Root Filesystem /boot/loader.conf
vinum_load="YES"
fdisk -i teha
disklabel -w
disklabel -e devname
a: 1024000 281 4.2BSD 2048 16384 0
b: 16 vinum
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
/boot/loader.conf grub start
geom_vinum_load="YES"
vinum.autostart="YES"
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
mirror
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