1833445 Members
3856 Online
110052 Solutions
New Discussion

run out of space in /

 
Alfredo Raymundo
Contributor

run out of space in /

I have 96% used of my "/" filesystem. I want to increase it. How can i do that. Any tips ?

14 REPLIES 14
John Strang
Regular Advisor

Re: run out of space in /

First thing to do is check for large files that are using up the space.

Examples are core files, or files under /dev where people have incorrectly typed the device name, eg
/dev/rmt/rmtO (upper case letter o instead of a zero)

HTH,

John
If you never make a mistake you'll never make anything.
Craig Rants
Honored Contributor

Re: run out of space in /

Do you have OnlineJFS? If so...

lvextend ???L 200 /dev/vg00/lvol3
fsadm ???F vxfs ???b 200M /

If not, it's a little more complicated...
Since the filesystem is in use, it is impossible to unmount it. Therefore stop all the processes (applications) that use the
filesystem then unmount it. Processes that use /usr and /var cannot be all stopped,
the only solution is to reboot in single user mode.
extendfs -F vxfs /dev/vg00/rlvol3
mount /dev/vg00/lvol3 /

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
James R. Ferguson
Acclaimed Contributor

Re: run out of space in /

Hi:

You probably have files in '/' that shouldn't be there. Make sure that '/dev' doesn't contain a non-special file that is the result of a typographical error. A common mistake is to type "o" instead of '0' for '/dev/rmt/0m'.

If you do not have files in '/' that shouldn't be there, consider establishing directories and new mountpoints for things that you "insist" on keeping in vg00.

If you still feel that you want to increase the size of '/', the safest method is to create an Ignite 'make_tape_recovery' image of vg00 and reload it.

Regards!

...JRF...
Dave Chamberlin
Trusted Contributor

Re: run out of space in /

I had a system where / was too small. I created a file system on another disk that had space, which I called slash2, and moved a number of large items from / to there, leaving soft links on /. This got me by until I rebuilt the system.
Ravi_8
Honored Contributor

Re: run out of space in /

Hi,
you can't unmount / even in single user mode. Best is to remove any unwanted/core files, check /dev and remove unwante files. If you still couldn't get, use the make_tape_recovery tape from ignite. Last way is the OS installation wherein you can specify size of each file system
never give up
Martin Johnson
Honored Contributor

Re: run out of space in /

If all the files in / are valid, you may want to move a directory to a new file system. For example:

cd /tmp
tar -cvf /var/tmp.tar *
lvcreate -L 100 -n lv_tmp /dev/vg00
newfs -F FStype /dev/vg00/rlv_tmp
cd /
mount /dev/vg00/lv_tmp /tmp
cd /tmp
tar -xvf /var/tmp.tar
add dev/vg00/lv_tmp to /etc/fstab
Sanjay_6
Honored Contributor

Re: run out of space in /

Hi Alfredo,

you cannot increase the size of "/" filesystem without reinstalling the OS. However you can cleanup the filesystem if you have some log files / user files in the root filesystem.

Hope this helps.

Regds
Bill Hassell
Honored Contributor

Re: run out of space in /

 


Bill Hassell, sysadmin
Vijeesh CTK
Trusted Contributor

Re: run out of space in /


hi


How to extend root file filesystem

Boot the system in single user mode and extend the root using the lvextend command and it will extend the root logical volume.

Make sure that the space to extend the root LV is available in the same disk as continuous physical extents because the root volume allocation policy must be contiguous.

If the adjacent physical extents are occupied by any other LV move that logical volume to some other disk using pvmove command.
normaly lvol4 is /home, so u can move that
# pvmove -n /dev/vg00/lvolx /dev/dsk/c0txd0 /dev/dsk/c0txd0

or, create an lv in vg00 move all the contents of lvol4 to new lv and mount it as /home ( or whatever) , remove lvol4 so that you canhave contigous PE's for the use of lvol3 (/)
Shutdown the machine and interrupt the normal boot process by pressing any key if it is a S800 system and if it is S700 use "esc" key.

