System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

File system size full and want to increase it on HP UX 11iv2

SOLVED
Go to solution
Nidhi Thakur
Occasional Visitor

File system size full and want to increase it on HP UX 11iv2

Hi All,
I am very new to LVM on HP UX but I've to increase the /home file system size 70000MB to 71000MB as it had been full. This /home file system is being used for oracle 10g database.Please see the below details:
HPUXTEST04:root:/:> bdf /home
Filesystem kbytes used avail %used Mounted on
/dev/vg01/home 65536000 65536000 0 100% /home
HPUXTEST04:root:/:> swlist -l product | grep -i jfs
JFS B.11.23 The Base VxFS File System
OnlineJFS B.11.23.0505 Online features of the VxFS File Sys
HPUXTEST04:root:/:> vgdisplay -v vg01
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 13
Open LV 13
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 52504
VGDA 2
PE Size (Mbytes) 16
Total PE 52496
Alloc PE 27391
Free PE 25105
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0

LV Name /dev/vg01/home
LV Status available/syncd
LV Size (Mbytes) 70000
Current LE 4375
Allocated PE 4375
Used PV 1


--- Physical volumes ---
PV Name /dev/dsk/c4t0d0
PV Status available
Total PE 52496
Free PE 25105
Autoswitch On
Proactive Polling On


I have gone through some hp lvm documentation and come to know that following steps are required to increase my file system size.
steps:
1)fsadm -d - D -e - E /home
2)lvextend -L 71000 /dev/vg01/home
3)fsadm -b 71000m /dev/vg01/home

Please correct me if I am wrong. Any help on this will be really appreciated. I want your input on the following points as well as I have some doubt:
1) Can I extend this file system size online I mean to say is there any need for unmounting of this /home and extend thte size or I can do it also while oracle database is up and running and accessing this mount point.
2)I am bit confused about fmadm size (71000m) is it correct or not?
3) Before extending the file system size any backup is required or not?
Let me know if more inputs are required.
Thank you much in advance.
regards
Nidhi
11 REPLIES
Javed Khan_1
Valued Contributor

Re: File system size full and want to increase it on HP UX 11iv2

Hi,

you can extend /home by doing


lvextend -L 71000 /dev/vg01/home

fsadm -b 71000m /home

in this case fsadm might fail as /home is 100% full , you might need to try fsadm if it fails by freeing some disk space on /home

Javed
Never Give Up
Steven E. Protter
Exalted Contributor

Re: File system size full and want to increase it on HP UX 11iv2

Shalom,

I don't think you need step 1.

You need for the sake of precision to tell the lvextend command which disk you wish to extend the logical volume to.

lvextend -L

Its not like Linux, you don't need to use the M. You may be able to do that with and updated lvextend command, but I've never done it that way.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: File system size full and want to increase it on HP UX 11iv2

Hi Nidhi:

1. Yes, you can extend your filesystem without unmounting because you have OnlineJFS. HOWEVER, Javed's point is well-taken --- since your filesystem is 100% full there it is highly likely that 'fsadm' will fail since it needs some free space to perform the expansion.

You may be forced to unmount the filesystem; use 'extendfs' to enlarge it; and then remount it.

2. Yes, you want to keep the _magnitude_ of the values in MB to match the magnitude of the 'lvextend' you are doing.

3. A backup is always good insurance should something unforseen happen, although it is strictly not necessary.

Regards!

...JRF...
sujit kumar singh
Honored Contributor
Solution

Re: File system size full and want to increase it on HP UX 11iv2

Hi


OnlineJFS has been one the most SuperHit Products HP has ever released. I have myself used this with a lot of success percentage and i think all would have used it with the same Experience as far as extending FS is concerned.

As per your queries would like to say :
1)yes you can extend online.
#lvextend -L 71000 /dev/vg01/home
but after that do an

#lvdisplay -v /dev/vg01/home
see the Size in MB as that can be different from 71000 MB depending upon the rounding off by the LVM depending upon the PE Size of the VG. Note the Size in MB. say this X MB.
Well I do that converting to KB as
X*1024="Y" KB
#fsadm -b Y /home
2)You can do the same using the m suffix to the size expressed with -b.
#fsadm -b Xm /home
3)I hope your system is well power protected and so you are not going to face a powercut in between and an abrupt power down.
So you can easliy do that without a backup of /home.

