Extend VxVM filesystem

June 17, 2016 by S4

Filed under Linux, Veritas

Last modified June 17, 2016

Extend VxVM filesystem

using Solaris 10, DMP ,Veritas Volume Manager and SAN storage.

1. Scan for newly added LUNs on Linux using following command:
# for i in `seq 0 3`; do echo ” – – – ” > /sys/class/scsi_host/host$i/scan; done

now you can see newly added LUNs from “fdisk -l” , use “vxdctl enable” command to rebuild the volume device node directories and to update the DMP internal database to reflect the new state of the system.

You can also use the “vxdisk scandisks” command to scan devices in the operating system device tree, and to initiate dynamic reconfiguration of multipathed disks.

If you want VxVM to scan only new devices that have been added to the system, and not for devices that have been enabled or disabled, specify the -f option to either of the commands,

# vxdctl -f enable
# vxdisk -f scandisks

disk “sdg” is a new device that have been added to the system
# vxdisk list

DEVICE TYPE DISK GROUP STATUS
sdb auto:cdsdisk testvg01 testvg online nohotuse
sdc auto:cdsdisk testvg02 testvg online nohotuse
sdd auto:cdsdisk testvg03 testvg online nohotuse
sde auto:cdsdisk testvg04 testvg online nohotuse
sdf auto:cdsdisk testvg05 testvg online nohotuse
sdg auto:none – – error

Sometimes a disk cannot be initialized if it does not have a valid usable partition table. On Linux, you can use “fdisk” command to create an empty partition table on a disk

# fdisk /dev/sdy

Command (m for help): o
Command (m for help): w

” Warning: The fdisk command can destroy data on the disk”

Use “vxdisksetup” command to configure a disk from use with Veritas Volume Manager.

# /etc/vx/bin/vxdisksetup -i sdy format=cdsdisk

Add the new LUN to the existing disk group:

# vxdg -g testvg adddisk testvg06=sdy

# vxdisk list

DEVICE TYPE DISK GROUP STATUS
sdb auto:cdsdisk testvg01 testvg online nohotuse
sdc auto:cdsdisk testvg02 testvg online nohotuse
sdd auto:cdsdisk testvg03 testvg online nohotuse
sde auto:cdsdisk testvg04 testvg online nohotuse
sdf auto:cdsdisk testvg05 testvg online nohotuse
sdg auto:cdsdisk testvg06 testvg online

To exclude a disk from hot-relocation use

# vxedit -g testvg set nohotuse=on testvg

# vxdisk list

DEVICE TYPE DISK GROUP STATUS
sdb auto:cdsdisk testvg01 testvg online nohotuse
sdc auto:cdsdisk testvg02 testvg online nohotuse
sdd auto:cdsdisk testvg03 testvg online nohotuse
sde auto:cdsdisk testvg04 testvg online nohotuse
sdf auto:cdsdisk testvg05 testvg online nohotuse
sdg auto:cdsdisk testvg06 testvg online nohotuse

# df -h

/dev/vx/dsk/testvg/testLV
400G 159G 240G 40% /testmt

command to increase the testLV Volume by 100 GB

# /etc/vx/bin/resize -b -F vxfs -g [disk_group] [volume_name] +sizeGB [media_name]

where,

volume_name: Name of the volume that needs an increment.

media_name: Name of disk to use for allocating new space for a volume. (In this case we are not specifying any)

# /etc/vx/bin/vxresize -b -F vxfs -g testvg testLV +100g

Leave a Comment