Create raid on Tru64 quick note

Create root disk mirroring
PS: Two free patition table entries must be availabele for LSM use on the physical boot disk

#Encap root disk
volencap dsk0

#Perform it and restart it
volreconfig

#Check destination disk layout
disklabel -r dsk1

#Dump disk config
disklabel -r dsk0 > /tmp/dsk0_label

edit to replace unused fstype

#restore disk to desination disk
disklabel -r -R dsk1 /tmp/dsk0_label

#Make the root mirror (-a to mirror/usr /var)
volrootmir -a

Other disk mirroring

#Add disk into diskgroup
voldiskadd dsk0e dsk1e

Given it dsk0e as datadg01 and dsk1e as datadg02
eg: Group: datadg datadg01:/dev/disk/dsk0e datadg02:/dev/disk/dsk1e

#Add a new volume
volassist -g datadg make vol-dsk0e 3085268 layout=concat alloc=”dsk0e”

#Make mirror
volassist mirror vol-dsk0e datadg02

Make new patition
mkfdmn /dev/vol/datadg/vol-dsk0e data_domain
mkfset data_domain userdata

#Insert into fstab
data_domain#userdata /export/userdata advfs rw 0 2

#Mount it
mount -a

Creating RAID 5

# DISK: dsk2, dsk3, dsk4, dsk5, dsk6 (17GB each)

voldiskadd dsk2 dsk3 dsk4 dsk5 dsk6

# Given it same name as dm name and raid5dg01 as dg name
# Check the max size of the dg

volassist -f -g raid5dg01 maxsize layout=raid5,nolog nstripe=5

Result: Maximum volume size: 142243840 (69455Mb)

PS: I do created the raid5 group without log which log just make rebuild faster but wasting space

# Create the volume

volassist -f -g raid5dg01 make exportvol 142243840 layout=raid5,nolog nstripe=5 dsk2 dsk3 dsk4 dsk5 dsk6

 

Creating RAID 0 with mirror

# DISK: dsk7 to  dsk30  (17GB each) total 24 disk

# Add disk into a new dg

voldiskadd dsk7 dsk8 dsk9 dsk10………etc

# Check the max size of the dg # Use 12 disk for stipe

volassist -g raid01dg01 maxsize layout=stripe dsk7 dsk8 dsk9 dsk10 dsk11 dsk12 dsk13 dsk14 dsk15 dsk16 dsk17 dsk18

# Make volume

volassist -g raid10dg01 make datavol 213231616 layout=stripe dsk7 dsk8 dsk9 dsk10 dsk11 dsk12 dsk13 dsk14 dsk15 dsk16 dsk17 dsk18

# Mirror it

volassist mirror datavol

 

 

Reference site:

http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN8/0166____.HTM

http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V40G_HTML/AQ3NCETE/TITLE.HTM

http://www.phys.uu.nl/DU/Tru64_5.0/HTML/ARH9BATE/CHPDDDSK.HTM

http://www.helsinki.fi/atk/unix/dec_manuals/DOC_51/HTML/ARH9BBTE/CHPCRTVL.HTM