1833017 Members
2229 Online
110048 Solutions
New Discussion

Re: root filesystem

 
enrique Ortiz_1
New Member

root filesystem

hello

is ther a way to extend the / ( root ) filesystem. when i tried in sam is sys that cannot unmount the / in order to extend.

thanks
7 REPLIES 7
Massimo Bianchi
Honored Contributor

Re: root filesystem

Hi,
the only easy way is to re-install the S.O., using ignite (make_tape_recovery).

There are some tricks, but they involve going down to maintenance, disabling swap and other.

If you are asking this question, it's best not to go too deeper.

Why do you want to exent / ?

If you are in lack of space it's best to create additional lvol and move your data there.

HTH,
Massimo
Stefan Farrelly
Honored Contributor

Re: root filesystem

Yes, it is possible, but it is NOT easy.
Its far simlper to find out who/what is filling up / to free up some space. Remember, / is NOT supposed to grow, it should remain static. If its not then someone/somthing is using for data which should not happen.

You can check the sizes of the dirs in /etc;

du -sk /etc /dev /sbin /tcb

They should only be around;
45000 /etc
25 /dev
370 /tcb
23300 /sbin

If theyre a lot bigger then you need to look into each to find out what is filling them up.

The easiest way to increase / is;
1. Create a new lvol for vg00 (eg. lvol9). Set it to same size as /tmp.
2. in /etc/fstab change the /dev/vg00/lvol4 for /tmp to the new lvol, eg. lvol9.
3. reboot. now /tmp is on lvol9.
4. lvremove old tmp, lvol4. Now you can extend / up to the size of the old lvol4.

Or you can backup using an ignite tape, boot off the ignite tape and then set the new size for /, but this is a bigger and longer job.

Im from Palmerston North, New Zealand, but somehow ended up in London...
V.Tamilvanan
Honored Contributor

Re: root filesystem

Hi,
You cannot increase the size of / FS through sam .

When u want to increase the /stand,/, or swap lvols the PEs needs to be contiguos. So you have to take the total system backup and modify the LVM structure of the root disk if you don't have enough free PE's continously after the / (default lvol3).

The better way of doing is
take a full backup of system and Ignite backup of vg00.
When u restore using Ignite u can increase the / lvol's space provided u have enough space on your roort disk.

HTH
-tamil
Karthik S S
Honored Contributor

Re: root filesystem

Using HPs Online JFS product you can increase the size of root lvol provided that you have enough contigeous space available for extending the root vol. Do a lvdisplay -v and find out where the root lvol ends and if there are any free logical extents after that. If those extents are already occupied by a different LV (say lvol8) then create a new LV and move lvol8 data to the new LV and remount it. Now use fsadm to increase the size of root LV..

Regards,
Karthik
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
V. V. Ravi Kumar_1
Respected Contributor

Re: root filesystem

Hi,

My way would be identify what are the Directories that are occupying more space in / using "du -ks" and create separate FS for them. This would be the easiest way. If you don't have FS for /var, /tmp and /usr boot the machine in single user mode and create separate FS for them.


Regards
Never Say No
Bill Hassell
Honored Contributor

Re: root filesystem

The reason that the root filesystem grows is that something is using space where it doesn't belong. / is a static filesystem. Start by analyzing all the directories in / by using du:

du -kx / | sort -rn | head -10

The largest directories in a 'normal' / directory will be:

29200 /
18979 /sbin
8601 /etc
6383 /etc/opt
3676 /sbin/fs

Whatever you find that is large (and not part of this list) must be moved to the correct location. Bad applicatios will load themselves into a new root directory rather than /opt where they belong.

The root user may also be at fault. If the / directory is very large but /sbin is the next largest and about 18-20megs, then look for big files left by the root user:

ll / | sort -rnk5

To help with mistakes like this, always move root's home directory to another location, either /home/root, or /root.


Bill Hassell, sysadmin
Chris Vail
Honored Contributor

Re: root filesystem

We always create a /root filesystem, and make that root's home directory. That way we can grow it as needed, and put all our scripts and miscellaneous stuff in there without fear of overgrowing the / filesystem. As other have said, / should never grow.


Chris