Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
2  
Here you go! serverfault.com/questions/90270/… –  michalwu Aug 31 '11 at 9:03

1 Answer 1

up vote 2 down vote accepted

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 http://unix.stackexchange.com/

share|improve this answer

Your Answer

 
discard

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.