Score:0

How do I expand centos-root to get more storage space?

bd flag
HAN

When I run fdisk -l on CentOS-7, I get the following:

Disk /dev/sdd: 1920.4 GB, 1920383410176 bytes, 3750748848 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/md127: 5760.7 GB, 5760746520576 bytes, 11251458048 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1572864 bytes


Disk /dev/mapper/centos-home: 1860.0 GB, 1860039606272 bytes, 3632889856 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

My operating system itself is in /dev/mapper/centos-root, which has a capacity of ~50GB. I don't care about the other disks and wish to extend this centos-root drive by 5.76TB (from the md1237 disk) or any of the other disks. How can I do this? I don't have any data that I need to back up but I cannot delete the network settings or the actual operating system. Thank you!

berndbausch avatar
us flag
You add /dev/md127 to the `centos` volume group, then use `lvextend` or `lvresize` to increase the root volume. If you add `-r`, the filesystem will be resized as well; if not, you will have to resize it manually in an additional step. To get more precise help, add the output of `lvs`, `vgs`, `pvs` and `lsblk -f` to the question.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.