Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need space

Status
Not open for further replies.

cellspam

ISP
Jun 28, 2008
114
0
0
AR
HI all,

I have a linux and in my partition "/" is and "ext3" i have only 2% free space.

How can i add more space or how can i change that my root be on a other folder?

Regards

 
Maybe you can move a big part, like /usr/local to an alternate partition, and either link to it, or remount it.

Moving folders which are critical at boottime might result in an unbootable system if grub, fstab and ... aren't set up correctly.

don't visit my homepage:
 
This are my partitions
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 965M 844M 72M 93% /--------->i need to make this one bigger

/dev/sda7 965M 624M 293M 69% /home
/dev/sda5 4.8G 1.2G 3.4G 25% /var
/dev/sda3 9.5G 2.6G 6.5G 29% /usr
/dev/sda1 190M 16M 165M 9% /boot
tmpfs 2.0G 0 2.0G 0% /dev/shm
 
hi,
I agree with the problem, but I don'like the solution.

To make the partitoin bigger, you have to move what is
after sda2, in the disk: sda3(usr).....

If you have fresh-installed the box and you don'like how
you have partitioned it, remake all.
But if you are not in this situation, you have already in
production (or you don't want remake all), and, when you
started was all ok,
this means that some (or many) files, unwanted maby,
have gone in / filesystem.
You have to find them and move them under another location.
To do this, cd in / and perform a
du -ks *
This gives in 1024 kbyteblocks, the summarized size of directories. If you see that, ie /etc dir holds 90%
of / space, cd in /etc and recursively repeat du -ks *

I don't see /tmp in your partition table.

When you have found where files are, you have to move them.
If you have place in other fs, no problem, move them.

You can use links or symbolic links if files must
be positioned in a specific location: if files
have to be in /etc/yourappl, you can try to put them
in /home/mysite and create a sybmolic dir link between
/etc/yourappl and /home/mysite .

( mkdir /home/mysite
cd /etc
ln -s /home/mysite yourappl
)

If you have no space, put another hard-disk, then using
the fdisk command, (fdisk -l), see how your OS has called the disk (probably /dev/sdb )

By just 2 operations (2 commands) (and some $ for hd) you:

1) create a partition on new disk (fdisk /dev/sdb and follow help)

2) create fs (format it) (mkfs -t ext3 /dev/sdb1,
for all these commands, see your doc)

Then create a dir ( /home/mydir) and give a
#mount /dev/sdb1 /home/mydir

try to write on it, if ok, umount it,
edit /etc/fstab copy a line and modify it as

/dev/sdb1 .... /home/mydir .... as other

# mount -a

test all is mounted, and reboot (no need).

Probably I have been too fast, but we are here to help
you more in detail.

ciao
vittorio


 
I can only speak rhel/fedora/cent - not sure what you're running.

But, if you're using LVM with one of these distros

1. check to see if you have free space in your volume group (vgdisplay)

2. If you have free space, extend the logical volume with lvextend (example, lvextend -L +1G /dev/sda2 )

3. Then sync up the filesystem with the lv (resize2fs /dev/sda2)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top