Operating System - HP-UX
1832679 Members
2892 Online
110043 Solutions
New Discussion

Creating a volume group using Veritas Volume Manager.

 
SOLVED
Go to solution
Reynaldo Torres
Advisor

Creating a volume group using Veritas Volume Manager.

I need help.

I have just installed 11.i 11.11 OS on a K460 unix server, but I have created the root disk using veritas. I would like to create another volume group using veritas as well. Can some one help me to create this volume group step by step as you would using LVM? I know LVM, but I lack of knowledge on veritas volume manager. Your help is really appreciated, and as I said, I need step by step so I can compare with LVM and make notes, so I don't ask again. Your answers will gain the highest points. Please help me to create a volume using one to three disks. For now I will be creating without using mirroring or RAID.

Thanks in advance.

RT.
Reynaldo Torres
9 REPLIES 9
Patrick Wallek
Honored Contributor
Solution

Re: Creating a volume group using Veritas Volume Manager.

Have you tried the manuals?

Here's the Veritas Volume Manager 3.5 Administrators Guide:
http://docs.hp.com/hpux/onlinedocs/5187-1369/5187-1369.html

For all the Veritas docs have a look here:
http://docs.hp.com/hpux/os/11i/oe/index.html#VERITAS%20Volume%20Manager%20and%20File%20System
Reynaldo Torres
Advisor

Re: Creating a volume group using Veritas Volume Manager.

I have look into the manuals, but still I can not get the right picture due to base on some of the commands to use, for creating the physical volume or disk, I'm having some problems to create it. Even I have done a clean installed, the disk is shown as LVM and not as veritas; therefore, it will not allow me to create the new volume group under veritas.
Reynaldo Torres
PVR
Valued Contributor

Re: Creating a volume group using Veritas Volume Manager.

Hope you have Veritas VM 3.5

so start vea #vea &

This will give you volume manager GUI screen.

But before this you can visit docs.hp.com to get some basic information about volume manager
Don't give up. Try till success...
Sunil Sharma_1
Honored Contributor

Re: Creating a volume group using Veritas Volume Manager.

Hi,

There is lots of documents are available on this but have a look on www.cuddletech.com for short and sweet docs about veritas volume manager.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Sanjay Kumar Suri
Honored Contributor

Re: Creating a volume group using Veritas Volume Manager.

Here are some of the steps out of my notes. You have to modify as per your requirments and also refer guide on the subject:

1. Set the parameter DISPLAY=IP:0.0 before running /opt/VRTS/bin/vea. (Veritas Enterprise Administrator).

2. Create dynamic disk group of required size.

3. Right-click dynamic disk groups in the tree view, and select New Volume from the context menu. The Create Volume wizard appears. You can also select the command from the Actions menu or click the New Volume tool on the toolbar.

4. Click Next to continue. The screen for selecting attributes comes up next.

5. If necessary, select the dynamic Group name for the volume from the pull-down list.

6. Type in the Volume Name. This is a Volume Manager-specific name that is used in some Volume Manager commands.

7. Specify the volume size, or select Maxsize. The Maxsize button works differently, depending on whether you have a disk selected.

- If you do not have a disk selected when you start the Create Volume wizard, no figure displays in the volume size box. If you then click on a volume type and also click the Maxsize button, a size appears in the volume size box that represents the maximum volume for that layout for all disks in the dynamic group.

- If you do have a disk selected when you start the Create Volume wizard, a size is shown in the volume size box that represents the maximum concatenated (simple or spanned) volume size on the selected disk. If you then click the Maxsize button, a new number appears in the volume size box that represents the maximum size for a spanned volume that spans all the disks in the dynamic group. You can also click on another volume layout and then click the Maxsize button to get the maximum size for that layout that involves unallocated space on all disks in the dynamic group. If you choose Striped or RAID-5, Number of Columns and Stripe Unit Size need to have an entry. Defaults are provided.

8. Select the Layout:
- Concatenated (Concatenated and Concatenated Pro)
- Striped
- RAID-5/Mirrored/Striped Pro

9. Enter a value in Columns = ?, Stripe Unit Size=????K. Click Next.

10. Let Volume Manager decided what disks to use for this Volume. Click Next.

11. Create a File system = ????. Block size = ????. New File System Details="Support large file size (Greater than 2 GB)". Enter Mount point=/Mount_point. Unselect "Honor setuid" & "Read only". Select "Create mount point" & "Add to file system table". Click Next.

12. Check your selections in the final screen. When you are satisfied with your choices, click Finish. By clicking the Previous button, you can go back and make changes before you click Finish.

sks
A rigid mind is very sure, but often wrong. A flexible mind is generally unsure, but often right.
Reynaldo Torres
Advisor

