Setting up veritas volume manager in HP-UX

Thnx to sidd for this info:

VXVM Setup IN HP-UX

1. Run vxinstall to initialize at least one disk in rootdg.

2. Then you run vxdiskadm to add other disks

3. Create a /etc/vx/disks.exclude file if you want some disks to be excluded from vxvm

4. The files /etc/vx/cntrls.exclude and /etc/vx/disks.exclude are for the controllers and disks which will be

excluded to be used by vxinstall or vxdiskadm so the disks under that controllers or the sepcified disks

will not be included to any Disk Group. But all the other commmands will work

5. To determine whether the volume daemon is enabled, use the following
command: vxdctl mode

6. To enable the volume daemon, use the following command:
vxdctl enable

7. To start the vxconfigd daemon, use the following command:
vxconfigd

8. Verify that vxiod daemons are running by entering this command:
vxiod

9. If no vxiod daemons are currently running, start some by entering this
command: vxiod set 10
where 10 can be substituted by the desired number of vxiod daemons. It is recommended that at least one

vxiod daemon exist for each CPU in the system.

Initial Setup
Step 1. Place disks under Volume Manager control.
Step 2. Create new disk groups (if you do not want to use rootdg or you want
other disk groups).
Step 3. Create volumes.
Step 4. Put file system(s) in volumes.

Options

• Designate hot-relocation spare disks.
• Add mirrors to volumes if necessary.

Maintenance

• Resize volumes and file systems.
• Add more disks/disk groups.
• Create snapshots.

vxvm Commands

To display free space in the system, use the following command:
vxdg free

To display free space for a disk group, use the following command:
vxdg -g diskgroup free

To display general information for all subdisks, use the following
command:
vxprint -st

To display complete information about a particular subdisk by using the following command:
vxprint -l subdisk_name (ex disk01)

Creating Volumes

To create a new volume by entering:
vxassist make volume_name length
(Ex. vxassist make god 4000m)

To create a new volume in a particular subdisk by entering:
vxassist make volume_name length subdisk
(Ex. vxassist make god 4000m disk02)

to create a 30 megabyte striped volume on three specific disks (disk03, disk04, and disk05), enter:
vxassist make agni 4000m layout=stripe disk03 disk04 disk05

Now create a file systems in it and mount and change /etc/fstab (HP-UX) or /etc/vfstab (Soaris)

newfs -F vxfs -o largefiles /dev/vx/rdsk/agni
mkdir /agni
mount /dev/vx/dsk/agni /agni

To move a disk between disk groups, remove the disk from one disk group and add it to the other. For example, to move the physical disk c0t3d0 (attached with the disk name disk04) from disk group rootdg
and add it to disk group mktdg, use the following commands:
vxdg rmdisk disk04
vxdg -g mktdg adddisk mktdg02=c0t3d0

To remove disk02 from rootdg, use the following command:
vxdg rmdisk disk02
If the disk has subdisks on it when you try to remove it, you will get an error message.

To remove disk02 from rootdg with chance of data loss, use the following command:
vxdg rmdisk disk02 -k

To remove it from Volume Manager control completely, as follows:
vxdisk rm devicename