5

So, I recently created a 15GB partition for Linux Mint 14. I've been working on it for a while, and I got a Low Disk Space notification. I ran df -h and this is what I'm getting:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5        11G   11G  2.3M 100% /
udev            1.9G  4.0K  1.9G   1% /dev
tmpfs           751M  1.1M  750M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            1.9G  4.0M  1.9G   1% /run/shm
none            100M   16K  100M   1% /run/user

What are /dev, /run, and /run/shm, and can I resize them to be smaller and extend /dev/sda5 to use that space instead?

  • 1
    I suspect you have a <~15,000,000,000B partition with a >~11*1024*1024*1024B filesystem. Post the output of fdisk -l and df / (without -h, to have precise numbers). Anyway, unless you've resized the partition or something, the filesystem uses all the space in the partition. /run and the others are not the same filesystem, they don't take up any space in the partition (nor in RAM for that matter — only the ~5MB that's in use). – Gilles Apr 20 '13 at 23:52
  • As Gilles wrote, only the "Filesystem" /dev/sda5 directly occupies space on the harddrive. The other volumes are in the RAM disk (but they occupy only the used space). More details are also in my reply here: Shrink or delete udev partition in Ubuntu? – pabouk Jul 15 '16 at 7:46
6

/run and /run/shm are temporary filesystems residing in RAM. See What is this new filesystem /run?

/dev is where udev manages the device nodes for the kernel.

Essentially, you can change the size of your tmpfs (it is set by default to use half your total RAM) but, looking at your overall disk usage, you have a more pressing space issue than resizing your temporary filesystem.

The Arch Wiki fstab entry on tmpfs has details on how to resize it by, for example, including a line in your /etc/fstab:

tmpfs   /tmp    tmpfs   nodev,nosuid,size=2G     0  0
  • So if the /run folders are coming from my RAM, does that mean / and /dev come from the allocated space? If so, that still only adds up to 13GB - any idea where the other 2GB go? – justindao Apr 20 '13 at 20:42
  • 1
    The tmpfs is the maximum size that may be used. Your filesystem may also be using space for fsck to track files... – jasonwryan Apr 20 '13 at 20:44
  • @h7u9i, it is your root filesystem that is full; ignore the others. – psusi Apr 21 '13 at 2:21
2

Temporary increase tmpfs filesystem

1) Open /etc/fstab with vi or any text editor of your choice,

2) Locate the line of /dev/shm and use the tmpfs size option to specify your expected size,

e.g. 512MB: tmpfs /dev/shm tmpfs defaults,size=512m 0 0

e.g. 2GB: tmpfs /dev/shm tmpfs defaults,size=2g 0 0

mount -o remount /dev/shm

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.