/ filesystem getting full

Hi All,

How do I increase the root filesystem? It's getting full.

/ 90%

Here's the break down, below

232 dev
5624 tmp
*6764 bin
16860 root
*19680 sbin
*20436 lib64
28329 boot
*47992 etc
150012 var
*254540 lib
651708 home
*2445044 usr
*5032560 opt
*6335463 proc

The one with * is on the / filesystem, the rest are already in other filesystem/partition.

The partition still have free space, 7G. On that scenario above, can I increase the / FS on single user mode? If not, how?

No more to delete on the files.

Please help. Thanks.

Are you using volume groups?

# vgdisplay

what does "Free PE / Size" say?

then you can use vgextend to extend your volume group then extend your filesystem.

Yes, the free space 7G. Can I extend vg and extend fs on the fly? Meaning no downtime. By the way, this is root fs.

Here is what I just did on mine as a test. I only expanded mine 10megs, buit I didnt need to do it anyway. Without rebooting.

 # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/RootVG-root
                      992M  342M  600M  37% /


 # lvextend -L +10M /dev/RootVG/root
  Rounding up size to full physical extent 32.00 MB
  Extending logical volume root to 1.03 GB
  Logical volume root successfully resized



 # resize2fs /dev/RootVG/root
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/RootVG/root is mounted on /; on-line resizing required
Performing an on-line resize of /dev/RootVG/root to 270336 (4k) blocks.
The filesystem on /dev/RootVG/root is now 270336 blocks long.



Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/RootVG-root
                     1020M  342M  626M  36% /

What version are you using, I'm using redhat as 4, it didn't work.

I use my virtual first:

[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
6.8G 1.9G 4.6G 29% /

[root@localhost ~]# lvextend -L +10M /dev/VolGroup00/LogVol00
/dev/cdrom: open failed: Read-only file system
Rounding up size to full physical extent 32.00 MB
Extending logical volume LogVol00 to 6.88 GB
Logical volume LogVol00 successfully resized

[root@localhost ~]# resize2fs /dev/VolGroup00/LogVol00
resize2fs 1.35 (28-Feb-2004)
/dev/VolGroup00/LogVol00 is mounted; can't resize a mounted filesystem!

You can use

ext2online -v /dev/VolGroup00/LogVol00

instead of "resize2fs /dev/VolGroup00/LogVol00", to extend an online / fs

Thanks.