LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   debian 8 / extend to use full drive (https://www.linuxquestions.org/questions/linux-server-73/debian-8-extend-to-use-full-drive-4175599753/)

MrCoolLV 02-15-2017 06:50 PM

like this ?


1. pvresize /dev/sda2
2. pvresize /dev/sda5
3. lvextend -L+900G --resizefs /dev/debian-vg/root

michaelk 02-15-2017 08:19 PM

Use gparted to increase the size of the extended partition sda2 to use all of the unallocated disk space then pvresize for sda5.

MrCoolLV 02-15-2017 08:31 PM

lol I have, doesnt give me that option only new

michaelk 02-15-2017 08:55 PM

You should be able to resize on the fly but its been awhile so you might have to reboot to a rescue or live CD. Make sure you have a good backup of all important data just in case.

As stated earlier adding a new partition and creating a new PV to extend the root LV would be quicker.

rknichols 02-15-2017 09:09 PM

When gparted booted, it made the LV active. You need to deactivate it. While running from the gparted CD, start up a root shell and run
Code:

vgchange -an debian-vg
It should report "0 logical volumes now active ...". Type ctrl-R in the gparted window to refresh the device list, and you should now be able to resize the extended partition.

Note that old versions of gparted may not allow this. I know that it does not work in version 0.23.0 and does work in version 0.26.1.

You don't need to reactivate the LV. That happens automatically when you boot.

MrCoolLV 02-15-2017 09:13 PM

ok will give that shot over the weekend


All times are GMT -5. The time now is 03:55 AM.