Operating System - HP-UX
1834163 Members
2551 Online
110064 Solutions
New Discussion

create volume group and 2 logical volumes on 2nd disk

 
Nik
Advisor

create volume group and 2 logical volumes on 2nd disk

Hi,
I'm not that clued up on LVM, but I'm trying to create a new volume group on a second disk.. when I use SAM I can select to create new VG, and it finds the new disk, I then try and create the VG with 2 logical volumes, lvol1, lvol2 (now these are already exist on vg00 /dev/vg00/lvol1 /dev/vg00/lvol2. When I have configured each logical volume, (1st one is 1024 Swap @ pri 1, second one is rest of disk as F/S) it then says 'creating...' but then errors with 'lvol2 already exists' and it creates both entries in the Logical Volume list in SAM but they both say unused...

Any ideas please! thanks.

Nik
3 REPLIES 3
Dan Hetzel
Honored Contributor

Re: create volume group and 2 logical volumes on 2nd disk

Hi Nik,

What you could try is to come back to a cleaner situation and start over again.

/usr/sbin/lvremove -f /dev/vg01/lvol1
/usr/sbin/lvremove -f /dev/vg01/lvol2
/usr/sbin/vgremove /dev/vg02

Make sure that when creating a new FS logical volume you have a unique mount point.

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Dan Hetzel
Honored Contributor

Re: create volume group and 2 logical volumes on 2nd disk

.../usr/sbin/vgremove /dev/vg01 of course !

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Richard Drolet
New Member

Re: create volume group and 2 logical volumes on 2nd disk

Wow you description scares me. I would not advise you to touch /dev/vg00/lvol2 for this is your swap area.

If I understand your question correctly, you are trying to add a new disk to and existing Volume group or a new one ?

If your goal is to extend your current partitions, you must do:

pvcreate -f /dev/rdsk/cxtxdx on new disk
vgextend /dev/vgxx /dev/dsk/cxtxdx
[extending ex. vg00 with new disk]
than you can either extend your current partitions or create new ones.

lvextend -L (Total size Mb) /dev/vgxx/lvolyy
extendfs -F (vxfs/hfs) /dev/vgxx/rlvolyy

[or create a new file partition]
lvcreate -L (Total size Mb) /dev/vgxx/lvolyy
newfs -F (vxfs/hfs) /dev/vgxx/rlvolyy


If your goal was just to add a new VG on new disk:

pvcreate like up above
cd /dev
mknod group c 64 0x0?0000 where ? is seq. number usually matching vg#
ie. mknod group x 64 0x010000 for vg01
vgcreate /dev/vgyy /dev/dsk/cxtxdx
lvcreate -L (#Mb) /dev/vgyy
lvcreate -L (#Mb) /dev/vgyy
[should create 2 partitions lvols]
newfs -F (vxfs/hfs) /dev/vgyy/rlvolzz
newfs -F (vxfs/hfs) /dev/vgyy/rlvolzz


I'd rather be Flying