regards
sujit


sujit kumar singh
Honored Contributor

Re: File system size full and want to increase it on HP UX 11iv2

Hi Nidhi,

#lvextend -L 71000 /dev/vg01/home shall round off the target size to either 71008 MB or 70992 MB Precisely as the PE size in the VG is 16 MB.
So you can get the Modified Size of the LV /dev/vg01/home not as 71000 MB.

So make sure that before the invocation of the fsadm coammnd to increase the Filesys you have a look at the current LV Size of /dev/vg01/home using the
#lvdisplay /dev/vg01/home.


Or better even to use the lvextend command with
#lvextend -L 71008 /dev/vg01/home
#fsadm -b 71008m /home
regards
sujit
sujit kumar singh
Honored Contributor

Re: File system size full and want to increase it on HP UX 11iv2

Hi
Please have a look at the following thread also.
http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1235337480283+28353475&threadId=961722

I have never done using the m(for Mega Bytes) in the fsadm command but the author of this thread had success using the "M" as he points out in the end.

so can do

#lvextend -L 71008 /dev/vg01/home
#fsadm -b 71008M /home
or if in doubt

#fsadm -b 1032192 /home
that is 71008*1024=1032192

OR

#fsadm -b $((71008 * 1024)) /home


regards
sujit
Sharma Sanjeev
Respected Contributor

Re: File system size full and want to increase it on HP UX 11iv2

Hi Nidhi

It looks like /home FS is 100% Full, so you would not be able to extend it directly.
So 1st you need to move some files from /home
than only you can extend it.

lvextend -L newsize lvname
fsadm -b Size with M

Regards
Sanjeev
Everything is Possible as " IMPOSSIBLE" word itself says I M POSSIBLE
Bill Hassell
Honored Contributor

Re: File system size full and want to increase it on HP UX 11iv2

> fsadm -d - D -e - E /home

This step is not recommended at all. With a 71GB filesystem, this command could take hours and create a major impact on your system. HP-UX is not Windows so the directory and filesystem reorg is very seldom necessary.

I would also recommend analyzing the /home filesystem as it should not be used for applications like Oracle. Oracle should have been installed under /opt and the database files installed on a separate volume (or volumes). /home is fairly important to users and it doesn't make sense to mix the database in with user $HOME directories.

Also, increasing from 70GB to 71GB is a very small change. If you can't move some of the massive data out of /home, I would at least use 75GB and then work on rearranging the files. And of course, user $HOME directories may be full of junk -- use this command to summarize the biggest abusers:

du -kx | sort -rn | head -30


Bill Hassell, sysadmin
Rory Hammond
Occasional Advisor

Re: File system size full and want to increase it on HP UX 11iv2

Along the lines of Bills thoughts about Oracle.

You may also need to manage logs in oracle, which might be the real reason you are having space problems.

We have our oracle systems files in /opt and our Oracle data files some where else.
The data files grow and need to be manage by increasing space.

If you manage your logs, /opt (oracle home) becomes stable and does not grow.

Look for the following type of files in your Oracle home file system and set strategies to manage them:

*.trc *.aud alert*.logs

Rory
There are 100 different ways to accomplish something and 97 of them are correct.
Nidhi Thakur
Occasional Visitor

Re: File system size full and want to increase it on HP UX 11iv2

Thanks much for all who helped me. what happened I moved more than 400MB data from this file system to another file system but all this space has been consumed by oracle database files immediately. Even I was unable to create a file of size 1MB on this file system inspite of moving the 400MB data. (as you people advice fsadm might fail in this case)So I asked DBA to help me and finally he moved/purged some files from this file system.
One more thing can you tell me what is the role of this command while extending the file system size.
Once again thanks for all who helped me.
regards
Nidhi

Re: File system size full and want to increase it on HP UX 11iv2

http://docs.hp.com/en/B2355-60105/fsadm.1M.html

fsadm does defragmentation. So as if u r data is scattered .It will be properly managed.