Operating System - HP-UX
1836582 Members
1626 Online
110102 Solutions
New Discussion

bdf misreporting logical volume size?

 
SOLVED
Go to solution
bill_allen
Frequent Advisor

bdf misreporting logical volume size?

I have set up a new mirrored logical volume on my HP 2100 disk array.
The array is 10 disks, 5 per controler. I set up two PVG in the
/etc/lvmtab file and then did the lvcreate -l 21700 -m 1 -s g vg01 to
create the mirror. I told it to use all the PE available so I would
end up with one big 0+1 mirror arrangement. Which is confirmed by
lvdisplay and also vgdisplay. So, I should have an 86Gb logical
volume. However, bdf only reports it as 10Gb. This is an 11iv1
system. Which is correct? Is this a limitiation of bdf, how I
mounted the volume, or something else?


# lvdisplay -v /dev/vg01/lvol1 | more
--- Logical volumes ---
LV Name /dev/vg01/lvol1
VG Name /dev/vg01
LV Permission read/write
LV Status available/syncd
Mirror copies 1
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 86800
Current LE 21700
Allocated PE 43400
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation PVG-strict
IO Timeout (Seconds) default

--- Distribution of logical volume ---
PV Name LE on PV PE on PV
/dev/dsk/c4t0d0 4340 4340
/dev/dsk/c4t2d0 4340 4340
/dev/dsk/c4t4d0 4340 4340
/dev/dsk/c4t8d0 4340 4340
/dev/dsk/c4t10d0 4340 4340
/dev/dsk/c6t0d0 4340 4340
/dev/dsk/c6t2d0 4340 4340
/dev/dsk/c6t4d0 4340 4340
/dev/dsk/c6t8d0 4340 4340
/dev/dsk/c6t10d0 4340 4340

# vgdisplay -v vg01 | more
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 10
Act PV 10
Max PE per PV 4342
VGDA 20
PE Size (Mbytes) 4
Total PE 43400
Alloc PE 43400
Free PE 0
Total PVG 2
Total Spare PVs 0
Total Spare PVs in use 0

--- Logical volumes ---
LV Name /dev/vg01/lvol1
LV Status available/syncd
LV Size (Mbytes) 86800
Current LE 21700
Allocated PE 43400
Used PV 10

# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 204800 145339 55753 72% /
/dev/vg00/lvol1 99669 39417 50285 44% /stand
/dev/vg00/lvol6 2097152 1410528 643747 69% /var
/dev/vg00/lvol5 2097152 1486392 572619 72% /usr
/dev/vg00/lvol4 512000 208009 285018 42% /tmp
/dev/vg00/lvol8 5394432 1875159 3299347 36% /opt
/dev/vg00/lvol7 20480 1317 17968 7% /home
/dev/vg01/lvol1 10137600 15062 9817856 0% /disk1

# cat /etc/fstab
/dev/vg00/lvol3 / vxfs delaylog 0 1
/dev/vg00/lvol1 /stand hfs defaults 0 1
/dev/vg00/lvol4 /tmp vxfs delaylog 0 2
/dev/vg00/lvol5 /usr vxfs delaylog 0 2
/dev/vg00/lvol6 /var vxfs delaylog 0 2
/dev/vg00/lvol7 /home vxfs delaylog 0 2
/dev/vg00/lvol8 /opt vxfs delaylog 0 2
/dev/vg01/lvol1 /disk1 vxfs delaylog 0 2
4 REPLIES 4
Patrick Wallek
Honored Contributor
Solution

Re: bdf misreporting logical volume size?

Your LV size is correct. However, bdf does NOT show the size of the LV, it shows the size of the filesystem created on the LV. So if you accidentally created your filesystem too small, the that is what bdf would report.

There are a few things you could try:

1) If you have Online JFS installed, use the 'fsadm' command to extend the filesystem: fsadm -b 86800m /disk1

2) If you don't have Online JFS, umount the LV, then run extendfs on it (see the man page, I don't remember the exact syntax) to extend the FS, then remount it.

3) Unmount the filesystem and use 'newfs' to completely recreate the filesystem on the LV, then remount it.

Now see what 'bdf' reports.
Johnny Damtoft
Regular Advisor

Re: bdf misreporting logical volume size?

If you are creating the filesystem, you need to make sure that your VG is ready to use distributed and PVG-strict.

I use this url for ref.:
http://www.knowledgeroot.dk/hp-ux/lvm/creating-volume-group-and-logical-volume-with-distributed-and-pvg-strict/

# umask 137
# mkdir /dev/vg[NAME]
# ls -ld /dev/vg*/group | sort -k6,6
# mknod /dev/vg[NAME]/group c 64 0Ã 0?0000

# vgcreate -p 128 -e 30000 -s 32 -g pvg[NUMBER] /dev/vg[NAME] /dev/dsk/c#t#d#

vgextend -g pvg[NUMBER] /dev/vg[NAME] /dev/dsk/c9t0d0 /dev/dsk/c11t0d0 /dev/dsk/c9t0d1 ...

- Do the vgextend for both PVG's

# lvcreate -D y -s g -n lvol1 -r N /dev/vg01
# lvextend -L 32 /dev/vg01/lvol1 pvg01 pvg02
# lvextend -m 1 /dev/vg01/lvol1 pvg01 pvg02
# lvextend -L 40960 /dev/vg01/lvol1
# newfs -F vxfs -b 1024/8192 -o largefiles /dev/vg01/rlvol1

The "-b" option, is the block size. I use 1024 for standard filesystem, and 8192 for heavy-used filesystems like oracle, sap etc.

# vi /etc/fstab
/dev/vg01/lvol1 /data/apps vxfs rw,suid,largefiles,mincache=direct,convosync=direct,delaylog,nodatainlog 0 2

# mount -a


-- Johnny Damtoft
Rasheed Tamton
Honored Contributor

Re: bdf misreporting logical volume size?

Can you do this command:

#mkfs -F vxfs -m /dev/vg01/lvol1
mkfs -F vxfs -o ninode=unlimited,bsize=1024,version=6,inosize=256,logsize=16384,largefiles /dev/vg01/lvol1 15360000

-m will display the command line that was used to create the file system. The file system must already exist. This option provides a means of determining the parameters used to construct the file system.

The last value (15360000 in the above) will show you the size of the FS in KB. It it still shows 10137600, then you have to extend the FS using fsadm (online jfs) or with extendfs (without online jfs).

#bdf /dev/vg01/lvol1

bill_allen
Frequent Advisor

Re: bdf misreporting logical volume size?

Thanks for the help everyone. extendfs did it for me. :-))

#umount /dev/vg01/lvol1
#extendfs -F vxfs /dev/vg01/rlvol1
#mount -a