Operating System - HP-UX
1830908 Members
1783 Online
110017 Solutions
New Discussion

Re: Increasing Filesystem Space!!

 
SOLVED
Go to solution
sara1
Occasional Advisor

Increasing Filesystem Space!!

HI,
I am new to HP.
In a system I have some filesystems which are almost 100% utilized. I need to increase the filesystem capacity by at least 50%.
I dont have space left in the volume group.
Can any body please help.
VG Name /dev/vgp_d1
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 28
Open LV 28
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 26019
VGDA 4
PE Size (Mbytes) 4
Total PE 34686
Alloc PE 34280
Free PE 406
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

22 REPLIES 22
MarkSyder
Honored Contributor

Re: Increasing Filesystem Space!!

If you have no spare capacity in the vg you have three options:

1. look for redundant files (e.g. old log files) in the filesystem and delete them to free space

2. replace the disc with a larger one

3. add a second disc to the vg.

My preference would be for option 1 - only consider options 2 and 3 if you can't free enough space.

Run the command:

du -k|sort -k1,1nr|pg

to see which directories are taking up most space. cd to the directories one at a time and run:

ll|sort -k5,5nr|pg

to see the largest files.

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
Eric Antunes
Honored Contributor

Re: Increasing Filesystem Space!!

Hi Sara,

If you have Online JFS it is easy to do via SAM. If you do not have it, check this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=618355

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Mark Nieuwboer
Esteemed Contributor

Re: Increasing Filesystem Space!!

Hi Sara1,

Do you have online JFS.
Futher more how big is the filesystem
How is your lv build.
can you post vgdisplay -v vgp_dp1
and tel which filesystem has to be increased.
df -k filesystem.

grtz. Mark
Sivakumar TS
Honored Contributor

Re: Increasing Filesystem Space!!

Dear Sara,

As you have 406PEs free and each PE is 4 MB in this VG, you can extend the filesystem to another 1600MB.

you can use

#lvextend -L

Latter you can use #extendfs to grow the filesystem.

With Regards,

Siva.

Nothing is Impossible !
Muthukumar_5
Honored Contributor

Re: Increasing Filesystem Space!!

which file system do you want to increase? Is it / or swap or any other file system?

For root and root swap you have to newly create file system.

Other file system,

If it is having onlineJFS support then using lvextend you can increase the size,

else unmount the file system and increase size. Then mount the file system back.

--
Muthu
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: Increasing Filesystem Space!!

Example for file system extend is available in lvextend man page as,

Increase the size of a file system existing on a logical volume.

First, increase the size of the logical volume.

lvextend -L 400 /dev/vg06/lvol3

Unmount the file system.

umount /dev/vg06/lvol3

Extend the file system to occupy the entire (larger) logical volume.

extendfs /dev/vg06/rlvol3

Remount the file system.

mount /dev/vg06/lvol3 /mnt

--
Muthu
Easy to suggest when don't know about the problem!
Devender Khatana
Honored Contributor

Re: Increasing Filesystem Space!!

Hi,

You still have 406*4=1624MB free space in the vg. Is this space enough for your requirements ? If not then do you have some space / unused disk ? In both the above case you can extend the file systems.

Case 1 (Within existing space)

1. unmount the file system which is required to be extended.

2. #lvextend -l xxxx /dev/vgp_d1/lvol_name

Where xxxx is the PE number of the lvol after extending and lvol_name is the device file name.

3. #extendfs -F vxfs /dev/vgp_d1/rlvol_name

4. #mountall

5. #bdf to confirm the new size and utilization.

Case 2 ( by adding another disk to VG)

