Resize a metaset in Solaris.

# Do steps 1-3 on all cluster nodes:
# 1. Rescan HBA Fiber-Channel
cfgadm -c configure c1
cfgadm -c configure c2

# If no fc-fabric controllers are present, do a touch /reconfigure and boot.

# Check HBA Luns
cfgadm -alv -o show_FCP_dev c1 | grep ',[LUN-NO.]'

# 2. Build index in Solaris
devfsadm -C -c disk

# 3. Create cluster DID device
scdidadm -r

# Check DID device
scdidadm -l | grep -l [WWN]

# 4. Create metadevice for the cluster

# !!! Repeat the next Steps for all new LUNS !!!
# 4. Now the DID devices are present

# Label and delete old patrons
format -e [c3t6060480000290103202533030343431d0]

# Add DID the devices to the metaset
metaset -s $DS -a /dev/did/rdsk/$DID

# You may not need this !!!
# Add concat/stripe
# metainit -s $DS d[new nummer] 1 1 /dev/did/rdsk/${DID}s0

# Add concat/stripe to the mirror
metattach -s $DS d[submirror number] /dev/did/rdsk/{DID}s0

# Wait for resyncing to finish !!!

# Detach the old concat/stripe
metadetach -s $DS d[mirror nummer] d[submirror number]

# Delete the old device
metaclear -s $DS d[submirror number]
metaset -s $DS -d -f /dev/did/rdsk/d[old Device]

# To rename the submirror, the metaset must be offline, same as the cluster resource
metarename -s $DS -f d[old] d[new]
metareplace d4 c1t1d0s4

# !!! If all the new LUNs are in the metaset, resize the metaset and the filesystem !!!

# Resize the mirror
metattach -s $DS d[mirror number]

# Resize the softpartionen of the mirror
metattach -s $DS [softpart] all

# Resize the mounted filesystem
growfs -M [Mountpoint] /dev/md/${DS}/rdsk/[softpart]


Leave a Reply

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

You are commenting using your 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