We're running out of disk space on centos-root, and I want to enlarge the partition. This is a remote Centos 7 server halfway across the country, so I can't use anything like GParted.
Here's the `df -H` output...
Code:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 54G 22G 32G 41% /
/dev/sda1 518M 334M 185M 65% /boot
/dev/mapper/centos-home 78G 104M 78G 1% /home
Here's the `fdisk -l` output...
Code:
Disk /dev/sda: 322.1 GB, 322122547200 bytes, 629145600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x0007be79
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 266338303 132656128 8e Linux LVM
Disk /dev/sdb: 136.4 GB, 136365211648 bytes, 266338304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/centos-root: 53.8 GB, 53754200064 bytes, 104988672 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/centos-swap: 4160 MB, 4160749568 bytes, 8126464 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/mapper/centos-home: 77.9 GB, 77921779712 bytes, 152190976 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
And finally, the `lsblk` command...
Code:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 300G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 8:2 0 126.5G 0 part
├─centos-root 253:0 0 50.1G 0 lvm /
├─centos-swap 253:1 0 3.9G 0 lvm [SWAP]
└─centos-home 253:2 0 72.6G 0 lvm /home
sdb 8:16 0 127G 0 disk
sr0 11:0 1 1024M 0 rom
So a couple of things of note here:
1) The /dev/sda disk shows that it is 322.1 GB, yet the sda1 and sda2 partitions only combine to take up 127 GB. Where the heck is that other 195 GB, and what is it doing? How do I add it to the sda2 PV?
2) The /dev/sdb disk is apparently a new and unmounted disk. I would like to combine that 127 GB with the unused 195 GB on sda, and add that to centos-root.
Is this possible, and if so, how do I do it? I've searched all day for tutorials, but can't seem to find what I need. I'm not new to Linux, but I've never dealt with disks and partitions before. So specific details would be greatly appreciated!