Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running a linux server and I need to expand the /tmp partion. Everything I come across using fdisk or parted is saying that I need to unmount before expanding. Is this true, or can it be safely done while still mounted?

share|improve this question

migrated from Jan 5 '13 at 9:31

This question came from our site for professional and enthusiast programmers.

up vote 1 down vote accepted

there is no need to resort to an liveCD. I mostly follow those steps:

  1. resize the partition as needed
  2. if the resized partition can't be reread because it's active umount it
  3. if it can't be umounted because it's vital to the running system we must reboot
  4. now the resized partition can be online-expanded by 'resize2fs -p /dev/xxx'
share|improve this answer

This is true, you can not resize a mounted partition.

Download the gparted LiveCD, put it on a USB stick using unetbootin and boot from it. That way, the filesystem is not mounted and you can resize it.

Edit: with /tmp, you may also get away with rebooting the machine in single user mode or just booting to a shell. For example, if you pass init=/bin/bash as boot parameter, you boot nothing but a shell, so /tmp will probably not be mounted.

share|improve this answer
This is a remote server, with live traffic. /tmp is on it's own partition, so I could unmount, but I'll take down all the sites on the box that depend on the tmp data. Like sessions, mysql, etc. Thanks. I'll just take it down on an off hour. – Eric Leroy Jan 4 '13 at 15:27
There are some cases in which live resizing is possible, particularly if you use LVM, a resizable filesystem such as ext3, and a kernel that supports resizing live filesystems. – Sjoerd Jan 4 '13 at 15:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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