From the boot admin prompt type boot pri isl you will get the isl prompt

ISL> hpux -lm
This will take you to the logical volume maintenance mode. Don't try to mount any logical volume and don't switch to multi-user mode or a different runlevel.

The root LV will now be mounted on /dev/root instead of /dev/vg00/lvolx

Now you can execute the extendfs command on the root logical volume:

# extendfs -F hfs /dev/vg00/rlvolx
Note down the alternate superblock locations and reboot the machine using

# reboot -n -------------- DONT MISS THIS STEP.

This will cause the system to not sync the old superblock back to the filesystem and damage it.

When you boot the system normally now you will get all the allocated space for the root filesystem.

Now you will notice that the root volume is still mounted on /dev/root rather than /dev/vg00/lvolx. To correct this you remove the /etc/mnttab and you will find bdf now displays the correct logical volume.


CTK
Craig Rants
Honored Contributor

Re: run out of space in /

Ah yes, Bill is correct, I should have read a little further into my LVM notes. My suggestion will work for the other lvol's...

Good thing others were watching.

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Kevin O'Donovan
Regular Advisor

Re: run out of space in /

Hi Alfredo,

haven't come across Craig's OnlineJFS method, Vijeesh method may work but what has worked for me (and I've done this for lots of machines) is using Ignite.

With Ignite you can backup your system onto tape/network server, adjust the filesystem sizes in the config file, and boot back off the tape/network server to reinstall the data you have on the system. Very easy, just takes an hour or two depending on how much data you have. Here's how to do it using either tape or network server:

Tape:
Enter tape into drive, and run
make_recovery -p -A -d /dev/rmt/0m
Modify /var/opt/ignite/recovery/config.recover as appropriate, changing filesystem sizes, hostname & ip address, etc. etc.
Run
make_recovery -r -d /dev/rmt/0m

Network:
On client machine, need to add SERVERNAME to /etc/hosts file

On Ignite server need to:

Add HOSTNAME of client to /etc/hosts file (for entry in /etc/exports of access=HOSTNAME)

Create the following directories:
/var/opt/ignite/recovery/archives/HOSTNAME with ownership of bin:bin

add following entries to /etc/exports
/var/opt/ignite/clients -anon=2
/var/opt/ignite/recovery/archives/HOSTNAME -anon=2,access=HOSTNAME

exportfs -av to ???activate??? the entries in /etc/exports

Note, may need to increase size of /var filesystem on server as this is where the archive will go. /var of 3GB would prob. do.

On client run
make_net_recovery -s SERVERNAME -v -x inc_entire=vg00 to do backup
On server edit /var/opt/ignite/clients/HOSTNAME/recovery/latest/system_cfg, changing filesystem sizes where necessary

To do the install, on the client machine type
bootsys -c SERVERNAME -v
When it reboots select Install from Ignite-UX server (on console), and up to choice, but easiest to select install using server ui.
Go to Server ui (assuming you went with that option) and select the appropriate client, and from the options menu select install client - new install.

Note, if you do go with the server ui option, you can change the filesystem sizes, etc. in there.

Also, you need the SAME version of Ignite to be installed on both machines or you'll get an error & it won't do it.

Hope that sorts it out for you.

regards,
Kevin.
Kevin O'Donovan
Regular Advisor

Re: run out of space in /

Hi again,

one thing I forgot with the tape method, you need to boot off the tape after the recovery, whatever way you want to do that - e.g. at the console interrupt the boot sequence (stage where it gives you 10 seconds), "sea" to search for boot devices, and "boot pX" where pX is the path to the sequential access media that is your tape drive. If you know the hardware path do "boot ".

regards,
Kevin.
Nick Wickens
Respected Contributor

Re: run out of space in /

I think that the procedure that Vijeesh outlined above is that used to increase /stand which is likley to be your only HFS filesystem, rather than /.
Hats ? We don't need no stinkin' hats !!
Vijeesh CTK
Trusted Contributor

Re: run out of space in /


hi

the procedure i told above worked for me in a workstation and on my testing server too. it worked fine no problem at all.

CTK