Operating System - HP-UX
1832885 Members
2441 Online
110048 Solutions
New Discussion

Confusion on adding new logical volume

 
SOLVED
Go to solution
AMI_5
Advisor

Confusion on adding new logical volume

Hi @all,

we are running a HP-UX 11.11 server with 2x HP 36.4GST Disk Devices which are working in RAID1.

The devices are configured as:
0/0/1/1.15.0 1 LVM vg00 34732 HP 36.4GST33..
0/0/2/1.15.0 1 LVM vg00 34732 HP 36.4GST33..

with following logical volumes:
lvol1 vg00 LVM HFS 304 1 /stand
lvol2 vg00 LVM Swap/Dump 4096 1
lvol3 vg00 LVM VxFS 200 1 /
lvol4 vg00 LVM VxFS 200 1 /tmp
lvol5 vg00 LVM VxFS 24 1 /home
lvol6 vg00 LVM VxFS 1968 1 /opt
lvol7 vg00 LVM VxFS 1936 1 /usr
lvol8 vg00 LVM VxFS 4600 1 /var
lvswap2 vg00 LVM Swap 8192 0

As you can see exactly 21516 MB from vg00 are used of a total of 34732 MB, so only 13216 MB should be available if I want to create a new logical volume, right?!

Now, when I run in SAM->Disk & File Systems-> Create New Logical Volumes->Define New Logical Volume(s) it shows me that "Approx. Free Mbytes" are about 34592 MB. But shouldn't that be the 13216 MB as mentioned above?

The same free MB available is shown in SAM->Disk & File Systems->Volume Groups :
Name |Type|MB Avail.| Phys.Vol|Log.Vol

vg00 LVM 34592 of 69440 2 9

Could someone give me an explanation please? Where do the 34952 MB come from?


Thanks
AMI

P.S:
I haven't set up the server myself!
13 REPLIES 13
Michal Toth
Regular Advisor

Re: Confusion on adding new logical volume