Re: Creating a volume group using Veritas Volume Manager.

Good morning to everyone who replied to my question, I really appreciated all the help you have provided to me. I hope this information would be more than enough to create a volume group using veritas.

Thanks again,

RT.
Reynaldo Torres
Ralph Grothe
Honored Contributor

Re: Creating a volume group using Veritas Volume Manager.

Hi Reynaldo,

I only dare to reply because I've seen that all the other replies suggested use of VEA.
Especially as you begin exploring VxVM this is probably the best thing to do, using the GUI.
But me being more friend with the command line I would like to try to tell you the commands you could use.
However, I have to mention that this is based on the VxVM implementation on Solaris, because on HP-UX we use LVM (why would you want to pay extra license fees for a dear product that's unlike HP-UX's LVM piggypacked on the OS?), whereas on Sparc boxes we use VxVM.

1) You have to initialize a new disk.

In Solaris context this means that you need to place a valid VTOC on the disk that has at least still one cylinder unallocated and 2 slices unused.
VxVM needs this to place its private region there.
On Solaris these prerequisites are fulfilled by labeling the disk by the format command.
But I cannot tell if disk initialization is the same on HP-UX.
Anyway, the command to use would be

/etc/vx/bin/vxdisksetup [-ie] disk_device_address

Alternatively you could use the interactive vxdiskadm command interface.

There are two notions of initialization.
One is encapsulation (i.e. the "-e" option) which preserves all data on the disk but requires two reboots (VxVM then maps partitions into plexes into volumes).
The other would be pure initializaion by "-i".
But be warned, similar to LVM's pvcreate this erases all data on the disk!
But at least it doesn't require a reboot ;-)

Since I haven't a sample disk around let me first unitialize one, so don't get confused.

The vxdisk command can list all disk VxVM can see, and shows you if they are under its reign.

# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c0t0d0s2 sliced rootdsk0 rootdg online
c0t1d0s2 sliced rootdsk1 rootdg online
c2t0d0s2 sliced aul01 aulak01 online
c2t0d1s2 sliced - - online
c2t0d2s2 sliced aul06 aulak06 online
c2t0d3s2 sliced aul07 aulak07 online
c2t0d4s2 sliced aul10 aulak10 online
c2t0d5s2 sliced aul14 aulak14 online
c2t0d6s2 sliced aul16 aulak16 online
c2t0d7s2 sliced aul18 aulak18 online
c2t0d8s2 sliced aul19 aulak19 online
c2t0d9s2 sliced aul03 aulak03 online
c2t0d10s2 sliced aul11 aulak11 online
c2t0d11s2 sliced aul13 aulak13 online
c2t0d12s2 sliced aul17 aulak17 online
c2t0d13s2 sliced aul05 aulak05 online
c2t0d14s2 sliced - - online
c2t0d15s2 sliced - - online

As you can see, all are online, which means already initilized.
But I think the last one hasn't been used yet by a disk group.
Let's see.

# vxdisk list c2t0d15s2
Device: c2t0d15s2
devicetag: c2t0d15
type: sliced
hostid:
disk: name= id=1073900148.1415.salesch
group: name= id=1073900286.1418.salesch
flags: online ready private autoconfig
pubpaths: block=/dev/vx/dmp/c2t0d15s4 char=/dev/vx/rdmp/c2t0d15s4
privpaths: block=/dev/vx/dmp/c2t0d15s3 char=/dev/vx/rdmp/c2t0d15s3
version: 2.2
iosize: min=512 (bytes) max=256 (blocks)
public: slice=4 offset=0 len=14414400
private: slice=3 offset=1 len=4063
update: time=1073908243 seqno=0.17
headers: 0 248
configs: count=1 len=2976
logs: count=1 len=451
Defined regions:
config priv 000017-000247[000231]: copy=01 offset=000000 enabled
config priv 000249-002993[002745]: copy=01 offset=000231 enabled
log priv 002994-003444[000451]: copy=01 offset=000000 enabled
Multipathing information:
numpaths: 2
c2t0d15s2 state=enabled
c3t0d15s2 state=enabled

As you can see from the name= attribute at the group: tag, it doesn't belong to a group.

On the contrary a used one has a set attribute.

# vxdisk list c2t0d13s2|grep ^group:
group: name=aulak05 id=1075813802.1569.salesch

Ok, I have to unitialize the unused disk for demo.

# vxdiskunsetup c2t0d15

Now the vxdisk list should show it as unused

