Operating System - HP-UX
1755744 Members
3629 Online
108837 Solutions
New Discussion юеВ

Volume Groups, how to change

 
SOLVED
Go to solution
Cindy Wolford
Frequent Advisor

Volume Groups, how to change

HP UX 10.20

I have /dev/vg01/lvol1 and it shows four 4.3Gb disks (16Gb of disk space). Now vg01 is mirrored and only has the one lvol1. So, in reality, I have 8Gb of disk space for /dev/vg01/lvol1.

If I do a bdf, I see /dev/vg01/lvol1 as 4Gb total. So, I went into SAM and began researching this.

SAM shows the following:
Logical Volume Size = 8184
Extent Size = 4
Shows my 4 disks with Logical and Physical for each disk as 4092

Physical Volumes = 4
Logical Volumes = 1

How can I go about expanding this lvol1 to show 8Gb since it appears that I have this much space available to me?

TIA,
CIN
6 REPLIES 6
Jesper Sivertsen
Frequent Advisor

Re: Volume Groups, how to change

Hi David

You have to understand that the disks belongs to the VolumenGroup, Size 16 Gb.
The lvol1 is created whitin the VolumenGroup.
Since the lvol is mirroed, it is using 2 x 4 Gb = 8 Gb. 4 Gb for each mirror. The mirroring is done as if you had 2 lvols that had the same size.
Ig you look at the VolumeGroup there should be about 8 Gb free.
By the way, the PEs and the LEs are 4 MB each.

Hope this help you a litle.
Best regards
Jesper
All in unix is files
Andreas Voss
Honored Contributor

Re: Volume Groups, how to change

Hi,

possibly you have extend your log. volume but NOT the filesystem.
If so extend the filesystem for vxfs with:
extendfs -F vxfs /dev/vg01/rlvol1
for hfs:
extendfs -F hfs /dev/vg01/rlvol1
You have to umount the filesystem before you can use the extendfs command.
After extending mount the filesystem.

Regards

Andrew
Andy Monks
Honored Contributor

Re: Volume Groups, how to change

Hi Cindy.

Sounds like the lvol is 8gb, but the filesystem is only 4gb.

Assuming it's a vxfs (jfs) filesystem and you don't have advanced jfs loaded, you'll need to umount the filesystem and then run the extendfs (or fsadm) command.
Tim Malnati
Honored Contributor

Re: Volume Groups, how to change

It appears that the logical volume is fine from a partition point of view. I suspect that the file system needs to be extended in order to see the additional space allocated to it. If you have Online JFS, you can do this online with the fsadm command. If you don't have this optional product you will need to unmount the file system and extend the file system with extendfs.
John Palmer
Honored Contributor
Solution

Re: Volume Groups, how to change

It sounds to me as if the logical volume (and filesystem) were originally created as 4Gb and subsequently the volume has been extended but not the filesystem.

The way in which you extend your filesystem to the size of it's logical volume depends on whether you have the optional software 'Online JFS' installed.

If you have then you can extend online with 'fsadm' (see man fsadm)

If not then you need to:-
- unmount the filesystem
- extendfs -F /dev/vg01/rlvol1
- remount the filesystem

Hope this helps,
John
James R. Ferguson
Acclaimed Contributor

Re: Volume Groups, how to change

David:

1. You can use SAM to extend the logical volume.

2. If the filesystem isn't JFS (or you don't have online-JFS):

# umount /dev/vg01/lvol1
# /usr/sbin/lvextend -L /dev/vg01/lvol1
(where n=the new size you want in MB)
# extendfs /dev/vg01/rlvol1
# mount /dev/vg01/lvol1 /your_mountpoint

3. If you have online JFS and the filesytem is of this type:

# lvextend -L /dev/vg01/lvol1
# fsadm -b /your_mountpoint
(where n=the new zize you want in MB)
(where blocks=the number of 1K blocks where 1K=1024, so if n=100 then blocks=102400)

...JRF...