debian 8 / extend to use full drive
Hello, im looking for a way to expand the storage (lvextend -l +100%FREE /dev/mapper/debian--vg-root) but im being very careful as is an live production server i manged to get the other system done just fine months ago but forgotten the steps
storage is 1.3TB as you can see on fdisk, but on /dev/mapper/debian--vg-root is only showing 119GB. any help will be great thanks root@mx:~# fdisk -l Quote:
Quote:
Quote:
Quote:
|
Expanding a partition does not automatically resize the filing system it contains
There was a thread recently with the same issue: http://www.linuxquestions.org/questi...ce-4175599382/ the answer you seek is probably in there :). |
Go get a good LVM guide - the RHEL LVM admin guide is one such. It is available (from RH) for free download, no registration required.
The pv needs to be enlarged first, then the vg, and lastly the lv. Then as suggested, the filesystem - fsadm will likely do the last two at once for you, depending on filesystem. Rather than mess with enlarging the pv, a safer (and preferred by me) option is to create a new pv on the free space and add it to the vg, then processd as normal. See the admin guide above. |
Quote:
i try this before seems not to work http://unix.stackexchange.com/questi...lling-linux-or |
Your extended partition is using just 119.8GB, and not the full 1.3TB of the disk. It is fully used by sda5. To create a logical partition sda6 you first have to enlarge the extended partition. You can do that with gparted and create sda6. Since you presently have just 2 primary partitions, you could also just create sda3 in the available ~1.24TB. Either of those is going to require a reboot to let the kernel use the new partitioning.
|
Quote:
thank you, question no way to just expand sda5 ? |
Quote:
|
Quote:
1. pvresize /dev/sda5 2. resize2fs /dev/dm-0 +900G 3. lvextend -L+900G /dev/debian-vg/root --resizefs |
Quote:
Code:
lvextend -L+900G --resizefs /dev/debian-vg/root |
Quote:
this is the message i got Physical volume "/dev/sda5" changed 1 physical volume(s) resized / 0 physical volume(s) not resized root@mx:~# lvextend -L+900G /dev/debian-vg/root --resizefs Insufficient free space: 230400 extents needed, but only 0 available root@mx:~# |
with corrected line #2
root@mx:~# pvresize /dev/sda5 Physical volume "/dev/sda5" changed 1 physical volume(s) resized / 0 physical volume(s) not resized root@mx:~# lvextend -L+900G --resizefs /dev/debian-vg/root Insufficient free space: 230400 extents needed, but only 0 available root@mx:~# ^C |
What does "pvdisplay" report now?
|
rknichols,
I do not think /dev/sda2 was resized yet? |
thank you for helping
root@mx:~# pvdisplay --- Physical volume --- PV Name /dev/sda5 VG Name debian-vg PV Size 119.76 GiB / not usable 0 Allocatable yes (but full) PE Size 4.00 MiB Total PE 30658 Free PE 0 Allocated PE 30658 PV UUID dXxbLy-2Kf5-kCEh-8gWa-JBKl-5Arx-h3zGEl |
@michaelk -- The pvresize command reported success ("1 physical volume(s) resized...").
Oops, you're right. There was no explicit size request there. @MrCoolLV -- You need to resize the partitions first. |
All times are GMT -5. The time now is 11:10 PM. |