Common Configuration Commands
Loading Disks
AIX can identify LUNs mapped by storage systems to host after the LUN scan command is run.
VxVM cannot directly manage the identified LUNs. It can manage the LUNs only after disks are loaded. The command to load disks is as follows:
vxdisk scandisks
Displaying Disks Taken Over by VxVM
Run the vxdisk list command to display disks taken over by VxVM. The following is an example:
bash-3.2#vxdisk list
DEVICE TYPE DISK GROUP STATUS
disk_0 auto:LVM - - LVM
disk_1 auto:LVM - - LVM
huawei-s5500t0_4 auto:none - - error
Initializing Disks
The state of disks taken over by VxVM for the first time is error. Such disks are not initialized and cannot be used. You need to run the vxdisksetup -i disk command to initialize disks. The state of a disk that is successfully initialized changes to online. The following is an example:
bash-3.2#vxdisksetup –i huawei-s5500t0_4
bash-3.2#vxdisk list
DEVICE TYPE DISK GROUP STATUS
disk_0 auto:LVM - - LVM
disk_1 auto:LVM - - LVM
huawei-s5500t0_0 auto:cdsdisk - - online
Creating a Disk Group
After initializing disks, run the vxdg init disk group name disk name command to create a disk group. The following is an example:
bash-3.2#vxdg init dg1 huawei-s5500t0_0 huawei-s5500t0_1
bash-3.2#vxdisk list
DEVICE TYPE DISK GROUP STATUS
hdisk0 auto:LVM - - LVM
hdisk1 auto:cdsdisk - - error
hdisk2 auto:cdsdisk - - error
huawei-s5500t0_0 auto:cdsdisk huawei-s5500t0_0 dg1 online invalid
huawei-s5500t0_1 auto:cdsdisk huawei-s5500t0_1 dg1 online invalid huawei-s5500t0_2 auto:cdsdisk - - online
Creating a Volume
After creating a disk group, run the vxassist -g disk group make volume name capacity to create a volume. The following is an example:
bash-3.2#vxassist -g dg1 make vo12 10g
bash-3.2#vxprint –g dg1 –t vo12
V Name RVG/VSET/CO KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
v v012 - ENABLED ACTIVE 20971520 SELECT - fsgen
Creating a File System
A created volume cannot be used unless it is mounted to a file system. The syntax of the file system creation command is the same here as that in LVM. The difference is the device name. The following is an example:
bash-3.2# mkfs -V vxfs /dev/vx/rdsk/dg1/vol2
Mounting a Volume
After creating a volume, run the following command to mount the volume to a specific directory:
mount -V vxfs /dev/vx/dsk/<disk group>/<volume name> <mount directory>
Disabling a Volume
A disabled volume is unavailable to users and the state of the volume is changed from ENABLED or DETACHED to DISABLED. Run the following command to disable a volume:
vxvol -g disk group stop volume name
Enabling a Volume
An enabled volume is available to users and the state of the volume is changed from DISABLED to ENABLED or DETACHED.
Run the following command to enable a volume:
vxvol –g disk group start volume name
Deleting a Volume
Run the following command to delete a volume:
vxedit –g disk group -rf rm volume name
Exporting a Disk Group
In clusters, a volume group needs to be imported or exported during data backup and recovery. Before exporting a disk group, disable all volumes in the disk group. Then run the vxdg deport disk group command to export the disk group. The following is an example:
bash-3.2#vxvol -g dg1 stop vol1
bash-3.2#vxdg deport dg1
bash-3.2#vxdg list
NAME STATE ID
Importing a Disk Group
Run the following command to import a disk group:
vxdg import disk group name
An imported disk group is available only after being activated. The following exemplifies how to activate a disk group:
bash-3.2#vxdg import dg1
bash-3.2#vxdg list
NAME STATE ID
dg1 enabled,cds 1330044217.14.ibm130
bash-3.2#vxvol -g dg1 startall
Adding a Disk to a Disk Group
You can add disks to a disk group whose capacity is insufficient. Run the following command to add a disk to a disk group:
vxdg –g disk group name adddisk disk name
The following is an example:
bash-3.2#vxdg -g dg1 adddisk huasy-s5500t0_2
bash-3.2#vxdisk list
DEVICE TYPE DISK GROUP STATUS
hdisk0 auto:LVM - - LVM
hdisk1 auto:cdsdisk - - error
hdisk2 auto:cdsdisk - - error
huasy-s5500t0_0 auto:cdsdisk huasy-s5500t0_0 dg1 online invalid
huasy-s5500t0_1 auto:cdsdisk huasy-s5500t0_1 dg1 online invalid huasy-s5500t0_2 auto:cdsdisk huasy-s5500t0_1 dg1 online invalid
Removing a Disk from a Disk Group
Run the following command to remove a disk from a disk group:
vxdg -g disk group name rmdisk disk name
The following is an example:
bash-3.2#vxdg -g dg1 rmdisk huasy-s5500t0_1
bash-3.2#vxdisk list
DEVICE TYPE DISK GROUP STATUS
hdisk0 auto:LVM - - LVM
hdisk1 auto:cdsdisk - - error
hdisk2 auto:cdsdisk - - error
huasy-s5500t0_0 auto:cdsdisk huasy-s5500t0_0 dg1 online invalid
huasy-s5500t0_1 auto:cdsdisk - - online invalid
huasy-s5500t0_2 auto:cdsdisk huasy-s5500t0_1 dg1 online invalid
- Loading Disks
- Displaying Disks Taken Over by VxVM
- Initializing Disks
- Creating a Disk Group
- Creating a Volume
- Creating a File System
- Mounting a Volume
- Disabling a Volume
- Enabling a Volume
- Deleting a Volume
- Exporting a Disk Group
- Importing a Disk Group
- Adding a Disk to a Disk Group
- Removing a Disk from a Disk Group