Operating System - HP-UX
1847143 Members
6124 Online
110263 Solutions
New Discussion

/home full. Please suggest how to extend.

 
GnanaShekar
Regular Advisor

/home full. Please suggest how to extend.

Hi,

$ uname -a
HP-UX lciahp27 B.11.31 U ia64 0695562488 unlimited-user license

$ bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1048576 307672 735144 30% /
/dev/vg00/lvol1 1835008 151808 1670088 8% /stand
/dev/vg00/lvol7 2097152 363200 1720616 17% /var
/dev/vg00/lvol6 4194304 2910024 1274272 70% /usr
/dev/vg00/lvol5 2097152 114320 1967408 5% /tmp
/dev/vg00/lvol8 5308416 3373816 1919512 64% /opt
/dev/vg00/lvol4 8388608 8388608 0 100% /home

$ sudo fstyp /dev/vg00/lvol4
Password:
vxfs

Please suggest how to extend this.
Thanks & Regards,


7 REPLIES 7
Mustafa Gulercan
Respected Contributor

Re: /home full. Please suggest how to extend.

hi;

$sudo sam

>>Disks and File systems
>>Logical volumes
>>select lvol4 with space key
use tab key and arrow key to select Actions
>>select Increase Size
and
If space available in Volume Group is Ok set the new size.


regards,
mustafa
John Payne_2
Honored Contributor

Re: /home full. Please suggest how to extend.

You might consider looking to see who has all the space, and go look at what they are doing. It might just be the fact that someone needs to clean up their junk.

du -kx /home |sort -rn

will give you a list of the largest directories under /home. From there, go see what the person hogging all the space has in their directory.

Hope it helps
John
Spoon!!!!
MarkSyder
Honored Contributor

Re: /home full. Please suggest how to extend.

I find that /home tends not to grow. Have you got users' home accounts in there? I would suggest setting up a separate logical volume on a non-operating system disc for user accounts. If you want it to appear under home you could call the filesystem that hangs off it, for example, /home/user_accounts.

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

Re: /home full. Please suggest how to extend.

Use sam, but I also think there is a problem with the use of that filesystem.

Check what's is it being use for and evaluate alternative solutions because it makes no sense to need so much space for the /home filesystem.

Probably you need another filesystem to store some data that is currently stored in /home.
Rasheed Tamton
Honored Contributor

Re: /home full. Please suggest how to extend.

Hi,

It is a good practice to clean the file system on a routine basis if you do not limit the disk usage by quota.

du -xk /home/* |sort -rn |more
will you give the usage of each dir.

find /home -type f -size +1000000c -mtime -1 -exec ls -lart {} \;
will give you the output of latest big files.
You can add more zeroes on the size to find bigger files

You can do these things:
-Ask the users to delete/move unwanted files immediately
-look for any core files
-As sysadmin you can move the big files to another file system and compress it and move back to the original place (while the filesystem is 100%, you cannot compress it) you have to move/compress/move back.

You can extend the filesytem (if it is online JFS) on the fly if you have enough free physical extents on vg00 - meanwhile also consider the other forum members' opinions as mentioned above.

Regards,
Rasheed Tamton.
MHudec
Frequent Advisor

Re: /home full. Please suggest how to extend.

First check for /home utilization. See if you can clean it up a bit. As I can see, it is 8gb large (there might be stuff which could be moved out of vg00, to another volumegroup with disks from disk array for example). If no - extend.

General guidelines:

# lvdisplay -v /dev/vg00/lvol4 | more
- check allocation, check extents, check their distribution, check which physical volumes are being used at this logical volume etc.

# vgdisplay -v vg00
- check free extents on disks used at logical volume lvol4, check extent size etc.

# lvextend -l NUM /dev/vg00/lvol4 PVOL1 PVOL2
- NUM is total number of extents (wanted size in mb divided by extent size in mb, like we want 9gb = 9216mb wanted size / 16mb extent size = 576 extents
- PVOL1 is in context of lvm mirror the original physical volume, PVOL2 is mirrored physical volume.

# lvdisplay -v /dev/vg00/lvol4 | more
- check if all numbers fit (logical volume size, number of extents, their mirroring etc.)

# fsadm -F vxfs -b NUM /home
- NUM is the number of mb, you can take it from logical volume size checked in the previous command, for example 9216mb, so NUM would be 9216M (see that M at the end, it says megabytes).

# fill the /home up again
- this step is optional of course :)
Court Campbell
Honored Contributor

Re: /home full. Please suggest how to extend.

As already suggested. Clean up first, extend second. I would start by looking at users home folder sizes:

# du -sk /home/* | sort -n

Look at the files in users directory who consume the most space. I cannot tell you how many times I see people that have old trace files, etc, that they never clean up. I usually look for large text files and gzip them. Or just get with the offending users and ask them to clean up. Otherwise, you can check if you have any free extents available on vg00. If not you can add another disk to vg00. Then lvextend and use fsadm to extend the file system.

You should also see if you have onlinejfs installed.

# swlist | grep -i online

This will make the extending transparent to the users, as you will not need to umount /home in order to extend. Also, in order to lvextend you are going to have to cleanup /home. The command will not be able to work if the file system is completely full.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"