Friday, May 9, 2008

Solaris soft partition SAN disk add space to server

Customer asks to add 1 Gb extra space to the filesystem /local/bin on the solaris host.

1) Filesystem /local/bin is on a soft partition :


d8 -m d80 d82 1
d80 3 1 c0t1d0s0 \
1 c0t2d0s0 \
1 c0t3d0s0
d82 3 1 c2t1d0s0 \
1 c2t2d0s0 \
1 c2t3d0s0
d108 -p d8 -o 34534000 -b 8388608
d106 -p d8 -o 13562478 -b 2097152
d105 -p d8 -o 12538477 -b 1024000
d104 -p d8 -o 8344172 -b 4194304
d103 -p d8 -o 7320171 -b 1024000
d102 -p d8 -o 1028714 -b 6291456 -o 34450618 -b 81920
d101 -p d8 -o 4713 -b 1024000

2) To get wwn number :

# luxadm probe -p
No Network Array enclosures found in /dev/es

Found Fibre Channel device(s):
Node WWN:5005076300c09f4b Device Type:Disk device
Logical Path:/dev/rdsk/c6t6005076300C09F4B000000000000100Dd0s2
Physical Path:
/devices/scsi_vhci/ssd@g6005076300c09f4b000000000000100d:c,raw
Node WWN:5005076300c09f4b Device Type:Disk device
Logical Path:/dev/rdsk/c6t6005076300C09F4B000000000000102Cd0s2
Physical Path:
/devices/scsi_vhci/ssd@g6005076300c09f4b000000000000102c:c,raw
Node WWN:5005076300c09f4b Device Type:Disk device
Logical Path:/dev/rdsk/c6t6005076300C09F4B000000000000102Ed0s2
Physical Path:
/devices/scsi_vhci/ssd@g6005076300c09f4b000000000000102e:c,raw

OR

#/tmp/dumpmaps (this script I copied from the SF12K servers, can be used on other SUn servers)

c4 = qlc0 (fp0) -> /devices/pci@6,2000/SUNW,qlc@1/fp@0,0evctl
================================================================================
Pos Port_ID Hard_Addr Port WWN Node WWN Type
0 11500 0 5005076300d09f4b 5005076300c09f4b 0x0 (Disk device)
1 51500 0 5005076300ce9f4b 5005076300c09f4b 0x0 (Disk device)
2 250500 0 210000e08b1632fc 2

c5 = qlc1 (fp1) -> /devices/pci@6,2000/SUNW,qlc@1,1/fp@0,0evctl
================================================================================
Pos Port_ID Hard_Addr Port WWN Node WWN Type
0 21700 0 5005076300c89f4b 5005076300c09f4b 0x0 (Disk device)
1 61500 0 5005076300ca9f4b 5005076300c09f4b 0x0 (Disk device)
2 240500 0 210100e08b3632fc


3) Request LUN from Storage team. We asked for 2 of the smallest LUN (8 Gig) since we only needed 2 Gig. Note : Since the filesystem /local/bin is on the soft partition, BOTH metadevices found under the mirror (mirror: d8, metadevices : d80 and d82) must be expanded by 1 disk/LUN. Which was why I requested for 2 8 Gig LUNs.


4) After the LUNs have been assigned to the server (the storage engineer will email and inform us what are the ending numbers for the LUNs assigned to check in the format command : in our case, 2*8GB (00D and 02C) )

5) Before LUNs can be shown in format, it has to be detected by the system :

(c4 and c5 are found from the output of /tmp/dumpmaps) :

#cfgadm -c configure c4

#cfgadm -c configure c5

6) Now the LUNs can be seen in format :

8. c6t6005076300C09F4B000000000000100Dd0
/scsi_vhci/ssd@g6005076300c09f4b000000000000100d
9. c6t6005076300C09F4B000000000000102Cd0

Format the 2 new disks, assign all storage to slice 0 (since this is used for all soft partitions).

7) Attach the new disks to the metadevices under the mirror d8 :


# metattach d80 c6t6005076300C09F4B000000000000102Cd0s0
d80: component is attached

# metattach d82 c6t6005076300C09F4B000000000000100Dd0s0
d82: component is attached


8) Attach 1g (as requested to the shoft partition) :

# metattach d102 1g
d102: Soft Partition has been grown

9) A final step, is to grow the soft partition since we have just increased its size :

# growfs -M /local/bin /dev/md/rdsk/d102
Warning: 1648 sector(s) in last cylinder unallocated
/dev/md/rdsk/d102: 8470528 sectors in 1798 cylinders of 19 tracks, 248 sectors
4136.0MB in 82 cyl groups (22 c/g, 50.62MB/g, 8256 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 103952, 207872, 311792, 415712, 519632, 623552, 727472, 831392, 935312,
7465888, 7569808, 7673728, 7777648, 7881568, 7985488, 8089408, 8193328,
8297248, 8401168,

10) DONE!

# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d1 6050182 1718189 4271492 29% /
/proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
/dev/md/dsk/d3 962571 254474 650343 29% /var
swap 4552056 32 4552024 1% /var/run
swap 512000 25008 486992 5% /tmp
/dev/md/dsk/d101 480847 28109 404654 7% /local
/dev/md/dsk/d104 2033415 1530688 441725 78% /local/users
/dev/md/dsk/d105 480847 1041 431722 1% /local/apps
/dev/md/dsk/d106 986287 438820 488290 48% /local/data
/dev/md/dsk/d9 7687661 1616563 5994222 22% /local/osdumps
/dev/md/dsk/d102 4149310 2165535 1922140 53% /local/bin
/dev/md/dsk/d108 4130134 2683148 1405685 66% /local/logs
/dev/md/dsk/d103 480847 155271 277492 36% /local/bin/patrol
/dev/md/dsk/d109 36045276 27777545 7907279 78%

No comments:

UNIX: How to print column nicely using printf

[user@hostfwnms1-oam tmp]# cat b.sh printf "%-26s %-19s %-8s %-8s %-s %-s\n" HOSTNAME IP PING SNMPWALK 0-ok 1-fail for i in `cat n...