Friday, 3 January 2014

METASETS & SOFT PARTITION IN SOLARIS CLUSTER


1. Add disk to disk set
# /usr/sbin/metaset -s oraset -a /dev/did/dsk/d25 /dev/did/dsk/d24
# /usr/sbin/metastat -s oraset
available size
Set name = oraset, Set number = 1
Host Owner
mininode0 Yes
mininode1
Drive Dbase
d4 No
d5 Yes
d16 No
d17 Yes
d18 Yes
d7 Yes
d37 No
d38 Yes
d39 Yes
d25 Yes <----- New disk added to set oraset
d24 no <----- New Disk added to set oraset
2. After adding disks to the disk set, verify that format shows the disk partitioned the same
Partition table for d24
Part      Tag    Flag     Cylinders        Size            Blocks
 0 unassigned    wm       3 - 2732        1.98GB    (2730/0/0) 4149600
 1 unassigned    wm       0               0         (0/0/0)          0
 2 unassigned    wm       0               0         (0/0/0)          0
 3 unassigned    wm       0               0         (0/0/0)          0
 4 unassigned    wm       0               0         (0/0/0)          0
 5 unassigned    wm       0               0         (0/0/0)          0
 6 unassigned    wm       0               0         (0/0/0)          0
 7 unassigned    wu       0 -    2        2.23MB    (3/0/0)       4560
Partition table for d25
Part      Tag    Flag     Cylinders        Size            Blocks
 0 unassigned    wm       3 - 2732        1.98GB    (2730/0/0) 4149600
 1 unassigned    wm       0               0         (0/0/0)          0
 2 unassigned    wm       0               0         (0/0/0)          0
 3 unassigned    wm       0               0         (0/0/0)          0
 4 unassigned    wm       0               0         (0/0/0)          0
 5 unassigned    wm       0               0         (0/0/0)          0
 6 unassigned    wm       0               0         (0/0/0)          0
 7 unassigned    wu       0 -    2        2.23MB    (3/0/0)       4560

Expanding a mirrored filesystem in a disk set under Solaris Cluster 3.X
3. Get mirror information
# /usr/sbin/metastat -s setname mirror (as shown in your vfstab)
# /usr/sbin/metastat -s oraset d22
oraset/d22: Mirror
   Submirror 0: oraset/d13
     State: Okay        
   Submirror 1: oraset/d14
     State: Okay        
   Pass: 1
   Read option: roundrobin (default)
   Write option: parallel (default)
   Size: 4149600 blocks

oraset/d13: Submirror of oraset/d22
   State: Okay        
   Hot spare pool: oraset/hsp000
   Size: 4149600 blocks
   Stripe 0:
       Device Start Block  Dbase State        Hot Spare
       d7s0          0     No    Okay        


oraset/d14: Submirror of oraset/d22
   State: Okay        
   Hot spare pool: oraset/hsp000
   Size: 4149600 blocks
   Stripe 0:
       Device  Start Block  Dbase State        Hot Spare
       d18s0          0     No    Okay        
As we can see from this output d22 is the mirror we want to expand which contains the 2 metadevices d13 and d14
4. Use the metattach command to concatenate a new slice 0 to the end of the exsisting metadevices d13 and d14.
Do not remove or use slice 7. This is the database that contains info about the diskset.
If the slice 0 of the newly attached disks is smaller, the metadevice will only expand to the smallest slice 0.
# /usr/sbin/metattach -s oraset d13 /dev/did/dsk/d24s0
oraset/d13: component is attached

# /usr/sbin/metattach -s oraset d14 /dev/did/dsk/d25s0
oraset/d14: component is attached
5. Before expanding the mirror d22 run "df -k" to see the original size.
# /usr/bin/df -k
/dev/md/oraset/dsk/d22
                    2010110  420196 1529611    22%    /ora
