Increased space - now what?

konline

New Member
Aug 22, 2017
1
0
1
54
Hi,

I have increased 100 G to a disk attached to a container. Now I want to use this increased space.

When I am entering df -h I get this output

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_server-lv_root
                       70G   66G  222M 100% /
tmpfs                 3.0G     0  3.0G   0% /dev/shm
/dev/vda1             477M  143M  310M  32% /boot

When I am entering fdisk -l, I get this

Code:
Disk /dev/vda: 187.9 GB, 187904818688 bytes
16 heads, 63 sectors/track, 364088 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a4a93

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *           3        1018      512000   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/vda2            1018       93621    46671872   8e  Linux LVM
/dev/vda3           93621      156039    31458303+  83  Linux

Disk /dev/mapper/vg_server-lv_root: 75.8 GB, 75770101760 bytes
255 heads, 63 sectors/track, 9211 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_server-lv_swap: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

So in this line
Code:
Disk /dev/vda: 187.9 GB, 187904818688 bytes
I can see, that my size increased. From this point on, how do I resize my space in such a way, so I can also use this additional 100G in /dev/mapper/vg_server-lv_root ? Does anyone have an idea?
 
Simplest way is adding a new partition to fill the free space, make it a pv, add the new pv to the vg, extend the root lv, then resize the fs on it. This should always work online.