Operating System - HP-UX
1827286 Members
3404 Online
109717 Solutions
New Discussion

Re: increasing disk space for root directory

 
SOLVED
Go to solution
Mark Stewart
Frequent Advisor

increasing disk space for root directory

I was wondering, if it's possible, how to increase the amount of disk space allocated to the root directory. I think you usually have to unmount a drive, add the space, then mount it back, but I don't know how to do that with the / disk. Is there a way to do this, or another method all together to allocate to this disk? Thanks!
11 REPLIES 11
Edward Alfert_2
Respected Contributor

Re: increasing disk space for root directory

You can use Ignite/UX to extend your root logical volume:

1. Insert a writable tape into the tape drive.

2. Execute the following command:

make_recovery -p -A -d /dev/rmt/tape_device_file

3. Modify the /var/opt/ignite/recovery/config.recover file:

a. Locate the following information in
/var/opt/ignite/recovery/config.recover:

logical_volume "lvol3" {
usage=VxFS
size=86016KB
mount_point="/"
largefiles=FALSE
bad_block_relocate=false
contiguous_allocation=true
stripes=0
stripe_size=0KB
disk[_hp_root_disk]
} # end logical_volume

b. Modify the above information to the appropriate size.
Ensure that you have enough space in vg00 to perform this
operation.

You can shrink one logical volume so that you can increase
another logical volume. Be careful not to configure more
disk space that what's actually available in vg00.

c. Save /var/opt/ignite/recovery/config.recover.

4. Execute the following command:

make_recovery -r -d /dev/rmt/tape_device_file

Note: This command enables you to continue to create your tape.
"Do what you love and you will never work a day in your life." - Confucius
linuxfan
Honored Contributor

Re: increasing disk space for root directory

Hi Mark,

Unfortunately unlike other filesystems / and /stand cannot be increased as easily as other filesystems.

But the most common way of increasing it is using ignite/UX

You can download ignite from
http://www.software.hp.com/products/IUX/download.html

To get more information about ignite
http://www.software.hp.com/products/IUX/index.html

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Sanjay_6
Honored Contributor

Re: increasing disk space for root directory

Hi Mark,

The only way you can increase the disk space in / (root) directory is by reinstalling the OS. Ignite will allow you to take a backup of your OS and then you can reinstall the OS and resize the disk space. You won't have to reinstall the other patches / applications already installed on your system.

So that is it. Good luck to you.

thanks
Bernie Vande Griend
Respected Contributor

Re: increasing disk space for root directory

One additional thought, do you need room because something in "/" is growing? or because it was just made to small starting out?
I say this because something things can sneak into / that shouldn't be there like core dumps or even application files. I'd do a du -sk * from / to see where the space is being used. Perhaps something there can also be made into its own filesystem apart from /.
Ye who thinks he has a lot to say, probably shouldn't.
Mark Stewart
Frequent Advisor

Re: increasing disk space for root directory

actually, Bernie, that was the question I was about to follow up with.. something does indeed seem to be growing in size on the /, but I couldn't tell what it was.. one of my users said he saw a very large file, so he deleted it. no biggie. but the space didn't come back until after fastbooting the machine. what are common sources of these "leaks" onto the diskspace?
Santosh Nair_1
Honored Contributor
Solution

Re: increasing disk space for root directory

Mark

One thing to keep in mind is that if that file was kept open by a process, even though you've removed it from the filesystem you can't reclaim the space until after the process issues a close (or the process dies).

The better thing to do would have been to do a fuser on the file, find the offending program, kill it and then remove the file.

-Santosh
Life is what's happening while you're busy making other plans
Santosh Nair_1
Honored Contributor

Re: increasing disk space for root directory

Mark

Also forgot to mention that / shouldn't be writable by anyone other than root (hopefully), so the process must have an effective user id of root, i.e. it was probably a process run by a root or setuid root process.

-Santosh
Life is what's happening while you're busy making other plans
linuxfan
Honored Contributor

Re: increasing disk space for root directory

Hi Mark,

You could do something like
du -x / |sort -n

(for listing the disk usage only of the / filesystem)

Also i think it is important you keep an eye on the filesystem usage and find out which process is writing such huge files to the / filesystem and particularly which directory is it writing to.

-Ramesh
They think they know but don't. At least I know I don't know - Socrates
James R. Ferguson
Acclaimed Contributor

Re: increasing disk space for root directory

Hi Mark:

This question appears periodically. The generally accepted method has usually been to use Ignite to create a recovery tape and reinstall. Some other methods for the not-so faint-of-heart can also work.

However, there is a "sanctioned" method other than Ignite recovery which uses Online JFS to extend the root filesystem without having to reinstall, Ignite or create an alternate boot
disk. This procedure and its requirements are described in the Technical Knowledge Base document #KBRC00006582, "Extending the root file system with Online JFS - fsadm".

Regards!

...JRF...
Jay Cantwell
Regular Advisor

Re: increasing disk space for root directory

Mark...I had the same problem awhile ago...I discovered that I had huge files sitting on my /dev directory that did not belong there or were no longer being used...just another idea in addition to these above... Jay
Mark Stewart
Frequent Advisor

Re: increasing disk space for root directory

thanks for your help everybody! I got it figured out. Santosh, you were right on the money. There was a process writing to a file that wasn't dying.