Situazione
12 dischi ognuno da 500GB come di seguito divisi:
10 dischi (2 catene RAID5)
2 spare (1 per catena)
lvm2
/home 200GB
/data 900GB
/scratch_gl 900GB
6 volumi fisici, 3 x catena dimensionati come sopra
1 unico volume gruppo
3 volumi logici in modo da unire 2 volumi fisici di 2 catene diverse
es.: /home 400GB (200 di una catena e 200 dell'altra)
Nomi
c1d0 prima catena RAID5
c1d1 seconda catena RAID5
Comandi
cd /root
sfdisk -d /dev/cciss/c1d0 > c1d0.out
cat c1d0.out | sfdisk /dev/cciss/c1d1 (clonato la prima catena sulla seconda)
pvcreate /dev/cciss/c1d0p1 /dev/cciss/c1d0p2 /dev/cciss/c1d0p3 /dev/cciss/ c1d1p1 /dev/cciss/c1d1p2 /dev/cciss/c1d1p3
vgcreate vg_storage /dev/cciss/c1d0p1 /dev/cciss/c1d0p2 /dev/cciss/c1d0p3 /dev/cciss/ c1d1p1 /dev/cciss/c1d1p2 /dev/cciss/c1d1p3
lvcreate -n lv_home vg_storage -l xxxxx /dev/cciss/c1d0p1 /dev/cciss/c1d1p1
…
mkfs.ext3 /dev/vg_storage/lv_home
mkfs.ext3 /dev/vg_storage/lv_data
mkfs.ext3 /dev/vg_storage/lv_scratch_gl
(eventualmente fsck /dev/vg_storage/lv_home)
/etc/fstab con le nuove partizione lvm:
/dev/vg_storage/lv_home /export/home ext3 defaults,usrquota 0 0
/dev/vg_storage/lv_data /data ext3 defaults,usrquota 0 0
/dev/vg_storage/lv_scratch_gl /scratch_gl ext3 defaults,usrquota 0 0
mount /export/home
mount /data
mount /scratch_gl
/etc/init.d/autofs start