How to create destroy and increase a zpool
1.-Is very important to have the LUN's allocated in the server and discover them, the first step is check what are the controller associated to the SAN boxes
unavailable scsi-sas n /devices/pci@0,600000/pci@0/pci@8/pci@0/scsi@1:scsi
c0::dsk/c0t0d0 connected configured unknown SEAGATE ST914603SSUN146G
unavailable disk n /devices/pci@0,600000/pci@0/pci@8/pci@0/scsi@1:scsi::dsk/c0t0d0
c0::dsk/c0t1d0 connected configured unknown SEAGATE ST914603SSUN146G
unavailable disk n /devices/pci@0,600000/pci@0/pci@8/pci@0/scsi@1:scsi::dsk/c0t1d0
unavailable fc-fabric n /devices/pci@0,600000/pci@0/pci@9/SUNW,qlc@0/fp@0,0:fc
c1::500601601111111f connected configured unknown
unavailable disk n /devices/pci@0,600000/pci@0/pci@9/SUNW,qlc@0/fp@0,0:fc::500601604460160f
c1::500601681111111f connected configured unknown
unavailable disk n /devices/pci@0,600000/pci@0/pci@9/SUNW,qlc@0/fp@0,0:fc::500601684460160f
c2 connected unconfigured unknown
unavailable fc n /devices/pci@0,600000/pci@0/pci@9/SUNW,qlc@0,1/fp@0,0:fc
c3 connected configured unknown
unavailable fc-fabric n /devices/pci@2,600000/SUNW,qlc@0/fp@0,0:fc
c3::500601614111111f connected configured unknown
unavailable disk n /devices/pci@2,600000/SUNW,qlc@0/fp@0,0:fc::500601614460160f
c3::500601694111111f connected configured unknown
unavailable disk n /devices/pci@2,600000/SUNW,qlc@0/fp@0,0:fc::500601694460160f
c4 connected unconfigured unknown
Example:
#devfsadm
or if you want using the command above "cfgadm -avl"
#cfgadm -c configure c1
#cfgadm -c configure c3
2.-You can check that the new devices are present
#ls -ltr | grep "Aug 19"lrwxrwxrwx 1 root root 67 Aug 19 2014 c5t6006016044412200F8DC3222D281E311d0s2 -> ../../devices/scsi_vhci/ssd@g6006016005512200f8dc2222d281e311:c,raw
lrwxrwxrwx 1 root root 67 Aug 19 2014 c5t600601604441220012E28033367CE311d0s2 -> ../../devices/scsi_vhci/ssd@g600601600551220012e28033367ce311:c,raw
3.-You will need to label the Lun's
#format -e c5t6006016044412200F8DC3222D281E311d0s2
FORMAT MENU:
disk - select a disk
type - select (define) a disk type
partition - select (define) a partition table
current - describe the current disk
format - format and analyze the disk
repair - repair a defective sector
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
inquiry - show vendor, product and revision
scsi - independent SCSI mode selects
cache - enable, disable or query SCSI disk cache
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> label
[0] SMI Label
[1] EFI Label
Specify Label type[1]: 0
format> q
The same for the other one
1.-Create a Zpool called "zpmysql"
#zpool create zpmysql c5t6006016044412200F8DC3222D281E311d02.-Validate the pool creation
# zpool list
NAME SIZE ALLOC FREE CAP HEALTH ALTROOT
zpmysql 14G 31k 30G 0% ONLINE -
3.-If you need to increase the pool you can add one disk in this case we have other disk assigned with "30G"
"c5t600601604441220012E28033367CE311d0s2"#zpool add zpmysql c5t600601604441220012E28033367CE311d0
# zpool list
NAME SIZE ALLOC FREE CAP HEALTH ALTROOT
zpmysql 30G 31k 30G 0% ONLINE -
4.-Destroy the zpool in order to decomm the disk or if you migrated to another server or disk
#zpool destroy zpmysqlRegards
Roger
Comments