3

I have separate partitions for / and /home, yet my root partition is ~30 GB and growing. Why does everyone recommend a 15-25 GB root partition, and how is this achieved?

Here is my space usage, along with some info of the storage culprits:

[lucas@lucas-ThinkPad-W520]~$ sudo du -sh /
du: cannot access ‘/proc/4889/task/4889/fd/4’: No such file or directory
du: cannot access ‘/proc/4889/task/4889/fdinfo/4’: No such file or directory
du: cannot access ‘/proc/4889/fd/4’: No such file or directory
du: cannot access ‘/proc/4889/fdinfo/4’: No such file or directory
du: cannot access ‘/run/user/1000/gvfs’: Permission denied
39G    /

[lucas@lucas-ThinkPad-W520]~$ sudo du -sh /* | sort -h -r
du: cannot access ‘/proc/4951/task/4951/fd/4’: No such file or directory
du: cannot access ‘/proc/4951/task/4951/fdinfo/4’: No such file or directory
du: cannot access ‘/proc/4951/fd/4’: No such file or directory
du: cannot access ‘/proc/4951/fdinfo/4’: No such file or directory
du: cannot access ‘/run/user/1000/gvfs’: Permission denied
9.7G    /var
9.2G    /usr
7.9G    /home
4.7G    /data
4.5G    /opt
1.2G    /lib
963M    /media
165M    /boot
57M    /root
16M    /etc
11M    /sbin
9.6M    /bin
3.8M    /lib32
1.6M    /run
48K    /tmp
16K    /lost+found
8.0K    /srv
4.0K    /mnt
4.0K    /lib64
4.0K    /dev
4.0K    /cdrom
0    /vmlinuz.old
0    /vmlinuz
0    /sys
0    /proc
0    /initrd.img.old
0    /initrd.img
[lucas@lucas-ThinkPad-W520]~$ 

[lucas@lucas-ThinkPad-W520]~$ sudo du -sh /data/*
3.1G    /data/db
545M    /data/rs1
545M    /data/rs2
545M    /data/rs3

[lucas@lucas-ThinkPad-W520]~$ sudo du -sh /opt/*
4.2G    /opt/android-sdk-linux
179M    /opt/google
112M    /opt/spotify

[lucas@lucas-ThinkPad-W520]~$ sudo du -sh /var/lib/mongodb/
8.3G    /var/lib/mongodb/

[lucas@lucas-ThinkPad-W520]~$ sudo du -sh /usr/share/doc
1.5G    /usr/share/doc

[lucas@lucas-ThinkPad-W520]~$ sudo du -sh /usr/share/texlive/
1.2G    /usr/share/texlive/

[lucas@lucas-ThinkPad-W520]~$

Also, I am about to re-install my OS (upgrading from Ubuntu 13.10 to 14.04), so I have the opportunity to change the partition size of root. Any recommendations?

[lucas@lucas-ThinkPad-W520]~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0   1.5G  0 part 
├─sda2   8:2    0 258.4G  0 part 
├─sda3   8:3    0     1K  0 part 
├─sda4   8:4    0  15.6G  0 part 
├─sda5   8:5    0    83G  0 part /
├─sda6   8:6    0   7.9G  0 part [SWAP]
└─sda7   8:7    0  95.7G  0 part /home
sr0     11:0    1   964M  0 rom  /media/lucas/Ubuntu 14.04 LTS amd64

[lucas@lucas-ThinkPad-W520]~$ sudo blkid
/dev/sda1: LABEL="SYSTEM_DRV" UUID="30CA6C06CA6BC6A6" TYPE="ntfs" 
/dev/sda2: LABEL="Windows7_OS" UUID="9426707E26706362" TYPE="ntfs" 
/dev/sda4: LABEL="Lenovo_Recovery" UUID="E2CA772DCA76FD5B" TYPE="ntfs" 
/dev/sda5: UUID="7d513625-85de-41b7-9c81-0d3fbc4e6a0f" TYPE="ext4" 
/dev/sda6: UUID="602d2625-8ab9-44e5-b73a-d1f0181f5549" TYPE="swap" 
/dev/sda7: LABEL="home" UUID="b1507090-0652-4dae-9fe4-3611de8ab218" TYPE="ext3" 
/dev/sr0: LABEL="Ubuntu 14.04 LTS amd64" TYPE="iso9660" 
  • Note mongodb placed its database into /var/lib/mongodb/ which will keep your root partition growing depending on your use. There is a smallfiles option and configuration setting that may help if you are doing development on your laptop and don't need all that space. – maxpolk Mar 19 '16 at 15:13
4

The partitioning of your system strictly depends on its purpose. I would partition even a small home server not in the same way as a desktop system as they not only differ in the purpose but also in the installed software. To me it seems the 15-25 GB proposal only applies to general Linux systems designed for daily use.

For a desktop/laptop 25 GB ought to be enough for anybody most users unless you have installed several full-fledged desktop environments with all their programs and tools.

/var is a directory that can dramatically grow in size over time if you have uncompressed syslogs stored in there or stuff like webserver or database contents (some distributions source them out to /srv) or cached data (like downloaded packages from your packaging manager).

5 to 10 GB should be sufficent for all the programs stored in /usr … in most cases because the binaries are not the most critical parts in /usr but fonts or supplemental data like graphics or icons (think of hundreds of icons from different icon themes provided as SVGs as well as prerendered PNGs in several dimensions) or all the data that comes with a full-fledged LaTeX system as in your case.

gdmap, a visual analyzer for space consumption on harddisks, may help you to find out which parts of your system consume the most space and therefore to plan your future partitioning.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.