June 12, 2012

Solaris: how to script VxVm disk & LUN removal

Posted in Utility at 10:47 am by alessiodini

Today i have to delete multiple VxVm disks and LUNs from a six-node cluster.
For every disk i have to do:

1) Diskgroup check ( the disk must be without any dg )
2) Disk across the nodes ( the disk must be the same on all nodes )
3) Disk removal ( vxdisk rm )
4) LUN removal ( luxadm -e offline /dev/rdsk/c#t#d#s2 )
5) After the removals i can run devfsadm -Cv

I’m working on a mission critical environment so i choose to script just steps 3 and 4.
The script is very poor ( i wrote it in a couple of minutes ) , and it works only on 1 disk per time cos the customer wants to verify this task. The script it’s this

it works 🙂

# perl lunrm.pl xp24k1_060f
# vxdisk list xp24k1_060f
VxVM vxdisk ERROR V-5-1-558 Disk xp24k1_060f: Disk not in the configuration

after i verified just one of 8 active paths for that LUN:

# format c16t50060E801525D316d15s2
No disks found!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: