Operating System - HP-UX
1748181 Members
4127 Online
108759 Solutions
New Discussion юеВ

Re: Expanding / (root) filesytem

 
SOLVED
Go to solution
Rafael Casero
Regular Advisor

Expanding / (root) filesytem

I currently have 78 gigs available on my disk, my / partition is 200 MG's I'm currently running out of space often. I would like to know.

1. What's the best practice to extend / partition.

2. Should I expand it to the full 78 gigs, and would it cause performance issues?

...I'm fairly new to the UNIX Environment...

Thanks...
11 REPLIES 11
Arunvijai_4
Honored Contributor
Solution

Re: Expanding / (root) filesytem

Hi Rafael,

You can check these threads for more information,

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=97821&admit=-682735245+1144294574992+28353475
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=505209

Basically, Ignite your using make_tape_recovery, boot to console, Re-ignite your machine with desired size of / (root) partition.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
YoungHwan, Ko
Valued Contributor

Re: Expanding / (root) filesytem

Hi Rafael..

If your system configured lvol4, you cannot resize / file system.
To increase / size, use make_tape_recovery.
and resize / .
# make_tape_recovery -Av

# shutdown -ry 0

System reboot..

Main Menu: Enter command or menu > sea

Path# Device Path (dec) Device Path (mnem) Device Type Rev
----- ----------------- ------------------ ----------- ----
P0 0/0/3/0.0 media.0 Random access media 1
P1 0/1/1/0.1 intscsia.1 Random access media 1
P2 0/1/1/0.0 intscsia.0 Random access media 1

Main Menu: Enter command or menu > bo P# --> Tape Device

Have a nice day..
Raj D.
Honored Contributor

Re: Expanding / (root) filesytem

Ragael,

For expanding root (/) , you have to take ignite backup of vg00 , and while restoring , you have option to expand it.

End option to take all backup of your system and reinstall it , with a new root filesystem size.



Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Expanding / (root) filesytem

Rafael,

For expanding root (/) , you have to take ignite backup of vg00 , and while restoring , you have option to expand it.

End option to take all backup of your system and reinstall it , with a new root filesystem size.



Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Antonio Cardoso_1
Trusted Contributor

Re: Expanding / (root) filesytem

Rafael,

you should first consider why / is running out of space.
- run bdf to list all filesystems
- run du -sk on each directory of / which isn't a filesystem (from bdf output)

An alternative to extend this filesystem may be to move some of those directories from / to another filesystem: link them to new location.
Tiziano Contorno _
Valued Contributor

Re: Expanding / (root) filesytem

"/" filesyste should be well "confined", no new files should go directly into it, except the root history file updates, cde preferences files, mozilla files, etc. This make "/" pretty "static".

Run this command to see which are the largest and newest file you have in "/" alone.

du -ks $(find / -type f -mtime -30 -xdev) | sort -n

This can help you identify why you are going low on space.

Regards.
Tiziano Contorno _
Valued Contributor

Re: Expanding / (root) filesytem

There's also an other way to extend root filesystem that is quite complex.

Supposing a 2 internal disks configuration, all vg00 LVs mirrored.

1) fsadm on /tmp (and lvreduce /tmp) as many MBs as you need for root fs;
2) extend root logical volume and extend its filesystem;
3) extend back to the desired value /tmp

This is due to "/" filesystem being in contiguos and strict allocation policy.

Regards.
MarkSyder
Honored Contributor

Re: Expanding / (root) filesytem

It is seldom necessary to expand /.

I suspect you've either got a process writing to root that would be better writing to a filesystem of its own or a backup writing to a non-existent device. This is quite common: what happens is a typo in the device name when you run a backup command resulting in a large file in the /dev/rmt directory. Check this before taking the drastic (and usually unnecessary) action of increasing /.

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

Re: Expanding / (root) filesytem

I have a possible solution for you but it utilizes some advanced LVM commands and requires you to really understand your disk layout. Do not try this without fully understanding this and thinking it through.

Lets assume you have 2 disks in vg00 one with the boot area and the / filesystem and the other with other filesystems but with sufficient room.

On your boot disk /dev/dsk/c1t15d0 you have

lvol1
lvol2
lvol3
lvol4
lvol5


Lvol3 cannot be extended since / needs to be contiguous and lvol4 is in the way.

if you have 2 disks in vg00
examples /dev/dsk/c1t15d0 and /dev/dsk/c2t15d0 and the 2nd disk has some room.


you can do the following

pvmove -n /dev/vg00/lvol4 /dev/dsk/c1t15d0 /dev/dsk/c3t15d0

this will move lvol4 to the other disk providing a hole for the / filesystem.

Then you can do the following
lvextend -L 200 /dev/vg00/lvol3 (assuming you have that space)
fsadm -F vxfs -b 200M /
(to extend the filesystem.. This assumes onlinejfs)

Then you can move lvol4 back to the disk..
pvmove -n /dev/vg00/lvol4 /dev/dsk/c3t15d0 /dev/dsk/c1t15d0

good luck..