View previous topic :: View next topic |
Author |
Message |
Rr2516 n00b
Joined: 20 Feb 2011 Posts: 41
|
Posted: Mon Aug 29, 2011 6:55 pm Post subject: No space left on root? |
|
|
I have a 20GB root partition and I'm running into some issues with space.
I am certainly not an expert so I may have mounted something in the wrong place. Any suggestions on how I can check this or if 20GB is not enough for rootfs?
thanks! |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10589 Location: Somewhere over Atlanta, Georgia
|
Posted: Mon Aug 29, 2011 7:08 pm Post subject: |
|
|
Depends on what you've put on there, of course. My whole first Gentoo install was done on a 5.7GiB hard drive. Could you post the output ofplease (in [code] tags, if you don't mind)?
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
Rr2516 n00b
Joined: 20 Feb 2011 Posts: 41
|
Posted: Mon Aug 29, 2011 7:54 pm Post subject: |
|
|
Code: | / # df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 20G 20G 0 100% /
/dev/root 20G 20G 0 100% /
rc-svcdir 1.0M 84K 940K 9% /lib64/rc/init.d
udev 10M 328K 9.7M 4% /dev
shm 3.0G 3.4M 3.0G 1% /dev/shm
/dev/sdc1 3.0G 9.3M 3.0G 1% /boot
/dev/sdc3 200G 4.9G 196G 3% /home
/dev/sdb1 932G 623G 309G 67% /mnt/media |
|
|
Back to top |
|
|
Rr2516 n00b
Joined: 20 Feb 2011 Posts: 41
|
Posted: Mon Aug 29, 2011 7:56 pm Post subject: |
|
|
Code: | / # du -sh *
8.7M bin
8.7M boot
3.3M dev
11M etc
4.8G home
0 lib
5.3M lib32
36M lib64
12K media
623G mnt
310M opt
du: cannot access `proc/9655/task/9655/fd/4': No such file or directory
du: cannot access `proc/9655/task/9655/fdinfo/4': No such file or directory
du: cannot access `proc/9655/fd/4': No such file or directory
du: cannot access `proc/9655/fdinfo/4': No such file or directory
0 proc
592K root
8.7M sbin
0 sys
441M tmp
15G usr
4.4G var
|
and
Code: | usr # du -sh * | sort -n
0 lib
0 tmp
2.0G lib64
2.5G share
3.3M x86_64-pc-linux-gnu
4.0K local
8.2G portage
12M games
14M sbin
36M libexec
50M NX
204M include
276M bin
284K imports
338M lib32
972M src
|
I'm a little baffled by the size of the portage directory.
for fun
Code: |
/ # df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
rootfs 749088 640326 108762 86% /
/dev/root 749088 640326 108762 86% /
rc-svcdir 764586 75 764511 1% /lib64/rc/init.d
udev 764586 982 763604 1% /dev
shm 764586 8 764578 1% /dev/shm
/dev/sdc1 6267488 27 6267461 1% /boot
/dev/sdc3 409012096 8581 409003515 1% /home
/dev/sdb1 323631240 27281 323603959 1% /mnt/media
|
|
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10589 Location: Somewhere over Atlanta, Georgia
|
Posted: Mon Aug 29, 2011 8:30 pm Post subject: |
|
|
Quick fix is to erase the contents of "/usr/portage/distfiles", which just contains downloaded source tarballs and patch files. That's why "/usr/portage" gets so big. Post one more for me, please:- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
Rr2516 n00b
Joined: 20 Feb 2011 Posts: 41
|
Posted: Mon Aug 29, 2011 8:32 pm Post subject: |
|
|
Code: | mount
rootfs on / type rootfs (rw)
/dev/root on / type jfs (rw,noatime)
proc on /proc type proc (rw,relatime)
rc-svcdir on /lib64/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/sdc1 on /boot type jfs (rw,noatime)
/dev/sdc3 on /home type jfs (rw,noatime)
/dev/sdb1 on /mnt/media type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
|
|
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10589 Location: Somewhere over Atlanta, Georgia
|
Posted: Mon Aug 29, 2011 8:40 pm Post subject: |
|
|
The quick fix I've proposed will work for you to get your system stabilized but I believe you've made a minor partitioning mistake that you ultimately need to correct by allocating all that space to home. For instance, "/var/tmp/portage" can grow to over 10GiB alone during the installation of some large packages (e.g., libreoffice). A more comfortable size for the rootfs partition would be 60-80Gib but it might be better to not split up the space like that.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
Rr2516 n00b
Joined: 20 Feb 2011 Posts: 41
|
Posted: Mon Aug 29, 2011 8:46 pm Post subject: |
|
|
I was actually right in the middle of a huge update as I've finally brought my machine back online after several months of travel.
What is correction that I should make to remedy the situation? |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10589 Location: Somewhere over Atlanta, Georgia
|
Posted: Mon Aug 29, 2011 9:15 pm Post subject: |
|
|
What you need to do is to shrink your home partition to make room to grow your root partition, then grow the root partition. My favorite tool for these types of manipulations is the GParted LiveCD but the filesystem you've chosen (JFS) isn't fully supported so it's more involved. The high level steps are as follows:- Learn a good backup program and make good backups of your root and home partitions. Convince yourself that these backups are good because correcting your partitions is major surgery on your installation and you could lose them. If you don't have another preferred choice, you can use FSArchiver, which is included on the GParted Live CD. (I use flexbackup but then I'm a magnetic tape kind of a guy.)
- Burn and then subsequently boot up the GParted Live CD.
- Delete the home partition to make room. If the swap partition is in the way of growing the root partition, then delete it too.
- Grow the root partition.
- Recreate the swap partition if necessary.
- Recreate the home partition.
- Restore the home partition backup.
Since you've got a large extra drive mounted on /media, at least where to back up to isn't a big issue. Best to do these backups to filesystems that aren't in use (i.e., boot from a LiveCD to do the backups). Note that the SystemRescueCD also contains both GParted and FSArchiver.
- John _________________ I can confirm that I have received between 0 and 499 National Security Letters. |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Tue Aug 30, 2011 4:40 am Post subject: |
|
|
enter /usr/src and remove all kernel dir which you don't need, that will free more than enough space.
it seems that portage doesn't clean all the files there, I guess that it is because they are created in the make process and not part of the kernel. _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
Randy Andy Veteran
Joined: 19 Jun 2007 Posts: 1148 Location: /dev/koelsch
|
Posted: Tue Aug 30, 2011 7:43 am Post subject: |
|
|
Hi Rr2516, all.
No need to give every hint separate, we have a good documentation for this here: (although i'm missing some more hints in it)
http://en.gentoo-wiki.com/wiki/Freeing_Up_Disk_Space
John R. Graham wrote: | For instance, "/var/tmp/portage" can grow to over 10GiB alone during the installation of some large packages (e.g., libreoffice). A more comfortable size for the rootfs partition would be 60-80Gib but it might be better to not split up the space like that. - John |
If you clean up your System regular, a lower size could be used without trouble.
On most of my Gentoo boxes i use only 20, GB size (on one only 15GB) for the whole system including KDE4, Office, and lots of other programs.
Only on my very fat 64Bit system, which includes also a 32bit toolchain for crosscompiling, i'm using a 40GB Partition.
After clean up everything, before backup, it uses only 16GB, before often more than 30 GB.
My home is always separate of course. My temp is only separate on the big machine.
On the lower boxes i never compiled a libreoffice purely, mostely with distcc. Eventually that's the reason why i never get an overflow cause less space during compiling on it. One of these has only 320MB RAM.
Best regards, Andy. _________________ If you want to see a Distro done right, compile it yourself! |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9679 Location: almost Mile High in the USA
|
Posted: Sun Sep 11, 2011 11:06 pm Post subject: |
|
|
The kernels in /usr/src linger around because they're slotted...
Use emerge --depclean to clean up some of the old kernels, it also helps keep the databases straight. Also after you depclean you should still delete the old directory if you actually built a kernel with it. The object files are created during build were not there during install and hence won't delete.
If you just emerge -uDNp world and never checked for extra kernels being installed, there's your free space... emerge --depclean should clean them up just fine since you didn't compile it...
I've been trying to set up a lean Gentoo on my eeePC 900A because I started with a 4G disk... Let me tell you this is very hard to do, if not impossible, with portage installed on it... But minus portage, I've been hovering around 3.2GB for my eeepc installation. The fairly basic GNOME install with libreoffice, is about 1GB each for /usr/share and /usr/lib, all other directories are much less packed than these two.
If you have Gnome installed there's a tool called "Disk Usage Analyzer" in the application/system tools directory that can help figure out where the space is going. But likely it's all the old distfiles still hanging around by the du report :o After you get this cleared up, there's a program "eclean" as part of app-portage/gentoolkit that will automatically clean up your /usr/portage/distfiles directory of stuff portage can't use (mostly deleted from portage stuff). Or you can use -d to clean up stuff that aren't installed on your machine, too. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
sinanqapudan Apprentice
Joined: 26 Oct 2004 Posts: 234 Location: Milan
|
Posted: Sat Jan 19, 2013 12:29 am Post subject: |
|
|
I have the same problem:
Code: | sargon / # du -sh *
0 4.5.3
4.0K backup
7.8M bin
15M boot
80K dev
5.3M etc
21G home
17M lib
16K lost+found
4.0K media
4.0K mnt
162M opt
du: cannot access 'proc/3416/task/3416/fd/4': No such file or directory
du: cannot access 'proc/3416/task/3416/fdinfo/4': No such file or directory
du: cannot access 'proc/3416/fd/4': No such file or directory
du: cannot access 'proc/3416/fdinfo/4': No such file or directory
0 proc
131M root
408K run
7.9M sbin
1.2T storage
0 sys
76K tmp
12G usr
5.1G var
|
The partitioning schema is the following:
/ 8G
/boot 350M
/home 50G
/usr 20G
/opt 4G
/var 20G
Why is / so bloated? How do I reduce disk usage?
Thanks |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Sat Jan 19, 2013 6:28 am Post subject: |
|
|
sinanqapudan wrote: | I have the same problem:
Code: | sargon / # du -sh *
0 4.5.3
4.0K backup
7.8M bin
15M boot
80K dev
5.3M etc
21G home
17M lib
16K lost+found
4.0K media
4.0K mnt
162M opt
du: cannot access 'proc/3416/task/3416/fd/4': No such file or directory
du: cannot access 'proc/3416/task/3416/fdinfo/4': No such file or directory
du: cannot access 'proc/3416/fd/4': No such file or directory
du: cannot access 'proc/3416/fdinfo/4': No such file or directory
0 proc
131M root
408K run
7.9M sbin
1.2T storage
0 sys
76K tmp
12G usr
5.1G var
|
The partitioning schema is the following:
/ 8G
/boot 350M
/home 50G
/usr 20G
/opt 4G
/var 20G
Why is / so bloated? How do I reduce disk usage?
Thanks |
did you followed the suggestions given above? please post the output of
_________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
sinanqapudan Apprentice
Joined: 26 Oct 2004 Posts: 234 Location: Milan
|
Posted: Sat Jan 19, 2013 8:58 am Post subject: |
|
|
Quote: | did you followed the suggestions given above? please post the output of
|
Yes, I do the housecleaning regularly. Anyway, cleaning /usr and /var will not free disk space up in / as I have dedicated partitions.
Code: | sargon / # df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 8.0G 7.6G 1.2M 100% /
/dev/root 8.0G 7.6G 1.2M 100% /
tmpfs 1013M 408K 1012M 1% /run
udev 10M 0 10M 0% /dev
shm 1013M 688K 1012M 1% /dev/shm
cgroup_root 10M 0 10M 0% /sys/fs/cgroup
/dev/sda1 388M 18M 351M 5% /boot
/dev/sda5 50G 22G 27G 46% /home
/dev/sda6 20G 12G 7.3G 62% /usr
/dev/sda7 4.0G 352M 3.5G 10% /opt
/dev/sda8 8.0G 5.3G 2.4G 70% /var
/dev/sdb1 153G 65G 81G 45% /storage/sdb
/dev/sde1 1.9T 1.2T 604G 66% /storage/sdc
/dev/sdd1 149G 2.4G 140G 2% /storage/sdd
|
and
Code: | sargon / # df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
rootfs 524288 4687 519601 1% /
/dev/root 524288 4687 519601 1% /
tmpfs 221379 511 220868 1% /run
udev 221379 506 220873 1% /dev
shm 221379 7 221372 1% /dev/shm
cgroup_root 221379 3 221376 1% /sys/fs/cgroup
/dev/sda1 102400 43 102357 1% /boot
/dev/sda5 3276800 23697 3253103 1% /home
/dev/sda6 1310720 449799 860921 35% /usr
/dev/sda7 262144 782 261362 1% /opt
/dev/sda8 524288 40351 483937 8% /var
/dev/sdb1 10010624 12 10010612 1% /storage/sdb
/dev/sde1 122101760 32120 122069640 1% /storage/sdc
/dev/sdd1 9773056 11 9773045 1% /storage/sdd
|
regards |
|
Back to top |
|
|
sinanqapudan Apprentice
Joined: 26 Oct 2004 Posts: 234 Location: Milan
|
Posted: Sun Jan 20, 2013 5:25 pm Post subject: |
|
|
Anybody out there? |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Sun Jan 20, 2013 5:44 pm Post subject: |
|
|
sinanqapudan wrote: | The partitioning schema is the following:
/ 8G
/boot 350M
/home 50G
/usr 20G
/opt 4G
/var 20G | This is very strange if you do not fill / with some data which you know: I think portage will install less than 0.5G outside of /usr, /var, and /opt if you made no symlinks to sometihng in / manually. If you have installed kde then probably filelight is the best tool to give you a nice overview how much is used.
Something which filelight cannot show you directly: It might be that you have filled something into /boot /home /usr /opt ... when it was not mounted by some accident. You could try something like: Code: | mkdir /tmp/foo (or another name)
mount --bind / /tmp/foo | and then check whether /tmp/foo/{home,usr,...} are in fact empty as they should be. |
|
Back to top |
|
|
|