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.

I installed Centos 6.3 as a KVM guest OS, and used the default partition settings.

Now I noticed that my / partition is 50GB and my /home is only 20GB. I want to increase my /home to atleast 50GB and / to 20GB.

How can I do the above without losing any data? If reducing the / partition is risky, can I unmount /home, extend the / partition to 70GB and make /home as a directory on the / partition? Thanks

share|improve this question
add comment

1 Answer

On Linux systems, is easier and safer to extend, but with a good backup (if you have data) shrinking isn't a problem neither.

I belive (correct me if wrong) that you have one disk, one group volum and two logical volums (command lvs for show them).

in that scenario, I'll copy /home data to /home_bk folder, then unmount /home, delete the logical volum for /home, extend the remaining volum with lvextend, then extend the filesystem and then rename /home_bk to /home.

You dont need to mount it again.

Anyway, LVM is great for shrinking and extending, all the options are good, just remember that You must shrink the FileSystem BEFORE shrinking the Volum

share|improve this answer
add comment

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.