I have a Debian server and I would like to increase the "root" partition from 5GB to 17GB and to diminish the "home" partition from 14GB to 2GB.
Here's the filesystem config:
root@APP05:~# df -T
Sys. fich. Type 1K-blocks Util. Disponible Uti% Monté sur
rootfs rootfs 5354080 1388664 3693444 28% /
udev devtmpfs 10240 0 10240 0% /dev
tmpfs tmpfs 205416 168 205248 1% /run
/dev/mapper/APP05-root ext4 5354080 1388664 3693444 28% /
tmpfs tmpfs 5120 0 5120 0% /run/lock
tmpfs tmpfs 410820 0 410820 0% /run/shm
/dev/sda1 ext2 233191 17794 202956 9% /boot
/dev/mapper/APP05-home ext4 14360944 166712 13464736 2% /home
I googled for some answers, read a couple of Q&A on several forums but I'm not sure what are the right commands to achieve this. From what I understand, "/dev/mapper/APP05-root" is an LVM, so extending it's size needs to be done after extending "rootfs" size, which is a filesystem.
Can you please tell me how I should proceed?
The main difference I see is that it uses
– Cosmin Oct 24 '14 at 13:17lvreduce -L 40G
, and it doesn't care about the filesystem overhead). And also, it useslvextend -l +100%FREE
to extend the second partition, without exactly specifying the size (but making sure to occupy all the free space). Is this a better approach, or should I stick to what I have?lsof
for find out which processes are using the mount and stop them, or do all the work at single user level, although you may lose paste functionality depending on how your console is configured. – geedoubleya Oct 24 '14 at 13:17