Operating System - HP-UX
1832978 Members
2750 Online
110048 Solutions
New Discussion

extending the root filesystem

 
Amit Manna_5
Advisor

extending the root filesystem

How can we increase the root filesystem.
There is no online JFS on the system
12 REPLIES 12
Court Campbell
Honored Contributor

Re: extending the root filesystem

take an ignite image of the system with the -I option. Then ignite the box. / needs to be contiguous. There are other options, but ignite is probably the easiest.
"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???"
Patrick Wallek
Honored Contributor

Re: extending the root filesystem

Use Ignite/UX to create a make_tape_recovery tape. Then boot from that tape and recover your OS. During the recovery you can resize your file systems.
T G Manikandan
Honored Contributor

Re: extending the root filesystem

During the interactive recovery of the make_tape_recovery archive you can resize the file system but you need to see as why you need to increase the root file system.

what is the current size and what is the usage of this file system. there are not much files in there which could be more than 200 mb.

Use

#du -kx /|sort -nr|more

to find which directories are occupying more space with /
T G Manikandan
Honored Contributor

Re: extending the root filesystem

make sure you use the -l option with make_tape_recovery which is recommended to perofrm the interactive recovery.
MarkSyder
Honored Contributor

Re: extending the root filesystem

As T G says, you need to ask if this is really necessary.

Is the filesystem growing? If not, it can happily run for a long time at 90% + full. If it is growing, you almost certainly have an application writing to it that should be writing to a dedicated filesystem.

Check for core files and check for ordinary files (type f) in /dev. One of the most common reasons for root filling is someone mis-typing a tape device name and ending up with a large text file in /dev.

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

Re: extending the root filesystem

If you do not use VxVM, you can uninstall Base-VxVM. That will free up some space. But I usually only do that if I am in a desperate situation.
"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???"
Steven E. Protter
Exalted Contributor

Re: extending the root filesystem

Shalom,

Bill Hassell usually says, extending the root file system should not be needed.

It is not intended for files, and you probably have some files on it.

du -k | sort -rn | more

Find the problem spot and make some cuts.

Because root must be contiguous, an Ignite restore is the only way to "extend" the root file system.

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
Avinash20
Honored Contributor

Re: extending the root filesystem

Here are some steps that you will need to follow in order to change the size of your root filesystem using Ignite/UX and the make_recovery tape.
---------------------------------------------------------------------
1. Install Ignite-UX on your system
2. run make_recovery (with relevant options), to create bootable tape
3. reboot your system & Press a key to abort non-interactive recovery.
4. Select appropriate language.
5. Select Advanced Options from the menu (3rd option).
6. Select Edit Config from the submenu (2nd option).
7. Change the last RECOVERY entry in the file to RECOVERY=TRUE and exit vi.
8. Select Install HP-UX from the menu (1st option).
9. Choose either Guided or Advanced Installation (advanced is required for changing filesystems).
10. Complete all other required information and select Go! to begin the recovery.

Please assign points to your threads

Good Luck !
"Light travels faster than sound. That's why some people appear bright until you hear them speak."
Steve Post
Trusted Contributor

Re: extending the root filesystem

I apologize if this is patronizing. I have no idea if you have even stumbled on this issue in the past.

One reason why a person would want to extend a root filesystem is that they want to drop 300 megs into a new directory called /stuff because the "stuff" software company said it MUST be there.

But you don't have to extend the root filesystem for this. There are other options.

You could make a new filesystem and mount it to a new directory called /stuff. The 300 megs of space would be grabbed from a different disk, and NOT be taking root's filesystem space.

You could make a directory /stuff relative to a big old disk on the system and link it back to root.
Let's say you have a big old disk with 3 gigs free on it.
Let's say the disk is mounted to /bigdisk.
You could do this:
mkdir /bigdisk/stuff
cd /
ln -/bigdisk/stuff /stuff
Now /stuff looks like it is in root. But it is using the space on the /bigdisk filesystem.

Funny story: I had a guy blow up a root filesytem on a computer because he wanted to store if 500 megs of stuff. So he made a directory like /mystuff. Then uploaded the data there. Since /mystuff was not a filesystem or a link to a bigger filesystem, it just ate up the space in root's filesystem. Then ....bomb.

Funny... he is also the guy that needed to delete that pesky file that just happened to be called *
Johnson Punniyalingam
Honored Contributor

Re: extending the root filesystem

First of all /stand, swap space and / need to contigeous.

In order to increase any of them, you will have to use ignite and
resize the partitions.

First check why you need to extend /. / is static file system and
should not grow if you /var etc on different file systems. The good practise
is to have /var on different filesystem.

On top of ignite, you could also do this manually from LVM Maintenance
mode.

As an example, I had to increase the size of /stand for a recent 11i
upgrade.
Below, my lvol1 is stand and lvol2 is primary swap (used to have swap
on lvol3 as well) and root is lvol4.


boot into LVM maintenance mode:

hpux -lm

vgchange -a y /dev/vg00
lvrmboot -r /dev/vg00
lvremove /dev/vg00/lvol2
lvextend -L 256 /dev/vg00/lvol1
extendfs /dev/vg00/rlvol1
lvcreate -L 1024 -C y -r n -n lvol2 /dev/vg00
lvlnboot -b /dev/vg00/lvol1
lvlnboot -r /dev/vg00/lvol4
lvlnboot -s /dev/vg00/lvol2
lvlnboot -d /dev/vg00/lvol2
lvlnboot -R
reboot -r

What you could do is remove your primary swap - extend root - then add
swap back with what is left.

Of course this is not for the meek of heart :)

The ignite way is probably easier...

The real question is, why do you want to increase your root filesystem?

Better to move that which does not belong into a new lvol...

Thanks,
Johson
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: extending the root filesystem

First, do a "vgdisplay -v vg00" and a "bdf" to determine what file
systems you have that are not part of the / file system. Then do a "du -sk
/* |sort -n" to see the size of what exists under /, ignoring the other
mounted file systems. This will tell you where most of the space is
being consumed.

Rgds,
JOhnson
Problems are common to all, but attitude makes the difference
Shailendran V Naidu
Frequent Advisor

Re: extending the root filesystem

Hi Amit,
If you want to increase the root file system with out Online JFS, the only way is to Re-ignite with a make_tape_recovery or make_net_recovery archive(period).