1. #pvcreate /dev/rdsk/cxtydz
(Where /dev/rdsk/cxtydz is the new disk. Max. should not be of more than 104GB otherwise only 104GB can be used rest will be waste.

2. #vgextend /dev/vgp_d1 /dev/dsk/cxtydz

Followed by these two steps follow the steps in case 1.

Also if you have online JFS installed, you will not be required to unmount the file systems and instead of extendfs use fsadm command.

Repeat the procedure for multiple file systems if required.

HTH,
Devender
Impossible itself mentions "I m possible"
sara1
Occasional Advisor

Re: Increasing Filesystem Space!!

HI,
There is no space in the volume group.
So what needs to be done.

sara1
Occasional Advisor

Re: Increasing Filesystem Space!!

There is no space in VG.
Can you tell me what needs to be done in this case.
Arunvijai_4
Honored Contributor

Re: Increasing Filesystem Space!!

Then, you need to add more disks to your VG. If you do so, you will get more space to allocate.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
MarkSyder
Honored Contributor

Re: Increasing Filesystem Space!!

Please see my original reply - if possible, you should release space by deleting redundant files. Only if you can't release enough space for your needs do you need to consider a new disc.

Mark
The triumph of evil requires only that good men do nothing
Devender Khatana
Honored Contributor

Re: Increasing Filesystem Space!!

Hi,

The details provided by you show that there is still 1.6GB of free space in the VG. But if tat do not fulfill your requirements of the expansion you can follow the case 2 mentioned in my earlier post which includes adding another disk to the VG and if no space disk is there in the system then adding it to system as well.

HTH,
Devender
Impossible itself mentions "I m possible"
Henk Geurts
Esteemed Contributor
Solution

Re: Increasing Filesystem Space!!

add the new disks to the system.
insf -e
ioscan -fnCdisk
pvcreate
vgextend
lvextend
fsadm

done.!
Henk Geurts
Esteemed Contributor

Re: Increasing Filesystem Space!!

add the new disks to the system.
insf -e
ioscan -fnCdisk
pvcreate
vgextend
lvextend
fsadm

done.!
with all the correct parameters of cource
sara1
Occasional Advisor

Re: Increasing Filesystem Space!!

How can i check if there is any free disk in the system.
Mark Nieuwboer
Esteemed Contributor

Re: Increasing Filesystem Space!!

ioscan -fnC disk

grtz. Mark
Devender Khatana
Honored Contributor

Re: Increasing Filesystem Space!!

Hi,

SAM->Disks and File Systems->Disk Devices

See for unused under use tab.

If the system has no uncooked file system, whole disk is not used for swap and only LVM is used for disk management then the information will be correct.

Also take some time to assign points to the responses to your threads.

HTH,
Devender
Impossible itself mentions "I m possible"
sara1
Occasional Advisor

Re: Increasing Filesystem Space!!

from ioscan -fnC disk how can i know if its free
Devender Khatana
Honored Contributor

Re: Increasing Filesystem Space!!

Hi,

Take the output of

#ioscan -fnC disk

&

#strings /etc/lvmtab

The disks listed in first output and not present in the second are the free ones. The exceptions mentioned in earlier post also apply here.

Also in the first output it will also list DVD-ROM which you should not consider.

HTH,
Devender
Impossible itself mentions "I m possible"
so_2
Regular Advisor

Re: Increasing Filesystem Space!!

compare the output of iosacn with the output of the below command.

#strings /etc/lvmtab

if the any disc prsent in the ioscan output is not avail in the second commands outputs they might be free or unused.

shinoj
khilari
Regular Advisor

Re: Increasing Filesystem Space!!

Hi Sara, well it seems as if you have 406 pvextents left and ur total were 34686. In order for u to increase the size by 50% u need 34686 / 2 = 17343 therefore, there is no way u can increase ur filesystem size by 50%. Ya, if u extend ur file system then by getting more space u should be able to achieve that. Now, the command bdf will tell u how much space ur file system have utilized.
The file systems in hp work like this.
pvcreate -f /dev/rdsk/c0t1d0 // ioscan -fnC disk will tell u which disks are claimed or not, the ones that are not claimed u can pvcreate on that one.
then u make a volume group and its group file and then put lvm on it.After that u put a file system on it and then mount it on a directory. Now, if u want to increase the size, u can either do by fsadm if u have online jfs installed. If not then do it by first unmounting the file system and then vgextend by putting another disk on it and then lvextend after that. But, in ur case u dont have another disk so i guess u should remove some files from ur primary file system ( i think u r practicing on a single user workstation) go to the /tmp file system and try triming some files from there. Or for that matter from any other of ur filesystems. Why dont u try practicing mounting and unmounting the file systems u have. A good practice is to make only one file system ( because ur resources are limited) and then increase, and decrease its size and after every change monitor it using bdf or lvdisplay ,pvdisplay. That way u will know how to play around with LVM.
Hope this helps, take care