How to assign specific disks to specific plexes when growing the size of a mirror volume and the file system underneath it
The recommended and practical method to grow a volume and the file system underneath it is either to use the GUI, Volume Manager Storage Administrator (VMSA) or the vxresize command (if using a VxFS file system).
In both cases you can control the disks used to grow the volume, but not how they will be assigned to plexes. In some environments, it may be necessary to control which disk can be used by Volume Manager (VxVM) to grow a particular plex.
This can be achieved by manually creating the subdisk from a chosen disk and associating it to the required plex.
Here is the procedure with an example to illustrate:
Consider a simple 100Mb mirror volume as vxprint -ht shows:
v testvol - ENABLED ACTIVE 204800 SELECT - fsgen
pl testvol-01 testvol ENABLED ACTIVE 205200 CONCAT - RW
sd disk0-01 testvol-01 disk0 2159 205200 0 c1t1d0 ENA
pl testvol-02 testvol ENABLED ACTIVE 205200 CONCAT - RW
sd disk1-01 testvol-02 disk1 0 205200 0 c1t3d0 ENA
A file system underneath it is mounted on /test_mnt as df -k shows:
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/testdg/testvol
102400 1133 94945 2% /test_mnt
The volume, for example, is to be grown by 50Mb using a disk called disk2 to grow the testvol-01 plex and a disk called disk3 to grow the testvol-02 plex.
1.
Create manually a subdisk on disk2:
# vxmake -g testdg sd disk2-01 disk2,0,102400
Note: a useful method to determine the free space on a disk and the offset to use in the vxmake command is to use the vxdg free command.
2.
Attach the subdisk to the chosen plex (testvol-01):
# vxsd assoc testvol-01 disk2-01
3.
Do the same on the other plex, then
vxprint -ht reports:
v testvol - ENABLED ACTIVE 204800 SELECT - fsgen
pl testvol-01 testvol ENABLED ACTIVE 307600 CONCAT - RW
sd disk0-01 testvol-01 disk0 2159 205200 0 c1t1d0 ENA
sd disk2-01 testvol-01 disk2 0 102400 205200 c1t4d0 ENA
pl testvol-02 testvol ENABLED ACTIVE 307600 CONCAT - RW
sd disk1-01 testvol-02 disk1 0 205200 0 c1t3d0 ENA
sd disk3-01 testvol-02 disk3 0 102400 205200 c1t5d0 ENA
The output shows that the size of the plexes increased (307600 blocks), but it is also necessary to grow the volume to the new size of the plex (volume size remains 204800 blocks).
The next point explains how to perform this operation online.
4.
Set the new size of the volume by getting the contig_len value for one of the plexes:
# vxprint -g testdg -m testvol-01 | grep contig_len
contig_len=307600
Use this value to set the volume length using the following command:
# vxvol -g testdg -o force set len=307600 testvol
Verify the volume size:
# vxprint -v testvol
Disk group: testdg
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
v testvol fsgen ENABLED 307600 - ACTIVE - -
5.
If the file system is VxFS type, resize it using the fsadm command:
# fsadm -F vxfs -b 307600 /test_mnt
UX:vxfs fsadm: INFO: /dev/vx/rdsk/testdg/testvol is currently 204800 sectors - size will be increased
And verify the new size:
# df -k /test_mnt
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/testdg/testvol
153800 1141 143125 1% /test_mnt
If the file system is UFS type, please refer to Sun Microsystems documentation for the command to grow the file system.
Подписаться на:
Комментарии к сообщению (Atom)
Комментариев нет:
Отправить комментарий