for hw in $(ioscan -fun -C disk | grep -i emc | awk '{print $3}')
do
ioscan -fun -H ${hw} | grep dsk | awk '{print $1}'
done | sort > emc.disks
for disk in ${disks[*]}
do
pvcreate -f /dev/rdsk/${disk##*/}
# NOTE:; Use the -f option ONLY if you're absolutely sure these disks aren't being used!
done
vg## is the standard; however, you can deviate from it. ## in this case, is a one up serial number vg01, vg02 for example.
The minor number on group raw device driver is one up between volume groups. The docs suggest using the hex number for the owning volume group - which works only if you don't deviate from the standard. Your best bet is to confirm the minor numbers by doing something like:
for x in $(vgdisplay | grep -i "vg name" | awk '{print $3}')
do
ls -l ${x}/group
done | sort -n -k 5
then pick the next available one.
Or, if you've set up the array:
vgcreate /dev/vg## ${disks[*]}
| Document: | |
| URL: | |
| Last updated: |