Operating System - HP-UX
1833779 Members
2114 Online
110063 Solutions
New Discussion

Re: full filesystem & LV group, can I use another LV

 
Kerry McGinn
New Member

full filesystem & LV group, can I use another LV

I have run out of filesystem space(u01)and Logical volume space on one volume group (vg00). THere are two other volume groups that have plenty of space. I wanted to shrink one of the other logical groups. DO I need to shrink the filesystem also before shrinking logical volume? I'm not sure how this works. I'm more familiar with AIX than HP. A BDF is listed below. Any advice/recommendations are greatly appreciated.


Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 409600 202912 205104 50% /
/dev/vg00/lvol1 311296 180056 130264 58% /stand
/dev/vg00/lvol8 4710400 1438896 3246480 31% /var
/dev/vg00/lvol7 5554176 2680176 2851616 48% /usr
/dev/vg02/lvol11 35553280 16889558 17497495 49% /u03
/dev/vg01/lvol10 35553280 10866852 23143831 32% /u02
/dev/vg00/lvol9 10248192 10086453 151687 99% /u01
/dev/vg00/lvol4 204800 9264 194648 5% /tmp
/dev/vg00/lvol6 3366912 2362960 996152 70% /opt
/dev/vg00/lvol5 5636096 5056336 576584 90% /home
6 REPLIES 6
Torsten.
Acclaimed Contributor

Re: full filesystem & LV group, can I use another LV

You need to backup a LVOL, delete it, create in a smaller size and restore the data in order to "shrink" it.

After this you can extend the other LVOL followed by extending the file system.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Robert-Jan Goossens
Honored Contributor

Re: full filesystem & LV group, can I use another LV

Hi Kerry,
--
THere are two other volume groups that have plenty of space.
--

Create a new logical volume in vg01 or vg02, mount it on /mnt ,close your application using /u01, cd /u01, cp -pR * /mnt, umount /u01, umount mnt, change the /etc/fstab for u01 and mount u01 again.

Regards,
Robert-Jan
A. Clay Stephenson
Acclaimed Contributor

Re: full filesystem & LV group, can I use another LV

... and you should really get /u01 out of vg00; vg00 should really be restricted to the OS and directly OS-related applications. Putting application software and/or data in vg00 makes system updates/migrations more difficult.
If it ain't broke, I can fix that.
Kerry McGinn
New Member

Re: full filesystem & LV group, can I use another LV

To backup the LVOL, can I tar the entire /u03 filesystem (16Gb used) to /u02. Then I would delete the vg02 volume group, which would kill the /u03 filesystem? create a new LVOL of a smaller size, restore backed up /u03 filesystem. Then re-create /u03 and restore data. I can then resize the /u01 file system using the LVOL space reclaimed from the resize of vg02. DOes this need to be done in single-user mode? I misspoke when I thought there was space on other volume groups, there isn't. vgdisplay below

larry:/u03 > vgdisplay 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 1
Act PV 1
Max PE per PV 4238
VGDA 2
PE Size (Mbytes) 8
Total PE 4228
Alloc PE 4228
Free PE 0
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

larry:/u03 > vgdisplay vg01
--- 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 1
Act PV 1
Max PE per PV 8683
VGDA 2
PE Size (Mbytes) 4
Total PE 8681
Alloc PE 8680
Free PE 1
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

larry:/u03 > vgdisplay vg02
--- Volume groups ---
VG Name /dev/vg02
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 8683
VGDA 2
PE Size (Mbytes) 4
Total PE 8681
Alloc PE 8680
Free PE 1
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
Robert-Jan Goossens
Honored Contributor

Re: full filesystem & LV group, can I use another LV

why not add the disks from vg02 to vg01? You would be more flexible, if you have u01, u02 and u03 in one volume group.

# cd /u03
# tar cvf /u02/u03.tar .
# cd /
# umount /u03
# vgexport vg02
# vgextend /dev/vg01 /dev/dsk/cxtydz /dev/dsk/cxtydz
disks of vg02
# lvcreate -L XXXX /dev/vg01 -n lvol11
# newfs -F vxfs /dev/vg01/rlvol11
change the /etc/fstab
# mount -a
# cd /u03
# tar xvf /u02/u03.tar .
DCE
Honored Contributor

Re: full filesystem & LV group, can I use another LV


Kerry,

Lvols are VG specific, and cannot span multiple VG's

If you are looking for additional space for /u01, you will have to find it in vg00.

That being said it is not good practice to place application data in vg00. The OS should be independent of the data.......