# vxdisk list
DEVICE TYPE DISK GROUP STATUS
c0t0d0s2 sliced rootdsk0 rootdg online
c0t1d0s2 sliced rootdsk1 rootdg online
c2t0d0s2 sliced aul01 aulak01 online
c2t0d1s2 sliced - - online
c2t0d2s2 sliced aul06 aulak06 online
c2t0d3s2 sliced aul07 aulak07 online
c2t0d4s2 sliced aul10 aulak10 online
c2t0d5s2 sliced aul14 aulak14 online
c2t0d6s2 sliced aul16 aulak16 online
c2t0d7s2 sliced aul18 aulak18 online
c2t0d8s2 sliced aul19 aulak19 online
c2t0d9s2 sliced aul03 aulak03 online
c2t0d10s2 sliced aul11 aulak11 online
c2t0d11s2 sliced aul13 aulak13 online
c2t0d12s2 sliced aul17 aulak17 online
c2t0d13s2 sliced aul05 aulak05 online
c2t0d14s2 sliced - - online
c2t0d15s2 sliced - - error

You can see the error state.

So that is now where you would start.

# vxdisksetup -i c2t0d15

# vxdisk list|grep c2t0d15
c2t0d15s2 sliced - - online

Now you have to decide whether to add it to an existing disk group (dg) (e.g. your rootdg), or create a new dg.

Let's create a new dg.
I name it for convenience "my_dg" and give it the media access name "my_ma" (choose names of your liking)

# vxdg init my_dg my_ma=c2t0d15

It should now appear as new dg

# vxprint -g my_dg -ht
DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO

dg my_dg default default 97000 1077213875.1684.salesch

dm my_ma c2t0d15s2 sliced 2623 14415840 -


Now you can create a volume in this dg.

Just like with LVM's lvcreate command you can specify in one go the size the volume should become.

Say we make it 500 MB big, and call it "my_vol".

# vxassist -g my_dg make my_vol 500m

# vxprint -g my_dg -ht
DG NAME NCONFIG NLOG MINORS GROUP-ID
DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE
RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL
RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK
V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE
PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE
SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE
SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE
DC NAME PARENTVOL LOGVOL
SP NAME SNAPVOL DCO

dg my_dg default default 97000 1077213875.1684.salesch

dm my_ma c2t0d15s2 sliced 2623 14415840 -

v my_vol - ENABLED ACTIVE 1024000 SELECT - fsgen
pl my_vol-01 my_vol ENABLED ACTIVE 1025280 CONCAT - RW
sd my_ma-01 my_vol-01 my_ma 0 1025280 0 c2t0d15 ENA


As you can see VxVM already enabled it,
which means it's ready for filesystem creation or can be used as a raw device.

Btw, you can narrow vxprint's output.
E.g. only display volumes in a disk group.

# vxprint -g my_dg -v
TY NAME ASSOC KSTATE LENGTH PLOFFS STATE TUTIL0 PUTIL0
v my_vol fsgen ENABLED 1024000 - ACTIVE - -

Now make a Veritas Filesystem on it.

# mkfs -F vxfs /dev/vx/rdsk/my_dg/my_vol
version 5 layout
1024000 sectors, 512000 blocks of size 1024, log size 1024 blocks
unlimited inodes, largefiles not supported
512000 data blocks, 510784 free data blocks
16 allocation units of 32768 blocks, 32768 data blocks
last allocation unit has 20480 data blocks


Finally, do an fs check and mount it.

# fsck -F vxfs -y /dev/vx/rdsk/my_dg/my_vol
file system is clean - log replay is not required

# mount -F vxfs /dev/vx/dsk/my_dg/my_vol /my_mnt

# df -k /my_mnt
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/my_dg/my_vol
512000 1237 478848 1% /my_mnt


I had to use the df command because Solaris doesn't know bdf.

For the rest please read the excelent documentation which you can download for free from Veritas.

HTH
Ralph






Madness, thy name is system administration
Reynaldo Torres
Advisor

Re: Creating a volume group using Veritas Volume Manager.

Ralph, I really appreciated your message about using Veritas Logical Volume. It would really help because I have tried to use the GUI, but somehow everytime I tried to create a new disgroup or volume group it gives me an error; therefore any information I can get will be really helpful. You are like me, I like to use more the command line in order to create my volumes, and so far I have been successfully using LVM. If for any reason, I can not create the volume using veritas then I will use LVM. Basically, I would like to learn more about veritas, but if I can not do it, I will stick with LVM. Thank you very much for your respond, and really deserve your points.

Regards,

Reynaldo A. Torres
Reynaldo.Torres@Craneaerospace.com
Reynaldo Torres
Reynaldo Torres
Advisor

Re: Creating a volume group using Veritas Volume Manager.

Thanks again guys for all your help.

RT.
Reynaldo Torres