0

This question already has an answer here:

I am trying to restore about 75GB worth of MySQL to a new server. I ran out of room about halfway through because it is storing the contents inside of my primary system partition. This is fine I just need to move some of the free space from my home directory to this partition so that I can transfer the remaining data. This is the output of a few common commands.

[root@user ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   50G   45G  5.8G  89% /
devtmpfs                  63G     0   63G   0% /dev
tmpfs                     63G     0   63G   0% /dev/shm
tmpfs                     63G  8.9M   63G   1% /run
tmpfs                     63G     0   63G   0% /sys/fs/cgroup
/dev/sda1               1014M  184M  831M  19% /boot
/dev/mapper/centos-home  145G  4.5G  141G   4% /home
tmpfs                    13G     0   13G   0% /run/user/0

You can see here the issue, my /dev/mapper/centos-root is only 50gb, I need it to be about 100 to finish the import. /dev/mapper/centos-home has plenty of free space so I would like to move that from that partition to the other.

[root@user ~]# fdisk -l

Disk /dev/sda: 214.7 GB, 214748364800 bytes, 419430400 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 label type: dos
Disk identifier: 0x000c285e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200   419430399   208665600   8e  Linux LVM

Disk /dev/sdb: 214.7 GB, 214748364800 bytes, 419430400 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.7 GB, 53687091200 bytes, 104857600 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-swap: 4294 MB, 4294967296 bytes, 8388608 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-home: 155.7 GB, 155688370176 bytes, 304078848 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

I am not an expert so the fdisk command was less helpful for me and instead I ran this command to confirm that there are 2 virtual disks, and from what I can gather both the centos partitions are on the same physical drive, /dev/sda

[root@user ~]# lshw -class disk -short
H/W path           Device      Class          Description
=========================================================
/0/100/7.1/0.0.0   /dev/cdrom  disk           VMware IDE CDR00
/0/100/10/0.0.0    /dev/sda    disk           214GB Virtual disk
/0/100/10/0.1.0    /dev/sdb    disk           214GB Virtual disk

marked as duplicate by sebasth, user34720, thrig, G-Man, schily Jun 27 '18 at 11:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.