argh,.. SAM :(

post an output of 'vgdisplay -v vg00', then we'll know more
Pete Randall
Outstanding Contributor

Re: Confusion on adding new logical volume

I'm assuming that these two disks are internal and not part of some array. If that is true, then the only way they are going to be operating in RAID 1 is if they have been set up using MirrorDisk/UX. To check if that is the case, run:

# lvdisplay /dev/vg00/lvol? |grep -i "mirror copies"

You should see:

Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1

Then run:

# swlist |grep -i mirror

You should see:

B2491BA B.11.11 MirrorDisk/UX

If either of these does not return the expected results, you don't have RAID1 set up and that is where all your free space is showing up.


Pete

Pete
Pete Randall
Outstanding Contributor

Re: Confusion on adding new logical volume

I'm assuming that these two disks are internal and not part of some array. If that is true, then the only way they are going to be operating in RAID 1 is if they have been set up using MirrorDisk/UX. To check if that is the case, run:

# lvdisplay /dev/vg00/lvol? |grep -i "mirror copies"

You should see:

Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1

Then run:

# swlist |grep -i mirror

You should see:

B2491BA B.11.11 MirrorDisk/UX

If either of these does not return the expected results, you don't have RAID1 set up and that is where all your free space is showing up.


Pete

Pete
Jaime Bolanos Rojas.
Honored Contributor

Re: Confusion on adding new logical volume

AMI,

Agreed with the advice above, run the vgdisplay on vgoo,

You will see something like this:

VG Status available
Max LV 255
Cur LV 10
Open LV 10
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 4350
VGDA 2
PE Size (Mbytes) 8
Total PE 4340
Alloc PE 2946
Free PE 1394
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

You want to check the free PE and multiply that number for the PE size to know the available size that you have to create another logical volume.

Regards,

Jaime.
Work hard when the need comes out.
Pete Randall
Outstanding Contributor

Re: Confusion on adding new logical volume

Sorry about the double post. The first one timed out so I submitted again.


Pete

Pete
AMI_5
Advisor

Re: Confusion on adding new logical volume

@Pete:

RAID1 is set "correctly":

(root@TEST) / #lvdisplay /dev/vg00/lvol? |grep -i "mirror copies"
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
Mirror copies 1
(root@TEST) / #swlist |grep -i mirror
B2491BA B.11.11 MirrorDisk/UX



@Michal:

(root@ESCODEV1) / #vgdisplay -v vg00
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 9
Open LV 9
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 8
Total PE 8680
Alloc PE 4356
Free PE 4324
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg00/lvol1
LV Status available/syncd
LV Size (Mbytes) 304
Current LE 38
Allocated PE 76
Used PV 2

LV Name /dev/vg00/lvol2
LV Status available/syncd
LV Size (Mbytes) 4096
Current LE 512
Allocated PE 1024
Used PV 2

LV Name /dev/vg00/lvol3
LV Status available/syncd
LV Size (Mbytes) 200
Current LE 25
Allocated PE 50
Used PV 2

LV Name /dev/vg00/lvol4
LV Status available/syncd
LV Size (Mbytes) 200
Current LE 25
Allocated PE 50
Used PV 2

LV Name /dev/vg00/lvol5
LV Status available/syncd
LV Size (Mbytes) 24
Current LE 3
Allocated PE 6
Used PV 2

LV Name /dev/vg00/lvol6
LV Status available/syncd
LV Size (Mbytes) 1968
Current LE 246
Allocated PE 492
Used PV 2

LV Name /dev/vg00/lvol7
LV Status available/syncd
LV Size (Mbytes) 1936
Current LE 242
Allocated PE 484
Used PV 2

LV Name /dev/vg00/lvol8
LV Status available/syncd
LV Size (Mbytes) 4600
Current LE 575
Allocated PE 1150
Used PV 2

LV Name /dev/vg00/lvswap2
LV Status available/syncd
LV Size (Mbytes) 8192
Current LE 1024
Allocated PE 1024
Used PV 1
--- Physical volumes ---
PV Name /dev/dsk/c1t15d0
PV Status available
Total PE 4340
Free PE 1650
Autoswitch On

PV Name /dev/dsk/c3t15d0
PV Status available
Total PE 4340
Free PE 2674
Autoswitch On
Jaime Bolanos Rojas.
Honored Contributor

Re: Confusion on adding new logical volume

AMI,

According to your vgdisplay, your available space is 34592MB.

Regards,

Jaime.
Work hard when the need comes out.
AMI_5
Advisor

Re: Confusion on adding new logical volume

So Raid1 is working but how comes that the Free PE 2674 for each physical volume differs?

Does it mean that the RAID is not working "correctly" and something is wrong or can I just go ahead and create my new logical volume?

AMI

P.S: Thanks for the fast replies!!!
Jaime Bolanos Rojas.
Honored Contributor
Solution

Re: Confusion on adding new logical volume

AMI,

You have to remember that RAID 1 in LVM is done at the logical volume level and not at the disk level.

If one drive got more space available than the other, then most likely not all logical volumes are mirrored, you would have to run an lvdisplay on each of your logical volumes to confirm. I believe all should be fine, most likely not all LV's are mirrored.

I believe you can go ahead and create your new LV.

Regards,

Jaime.
Work hard when the need comes out.
Pete Randall
Outstanding Contributor

Re: Confusion on adding new logical volume

You have 9 logical volumes, only 8 of which are mirrored - that is where the difference lies.


Pete

Pete
Michal Toth
Regular Advisor

Re: Confusion on adding new logical volume

yep, indeed - /dev/vg00/lvswap2 is not mirrored, so the difference between free PE on physical volumes should be exactly the size of this lvol (in PE).
AMI_5
Advisor

Re: Confusion on adding new logical volume

Thanks for the help!!!!
I got confused with lv and disk level mirroring.

AMI
AMI_5
Advisor

Re: Confusion on adding new logical volume

Solved!