We need to resize the partition that is mounted to /var on a running machine. The only way to access it is via SSH, so live CD is not an option for us.

Can we repartition the file system without losing any data? (The system is freshly installed so there isn't any data yet.)

We tried parted but we got following warning:

Error: File system was not cleanly unmounted! You should run e2fsck. Modifying an unclean file system could cause severe corruption.


1 Answer 1


First you have to stop all programs which use /var. You can find them with fuser -m /var.

Here you have to take care that you do not kill your SSH session. In order to keep SSH alive it might be necessary to temporarily reconfigure your SSH server to prevent any access to /var.

After that you can unmount your /var partition. And then you can use parted or any other partition tool, which also resizes the Ext2/3 filesystem.

It might be better to discuss this on https://unix.stackexchange.com/

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.