Tuesday, May 25, 2010
Configuring RAID5 with hot spare using SVM
1.I`m creating RAID5 volume using metainit command.In this -r represent RAID5 volume
bash-2.03# metainit d50 -r c4t0d0s0 c4t1d0s0 c4t2d0s0 c4t8d0s0 c4t9d0s0 c4t10d0s0 c4t11d0s0
d50: RAID is setup
2.type metastat command to verify the RAID 5 status
bash-2.03# metastat d50
d50: RAID
State: Initializing
Initialization in progress: 0% done
Interlace: 32 blocks
Size: 210141064 blocks
Original device:
Size: 210143616 blocks
Device Start Block Dbase State Hot Spare
c4t0d0s0 330 No Initializing
c4t1d0s0 330 No Initializing
c4t2d0s0 330 No Initializing
c4t8d0s0 330 No Initializing
c4t9d0s0 330 No Initializing
c4t10d0s0 330 No Initializing
c4t11d0s0 330 No Initializing
3.After I created the RAID 5 volume I`m creating one Hot spare spool(hsp001) and assign one HDD to this pool(c4t12d0s0)
bash-2.03# metainit hsp001 c4t12d0s0
hsp001: Hotspare pool is setup
4.finally I`m assigning this hot spare spool to RAID5 volume d50
bash-2.03#metaparam -h hsp001 d50
5.verify whether the hot spare disk is assigned to RAID5 volume using metastat command
bash-2.03# metastat d50
d50: RAID
State: Initializing
Initialization in progress: 84% done
Hot spare pool: hsp001
Interlace: 32 blocks
Size: 210141064 blocks
Original device:
Size: 210143616 blocks
Device Start Block Dbase State Hot Spare
c4t0d0s0 330 No Initializing
c4t1d0s0 330 No Initializing
c4t2d0s0 330 No Initializing
c4t8d0s0 330 No Initializing
c4t9d0s0 330 No Initializing
c4t10d0s0 330 No Initializing
c4t11d0s0 330 No Initializing
Thursday, January 1, 2009
Un-Mirrored root Volume
#metastat d0
this command will update /etc/vfstab and /etc/system file for root disk
#metaroot /dev/dsk/c0t0d0s0
#reboot
....
#metaclear -r d0
#metaclear d20
Creating Mirror for mounted usr volume
#metainit d22 1 1 c0t1d0s3
#metainit d2 -m d12
#reboot
after reboot you have to run following command
#metattach d2 d22
After created mirror disk for usr volume you need to edit the /etc/vfstab file entry
#vi /etc/vfstab
/dev/md/dsk/d2 /dev/md/rdsk/d2 /usr ufs 1 yes -
:wq!
Creating Mirror for mounted root volume
#metainit d2 1 1 c0t1d0s0
#metainit d0 -m d1
#metaroot d0 (this will update /etc/vfstab & /etc/system file)
#metaroot d0
#lockfs -fa
#reboot
after reboot you have to run following command
#metattach d0 d2
After created mirror disk for root volume you need to configure alternate boot path for this server.in case the first disk crashed the system will boot from second disk automatically.to find the physical path
#ls -l /dev/rdsk/c0t1d0s0
devices/sbus@1,f8000000/esp@1,200000/sd@3,0:a
goto OK prompt
create alias for second disk
ok: nvalias backup-root /sbus@1,f8000000/esp@1,200000/sd@3,0:a
ok:printenv boot-root
ok:setenv boot-device disk backup-root net
ok>nvstore
for manual boot
ok:boot backup_root
Tuesday, December 16, 2008
Configuring MIRROR volume using SVM
last month I configured mirror volume using Solaris volume manger.Find the steps how I did this mirror volume.
1. Copying VTOC of Disk1(c1t9d0s0) to Disk2(c1t10d0s0).Because the disk layout should be same between two hard disk while we mirrored.So I used fmthard command to copy VTOC to other Hard disk.
# prtvtoc /dev/dsk/c1t9d0s0 fmthard -s - /dev/rdsk/c1t10d0s0
fmthard: New volume table of contents now in place.
2. Creating Meta database on both Hard disk at slice 7
# metadb -a -f c1t9d0s7 c1t10d0s7
3. creating first sub mirror d1
# metainit -f d1 1 1 c1t9d0s0
d1: Concat/Stripe is setup
4. Creating Second sub mirror d11
# metainit -f d11 1 1 c1t10d0s0
d11: Concat/Stripe is setup
5. Creating Mirror volume d0 with first sub mirror d1
# metainit d0 -m d11
6. Attaching second sub mirror d11 with do
#metattach d0 d11
7. to Display Mirror volume d0 status
# metastat d0
d0: Mirror
Submirror 0: d1
State: Okay
Submirror 1: d11
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194720 blocks (2.0 GB)
d1: Submirror of d0
State: Okay
Size: 4194720 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t9d0s0 0 No Okay Yes
d11: Submirror of d0
State: Okay
Size: 4194720 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t10d0s0 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c1t9d0 Yes id1,sd@SSEAGATE_ST15230W_SUN4.2G00701447
c1t10d0 Yes id1,sd@SSEAGATE_ST15230W_SUN4.2G00631837
8. After I created the mirror volume I created file system using newfs commandd
# newfs /dev/md/rdsk/d0
newfs: construct a new file system /dev/md/rdsk/d0: (y/n)? y
/dev/md/rdsk/d0: 4194720 sectors in 1942 cylinders of 16 tracks, 135 sect
ors
2048.2MB in 44 cyl groups (45 c/g, 47.46MB/g, 7936 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 97376, 194720, 292064, 389408, 486752, 584096, 681440, 778784, 876128,
3305120, 3402464, 3499808, 3597152, 3694496, 3791840, 3889184, 3986528,
4083872, 4181216
9. Mount the mirror volume to mount point /mirror
# mkdir /mirror
# mount /dev/md/dsk/d0 /mirror
# cd /mirror
# df -k .
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d0 2052991 2065 1989337 1% /mirror
# metastat -c d0
d0 m 2.0GB d1 d11
d1 s 2.0GB c1t9d0s0
d11 s 2.0GB c1t10d0s0
Configuring Hot Spare disk for Mirror volume.
HOT SPARE setup
# metainit hsp001 c1t11d0s0
hsp001: Hotspare pool is setup
# metaparam -h hsp001 d1
# metaparam -h hsp001 d11
# metastat d0
d0: Mirror
Submirror 0: d1
State: Okay
Submirror 1: d11
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 4194720 blocks (2.0 GB)
d1: Submirror of d0
State: Okay
Hot spare pool: hsp001
Size: 4194720 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t9d0s0 0 No Okay Yes
d11: Submirror of d0
State: Okay
Hot spare pool: hsp001
Size: 4194720 blocks (2.0 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t10d0s0 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c1t9d0 Yes id1,sd@SSEAGATE_ST15230W_SUN4.2G00701447
c1t10d0 Yes id1,sd@SSEAGATE_ST15230W_SUN4.2G00631837
