How to umount / ? It's busy

I'm trying to use zerofree, which seems to be the answer for this: How to reduce VM size?

I have successfully umounted /dev/sda1, and zerofree worked fine, releasing ~37gb.

But I can't seem to umount or remount as read only /dev/mapper/mypc-root, it says:

umount: / is busy

or

mount: / is busy

The commands used were:

$ umount /dev/mapper/mypc-root
$ mount -no remount,ro -t ext2 /dev/mapper/mypc-root /

I'm in single user mode, entered it with 'init 1'.

The guest SO is Ubuntu 12, with encrypted LVM and home.

Any ideas?


/ can't be unmounted from the system, as / is in use (thus the message you see) by the system itself.

You will need to do this procedure from a Live-CD.


This typically happens when you have deleted, but still open files on your root filesystem. Some process is keeping a reference to the file and it can't be freed on disk until it is closed. Updating system libraries is one way to create such a situation.

Since there is no way how a filesystem in a clean state can contain a deleted but unfreed file, the kernel will refuse to remount the filesystem read only.

Restarting those processes helps. It lets the kernel free the files and the filesystem can be cleanly unmounted.

Another option is to force a readonly remount using the SysRq key:

echo u > /proc/sysrq-trigger

This is safe, but will cause kernel/fsck to complain on the next mount/run.