Feeds:
Posts
Comments

Archive for August, 2009

In this scenario I’m using SLES 10, Veritas Dynamic Multipathing ,Veritas Volume Manager 5 MP3 and Hitachi SAN storage.

First scan for newly provided LUNs on Linux using following command:

# for i in `seq 0 3`; do echo ” – – – ” > /sys/class/scsi_host/host$i/scan; done

Once you verify 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

In this case disk “sdy” 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
sdy          auto:none             –              –                 error

Sometimes a disk cannot be initialized if it does not have a valid useable 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
sdy          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
sdy          auto:cdsdisk    testvg06    testvg            online nohotuse

# df -h

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

To increate a testLV Volume by 100GB use

# /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

Advertisements

Read Full Post »