Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

Here are my partitions:

[awake@desktop ~]$ sudo df -h
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 36G  2.5G   33G   8% /
udev                  495M     0  495M   0% /dev
tmpfs                 502M  260K  502M   1% /dev/shm
tmpfs                 502M  748K  501M   1% /run
                       36G  2.5G   33G   8% /
tmpfs                 502M     0  502M   0% /sys/fs/cgroup
tmpfs                 502M     0  502M   0% /media
/dev/sda1             485M   50M  410M  11% /boot
                       36G   20G   15G  59% /home
                       36G  2.5G   33G   8% /tmp
                       36G  2.5G   33G   8% /var/tmp
                       36G   20G   15G  59% /home
/dev/sdb5             932G  637G  295G  69% /media/Новый том

So I have no any free space. How to send a part of / partitions size to /home in encrypted lvm without data loosing?

share|improve this question
up vote 4 down vote accepted

To shrink a filesystem to XX GB, you might want to follow these steps :

  • umount the filesystem you want to shrink
  • Run a fsck on the filesystem
  • Resize the filesystem with resize2fs /dev/blah XXG
  • lvreduce -L XXG /dev/blah

Then you can extend the other filesystem online : - lvextend -L YYG /dev/blah - resize2fs /dev/blah

That should make it, of course if you want to shrink /, you can boot on a live CD/USB key :)

share|improve this answer
Thanks and can be done without any free space on disk (I mean that whole disk is parted)? So at first I need to decrease / size with fsck&resize2fs&lvreduct and after increase with this method /home to? – purple Aug 24 '11 at 12:50
Yes, it should work while you have / and /home under the same volume group. If that's not the case, you'll also have to reduce the VG attached to / and then extend the VG attached to /home prior to extending the /home partition – MunsterNet Aug 24 '11 at 12:56
For some tips on how to safely reduce the size of an LVM-based filesystem, see… - this is more error prone than enlarging an FS. Make sure you have a good backup before you resize, it's quite easy to wipe out entire LVs if not done correctly. – RichVel Aug 24 '11 at 14:49

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.