1832844 Members
3153 Online
110047 Solutions
New Discussion

extend root file system

 
Michael Jägers
New Member

extend root file system

Hi all,
I am new here. I found the ITRC on my search for amsolution for my problem.
The root file system is full. We have no Unix expert here to tell us what we can delete to get back space. My idea for a quick solution is to extend the filesystem. Now it is 100M I wanted to increase it to 120M.
It is on /dev/vg00/lvol1
vgdisplay showed 11 Free PE
So space is there.
I couldn't umount the root file system to run lvextend.
Is it possible to umount it?
What else could I do?
We're using HP-UX 10.20.
Thx :-)
Mike, hoping for help
4 REPLIES 4
Patrick Wallek
Honored Contributor

Re: extend root file system

Nope it's not possible to unmount / as it has everything else mounted underneath it.

Your best bet is to search for large directories and files under / (NOT mounted filesystems) by doing:

# du -kx / | sort -n

and see what shows up as being abnormally large. The most likely culprit is a file in /dev/rmt caused by a mis-typed tape device file.

If you would like to post the list that the above command generates, we could take a look for you.
A. Clay Stephenson
Acclaimed Contributor

Re: extend root file system

There is , unfortunately, no way to do this easily. The problem is that the / and /stand MUST BE CONTIGUOUS. They cannot be expanded in place unless there just happens to be free extents immediately after / --- an extremely unlikely scenario. You really have to do a make_tape_recovery and Ignite a new system to do this BUT 100MB is normally enough space for /. You are trying to fix the symptoms rather than the problem. You need to find the errant files and remove them.

The first place to look is in the /dev directory.
cd /dev
du
If you see any large files or any files that are not device nodes or directories then these should be removed. It common for someone to accidently create a file like /dev/rmt/Om (the letter 'O') rather than zero and thus create a file rather than writiung to a tape device.

You should also look for 'core' files and remove them.

find / -xdev -name 'core'

If it ain't broke, I can fix that.
Jean-Luc Oudart
Honored Contributor

Re: extend root file system

Usually,
1) one thought writing into a fs but this a directory of / (or fs not mounted !)

2) Someone is running some processing of /
(instead of a proper directory)

Regards,
Jean-Luc
fiat lux
Sridhar Bhaskarla
Honored Contributor

Re: extend root file system

Hi Mike,

You can extend the root filesystem in the following ways.

1. If you have onlineJFS and a spare disk. root filesystem has to be contiguous. So, you would need to move the logical volume next to root's logical volume to the spare disk, extend root's filesystem using OnlineJFS and move the other logical volume back.

2. You will need to boot the system through CD. Do the above except you will be using regular lvextend/extendfs commands. This is tedious.

3. Prepare make_tape_recovery tape for this system and re-install. If you have mirrors, you can break the mirrors, take the disk out of vg00 and recover the tape onto that disk. If you find everything alright, you can put the mirror back.

3 is the safest way.

If you are trying to troubleshoot, you can run the command

du -ks / |sort -n

This will print each file under / filesystem as per it's size. You can find the directories/files that occupied the space and try cleaning them up. It is a good idea to make sure others do not have write permissions to any directory under /. If at all you find some, they should be mount points.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try