Multi-pathing
One Solaris server, multiple HBA cards; review link status and speed:
$ fcinfo hba-port | egrep "WWN|State:|Speed:"
Enable multi-pathing in Solaris (use -d for disable),
$ stmsboot -D fp
-e
Reboot, then check for the new device
and module, check paths and state of,
$ echo | format
$ modinfo -c |grep scsi_vhci
$ mpathadm list LU
$ mpathadm show lu $DSK | grep -v Rel | grep [a-zA-Z]
Note: Solaris Volume Manager might not like the long device names.
ZFS Pools
ZFS is cool. Lets start by ensuring the disk has a label with the format command:
format > choose disk > label
Optional step: ensure the partition table is cleared out, all slices "unassigned" except 0. Slice 0 named "usr" will be type "wm", cylinder 0 to $ in size, effectively the full disk. Write the label (label command).
Create a ZFS pool, eg:
ZFS Pools
ZFS is cool. Lets start by ensuring the disk has a label with the format command:
Optional step: ensure the partition table is cleared out, all slices "unassigned" except 0. Slice 0 named "usr" will be type "wm", cylinder 0 to $ in size, effectively the full disk. Write the label (label command).
Create a ZFS pool, eg:
$ zpool create u01 c0t1d0
$ zpool status u01
$ df -h u01
If you didn't use the whole disk, specify the slice in addition. You can also specify a different mount point with "-m /path/to/mount". You can't reduce the pool, but you can increase it, eg:
$ zpool add u01 c0t2d0
Mirroring is also rather simple, and the resilver process is usually quick:
$ zpool status u01
To break the mirror, in this case, removing the original disk,
If you are mirroring the root volume rpool, check the status for resilver completion, and then reboot. Ensure the boot block is added on the extra disk, eg:
$ zpool status rpool
$ installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk \
/dev/rdsk/c0t2d0
Use "zpool destroy" to remove it before un-provisioning SAN storage. Note, the zpool create and destroy commands will do mounting operations.
Identifying and Managing disks
View list of LUNs and LUN IDs,
$ echo | format | grep "not avail"
$ luxadm probe
$ for disk in `ls /dev/rdsk/c8*s2`; do
D=`echo $disk | awk -F/ '{print $NF}'`
L=`echo $disk | cut -c22-25`
A=`luxadm display $disk |grep 'Device Address' | awk '{print $NF}'`
echo "$D $L $A"
done
View a specific disk (size, status, cache etc.)
$ luxadm display /dev/rdsk/c8t60060E801013A0A0058B39DA00000038d0
Unmount and remove a device
$ umount /my_volume
$ luxadm remove_device /dev/rdsk/c8t60060E801013A0A0058B39DA00000038d0
$ luxadm -e offline /dev/rdsk/c8t60060E801013A0A0058B39DA00000038d0
$ cfgadm -al -o show_FCP_dev
$ cfgadm -c unconfigure $DSK
Un-provision volume, cleanup and optionally rescan for new devices
$ devfsadm -C
$ devfsadm -c disk
No comments:
Post a Comment