Score:0

How to extend root volume / with an extra storage disk

sr flag

I am trying to add a 2nd disk to a CentOS 8 instance and I want to extend the entire storage utilizing all the available extra space;

  • 1st storage: 40 GB
  • 2nd storage: 100 GB (added later)

The problem is I can't seem to find the expected /dev/mapper/cl-home (mounts to /home) volume! Of course I am missing something here. All the guides over internet are either about mounting the extra space to some other point like /nfs or to extend the /dev/mapper/cl-home mount point, doesn't match what I see!

My current configuration has the root mount point / taking the entire 1st disk. All I want to extend this / volume to be added with the extra 100 GB from 2nd disk.

[root@server]# df -hT
Filesystem     Type      Size  Used Avail Use% Mounted on
devtmpfs       devtmpfs  7.5G     0  7.5G   0% /dev
tmpfs          tmpfs     7.6G     0  7.6G   0% /dev/shm
tmpfs          tmpfs     7.6G   11M  7.6G   1% /run
tmpfs          tmpfs     7.6G     0  7.6G   0% /sys/fs/cgroup
/dev/sda1      ext4       38G   17G   20G  46% /
/dev/sda14     vfat       64M  5.8M   59M  10% /boot/efi
overlay        overlay    38G   17G   20G  46% /var/lib/docker/overlay2/49925326227fa6cca9da56239aa9de1efc4d14b33f0ee323e2f3af9c6a06b9cb/merged
overlay        overlay    38G   17G   20G  46% /var/lib/docker/overlay2/fd9414c35067cab62eed8f4b929d8a320bae64ff6d4cbb21d7071d3664c54601/merged
overlay        overlay    38G   17G   20G  46% /var/lib/docker/overlay2/fc91e9b428c361d76e349d7f01adcd73793bbf61b2b2646d0a049c406af96262/merged
tmpfs          tmpfs     1.6G     0  1.6G   0% /run/user/0

I was able to partition the 2nd storage with fdisk and reached up to /dev/sdb1, but can't seem to figure out how I add this /dev/sdb1 100 GB to the / mount point and make it nearly ~140 GB.

Thanks in advance.

Score:0
in flag

Your system wasn't set up with LVM, so extending the disk is not possible.

It is possible to convert your current setup to LVM, but it carries risks.

You can just mount the new disk at a useful mount point and move the existing data there.

Broken Arrow avatar
sr flag
Suspected that :( Just couldn't find confidence in me as am new to this. Do you know any simple and sweet guide to learn how to CURRENT FS => LVM?
in flag
Another option, since you said it's an "instance" I assume it's a virtual machine. Virtual disks can be extended, as well as partitions and filesystems. It would be easier to extend the current disk instead of adding a second one.
Broken Arrow avatar
sr flag
#Gerald Unfortunately, I don't seem to find an option to extend the primary storage with Hetzner :( So I added a new volume and I don't know which way is North!
Broken Arrow avatar
sr flag
Ok, I found the way to extend the primary storage with rescale. Thanks for the heads up Sir.
I sit in a Tesla and translated this thread with Ai:

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.