Please enter search query.
Search <product_name> all support & community content...
Article: 100016817
Last Published: 2019-04-03
Ratings: 2 2
Product(s): InfoScale & Storage Foundation
Description
Usage:
The "
An administrator can specify a specific size using the variable length. The variable length is in terms of blocks. Please see vxdisk man pages for more information.
Example vxdisk resize operation:
###########################
LUN will be expanded from 2GB to 4GB
Then command vxdisk resize will be issued to update VxVMheaders and structures
###########################
Volume Manager configuration and LUN configuration prior to resize operation. Note LUN size is2GB.
DEVICE TYPE DISK GROUP STATUS
sdj auto:cdsdisk disk01 testdg online
sdk auto:cdsdisk disk02 testdg online
dg2gb_dg default default 0 1107362591.48.mtv1550-02
dmdisk01 sdj auto 2048 4801536 -
dmdisk02 sdk auto 2048 4801536 -
v vol01 - ENABLED ACTIVE 4801024 SELECT - fsgen
pl vol01-01 vol01 ENABLED ACTIVE 4801024 CONCAT - RW
sd disk01-01 vol01-01 disk01 0 4801024 0 sdj ENA
8 144 2403360 sdj 5030 2601 27676 1620 4646 1167 145130 72800 2690 8900
8 147 2401920 sdj3 4435 1500 21576990 4555 687 140975 7220 0 2110 8210
8 152 2401920 sdj8 3 0 3 10 0 0 0 0 0 10 10
Disk /dev/sdj (Sun disk label): 15 heads, 96 sectors, 3336cylinders
Units = cylinders of 1440 * 512 bytes
DeviceFlag Start End Blocks Id System
/dev/sdj3 u 0 3336 2401920 5 Wholedisk
/dev/sdj8 u 0 3336 2401920 f Unknown
After expanding the LUN from 2GB to 4GB and issuing a reboot we can see that the kernel has been updated with the new partition table for device sdj, but partitions 3 and 8 which belong to VxVM have not changed. Partitions 3 and 8 will be updated when the command `
Note: The command `
8 144 4806720 sdj 1396 597 4815 210 12 27 290 10 0 210 220
8 147 2401920 sdj3 1329 412 4319 210 12 27 290 10 0 210220
8 152 2401920 sdj8 32 172 408 0 0 0 0 0 0 00
After issuing the command `
Disk /dev/sdj (Sun disk label): 15 heads, 96 sectors, 6674cylinders
Units = cylinders of 1440 * 512 bytes
DeviceFlag Start End Blocks Id System
/dev/sdj3 u 0 6674 4805280 5 Wholedisk
/dev/sdj8 u 0 6674 4805280 f Unknown
8 144 4806720 sdj 1396 597 4815210 12 27 290 10 0 210 220
8 147 2401920 sdj31329 412 4319 210 12 27 290 10 0 210 220
8 152 2401920 sdj8 32 172 408 0 0 0 0 0 0 0 0
dg testdg default default 0 1107362800.52.mtv1550-02
dmdisk01 sdj auto 2048 9608256 -
dm disk02 sdk auto 2048 4801536 -
v vol02 - ENABLED ACTIVE 4801024 SELECT - fsgen
pl vol02-01 vol02 ENABLED ACTIVE 4801024 CONCAT - RW
sd disk01-01 vol02-01 disk01 0 4801024 0 sdj ENA
In this test case a reboot was issued to update the kernel partitiontable and the new size can be seen in /proc/partitions.
8 144 4806720 sdj 1396 597 4815400 12 27 290 0 0 390 400
8 147 4805280 sdj3 1329412 4319 380 12 27 290 0 0 370 380
8 152 4805280sdj8 32 172 408 10 0 0 0 0 0 10 10
If there is only one LUN in the diskgroup you will receive the following error message. To get around this issue one has to use the force option.
VxVM vxdisk ERRORV-5-1-8643 Device sdj: resize failed: Cannot remove last disk in diskgroup
Note:
For this operation to be successful the kernel needs to be aware that the LUN has been expanded. If the device is busy the server will have to be rebooted in order for the kernel to be aware of the LUN expansion, prior to and after using the "vxdisk resize" command.
Resizing should only be performed on devices that pre-serve data. Consult the array documentation to verify that data preservation is supported and has been qualified. The operation also requires that only storage at the end of the LUN is affected. Data at the beginning of the LUN must not be altered. No attempt is made to verify the validity of pre-existing data on the LUN.
vxdisk [-f] [-gdiskgroup] resize disk [length=<value>]
The "
vxdisk resize
" command updates disk headers and other VxVM structures to match a new LUN size.It does not resize the LUN itself.
An administrator can specify a specific size using the variable length. The variable length is in terms of blocks. Please see vxdisk man pages for more information.
Example vxdisk resize operation:
###########################
LUN will be expanded from 2GB to 4GB
Then command vxdisk resize will be issued to update VxVMheaders and structures
###########################
Volume Manager configuration and LUN configuration prior to resize operation. Note LUN size is2GB.
# vxdisk list
DEVICE TYPE DISK GROUP STATUS
sdj auto:cdsdisk disk01 testdg online
sdk auto:cdsdisk disk02 testdg online
# vxprint -ht
dg2gb_dg default default 0 1107362591.48.mtv1550-02
dmdisk01 sdj auto 2048 4801536 -
dmdisk02 sdk auto 2048 4801536 -
v vol01 - ENABLED ACTIVE 4801024 SELECT - fsgen
pl vol01-01 vol01 ENABLED ACTIVE 4801024 CONCAT - RW
sd disk01-01 vol01-01 disk01 0 4801024 0 sdj ENA
# more /proc/partitions
8 144 2403360 sdj 5030 2601 27676 1620 4646 1167 145130 72800 2690 8900
8 147 2401920 sdj3 4435 1500 21576990 4555 687 140975 7220 0 2110 8210
8 152 2401920 sdj8 3 0 3 10 0 0 0 0 0 10 10
# fdisk -l/dev/sdj
Disk /dev/sdj (Sun disk label): 15 heads, 96 sectors, 3336cylinders
Units = cylinders of 1440 * 512 bytes
DeviceFlag Start End Blocks Id System
/dev/sdj3 u 0 3336 2401920 5 Wholedisk
/dev/sdj8 u 0 3336 2401920 f Unknown
After expanding the LUN from 2GB to 4GB and issuing a reboot we can see that the kernel has been updated with the new partition table for device sdj, but partitions 3 and 8 which belong to VxVM have not changed. Partitions 3 and 8 will be updated when the command `
vxdisk resize
` is executed.
Note: The command `
blockdev --rereadpt /dev/sdj
` can be used to update the kernel with the new partition table after the LUN has been expanded. This will avoid a reboot. If the device is busy. The kernel may not be updated with the new partition table. The administrator can check /proc/partitions to verify if the kernel was updated with the new partition table. If the LUN size did not update because the device was busy a reboot will be required.
# more /proc/partitions
8 144 4806720 sdj 1396 597 4815 210 12 27 290 10 0 210 220
8 147 2401920 sdj3 1329 412 4319 210 12 27 290 10 0 210220
8 152 2401920 sdj8 32 172 408 0 0 0 0 0 0 00
# vxdisk resize sdj
After issuing the command `
vxdisk resize sdj
`, partitions 3 and 8 will be updated with the new disk label and the new size can be seen as noted in the fdisk output. In the example below we can see kernel has not been updated with the new partition table. As stated previously the administrator can use the command `blockdev` to update the kernel partition table. If the device is busy the kernel will not be updated with the new partition table and a reboot will be required.
# fdisk -l/dev/sdj
Disk /dev/sdj (Sun disk label): 15 heads, 96 sectors, 6674cylinders
Units = cylinders of 1440 * 512 bytes
DeviceFlag Start End Blocks Id System
/dev/sdj3 u 0 6674 4805280 5 Wholedisk
/dev/sdj8 u 0 6674 4805280 f Unknown
# more/proc/partitions
8 144 4806720 sdj 1396 597 4815210 12 27 290 10 0 210 220
8 147 2401920 sdj31329 412 4319 210 12 27 290 10 0 210 220
8 152 2401920 sdj8 32 172 408 0 0 0 0 0 0 0 0
# vxprint-ht
dg testdg default default 0 1107362800.52.mtv1550-02
dmdisk01 sdj auto 2048 9608256 -
dm disk02 sdk auto 2048 4801536 -
v vol02 - ENABLED ACTIVE 4801024 SELECT - fsgen
pl vol02-01 vol02 ENABLED ACTIVE 4801024 CONCAT - RW
sd disk01-01 vol02-01 disk01 0 4801024 0 sdj ENA
In this test case a reboot was issued to update the kernel partitiontable and the new size can be seen in /proc/partitions.
# more/proc/partitions
8 144 4806720 sdj 1396 597 4815400 12 27 290 0 0 390 400
8 147 4805280 sdj3 1329412 4319 380 12 27 290 0 0 370 380
8 152 4805280sdj8 32 172 408 10 0 0 0 0 0 10 10
If there is only one LUN in the diskgroup you will receive the following error message. To get around this issue one has to use the force option.
# vxdisk resize sdj
VxVM vxdisk ERRORV-5-1-8643 Device sdj: resize failed: Cannot remove last disk in diskgroup
# vxdisk -f resize sdj
Note:
For this operation to be successful the kernel needs to be aware that the LUN has been expanded. If the device is busy the server will have to be rebooted in order for the kernel to be aware of the LUN expansion, prior to and after using the "vxdisk resize" command.
Resizing should only be performed on devices that pre-serve data. Consult the array documentation to verify that data preservation is supported and has been qualified. The operation also requires that only storage at the end of the LUN is affected. Data at the beginning of the LUN must not be altered. No attempt is made to verify the validity of pre-existing data on the LUN.