If you want to grow the filesystem safely while it is unmounted:
# /usr/sbin/growfs /dev/md/oraset/rdsk/d22
With filesystem mounted:
# /usr/sbin/growfs -M /ora /dev/md/oraset/rdsk/d22
/dev/md/oraset/rdsk/d22: 8299200 sectors in 5460 cylinders of 19 tracks, 80 sectors
4052.3MB in 171 cyl groups (32 c/g, 23.75MB/g, 5888 i/g)
4052.3MB in 171 cyl groups (32 c/g, 23.75MB/g, 5888 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 48752, 97472, 146192, 194912, 243632, 292352, 341072, 389792, 438512,
487232, 535952, 584672, 633392, 682112, 730832, 779552, 828272, 876992,
925712, 974432, 1023152, 1071872, 1120592, 1169312, 1218032, 1266752,
....

# /usr/bin/df -k
dev/md/oraset/dsk/d22
4020989 420196 3540490 11% /ora
As we can see from the output of df -k it has grown.
Expanding a concat or striped filesystem in a disk set under Solaris Cluster 3.X
Follow the same steps as above. The difference will be attaching a new disk to only one metadevice in the set.
1. Determine how the device was created.
# /usr/sbin/metastat -s oraset -p
oraset/d50 1 1 /dev/did/rdsk/d4s0
2. Attach another device to the underlying metadevice.
# /usr/sbin/metattach -s oraset d50 /dev/did/rdsk/d5s0
oraset/d50: component is attached
3. The filesystem still needs to be grown.
If mounted:
# /usr/sbin/growfs -M /ora /dev/md/oraset/rdsk/d50

If unmounted:

# /usr/sbin/growfs /dev/md/oraset/rdsk/d50
4. Once mounted verify with df command.
Soft Partitions:
If a soft partition that was created in this way.
# /usr/sbin/metainit -s oraset d200 1 1 /dev/did/dsk/d5s0
# /usr/sbin/metainit -s oraset d300 1 1 /dev/did/dsk/d4s0
# /usr/sbin/metainit -s oraset d100 -m d200
# /usr/sbin/metattach -s oraset d100 d300
# /usr/sbin/metainit -s oraset d41 -p d100 100m
It has to be even non-contiguous space in the parent volume.
This is the amount that the volume will be grown by.
1. Determine how the device was created.
# /usr/sbin/metastat -s oraset -p

oraset/d41 -p /dev/md/oraset/rdsk/d40 -o 32 -b 2252800
oraset/d40 1 1 /dev/did/rdsk/d4s0

or

oraset/d60 -p /dev/did/rdsk/d6s0 -o 1 -b 69206016
2. a) If there is room on the original device that the soft partiton was created on attach the space needed to the soft partition.
# /usr/sbin/metattach -s oraset d41 500m
oraset/d41: Soft Partition has been grown
To determine amount of free space for soft partitions please reference Document 1002219.1
b) If a soft partition was created from a metadevice within the set and the entire disk was used. Attach another device to the underlying metadevice.
# /usr/sbin/metattach -s oraset d40 /dev/did/rdsk/d5s0
oraset/d40: component is attached
3. When on physical disk in set:
Get information on how soft partition was created.
#  /usr/sbin/metastat -s oraset -p
oraset/d60 -p /dev/did/rdsk/d6s0 -o 1 -b 614400
3. a) If a soft partition was created from a physical disk within the set and the entire disk was used. Take the resource group offline, clear the soft partition.
# /usr/sbin/metaclear oraset/d60
oraset/d60: Soft Partition is cleared
3. b) Create a new metadevice with the added disk or disks.
#  /usr/sbin/metainit oraset/d70 2 1 /dev/did/rdsk/d6s0 1 /dev/did/rdsk/d7s0
oraset/d70: Concat/Stripe is setup
3. c) Recreate soft partition.
#  /usr/sbin/metainit oraset/d60 -p d70 -o 1 -b 614400
oraset/d60: Soft Partition is setup
3. d) Grow the soft partition.
# /usr/sbin/metattach oraset/d60 50g
oraset/d60: Soft Partition has been grown

4. The filesystem still needs to be grown.
If mounted:
# /usr/sbin/growfs -M /ora /dev/md/oraset/rdsk/d60

# growfs -M /mnt /dev/md/oraset/rdsk/d60
/dev/md/oraset/rdsk/d60: Unable to find Media type. Proceeding with system determined parameters.
Warning: 8192 sector(s) in last cylinder unallocated
/dev/md/oraset/rdsk/d60: 105472000 sectors in 3219 cylinders of 128 tracks, 256 sectors
51500.0MB in 1610 cyl groups (2 c/g, 32.00MB/g, 15040 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 65824, 131616, 197408, 263200, 328992, 394784, 460576, 526368, 592160,
Initializing cylinder groups:

Verify that it has has been grown with the df command.

#  /usr/sbin/df -h /ora
Filesystem size used avail capacity Mounted on
/dev/md/oraset/dsk/d41
565M 1.0M 555M 1% /ora
If unmounted:
# /usr/sbin/growfs /dev/md/oraset/rdsk/d60

/dev/md/oraset/rdsk/d41: Unable to find Media type. Proceeding with system determined parameters.
Warning: 8192 sector(s) in last cylinder unallocated
/dev/md/oraset/rdsk/d41: 2252800 sectors in 69 cylinders of 128 tracks, 256 sectors
1100.0MB in 35 cyl groups (2 c/g, 32.00MB/g, 15040 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 65824, 131616, 197408, 263200, 328992, 394784, 460576, 526368, 592160,
1644832, 1710624, 1776416, 1842208, 1908000, 1973792, 2039584, 2105376,
2171168, 2236960

5. Once mounted verify with df command.
# /usr/sbin/df -h /mnt
Filesystem             size   used  avail capacity  Mounted on
/dev/md/oraset/dsk/d60
                       47G    50M    47G     1%    /mnt

No comments:

Post a Comment