H
H
hecse2021-12-23 13:52:19
linux
hecse, 2021-12-23 13:52:19

How to expand a Linux disk?

Allocate additional space to the virtual machine. It took shape on a separate disk, /dev/sdb. How can I expand the /dev/sda disk using the entire /dev/sdb space?
[61c4549863bcb447657892.png

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Saboteur, 2021-12-23
@hecse

No way.
sda/sdb are physical devices, they cannot be expanded at the expense of each other.
Here is the section with the file system, if it was originally made through LVM, it could be expanded. To do this, sdb would be added to the Volume Group where your file system is located and then it can already be expanded, and in most cases even online. But for this it is necessary that initially everything was done through LVM.
Or again, initially it was necessary to use a distributed file system such as zfs, then one more device could be added to the pool and expanded.
You have one partition on /dev/sda with the usual Linux filesystem type and formatted as is.
Therefore, all that can be done without a radical rework is to format /dev/sdb and mount it to some folder, dropping some of the data into this folder.
In addition, since your entire /dev/sda is the only disk in the system that contains both data and the system itself, even for any changes to the current configuration, you already need to at least boot from a live disk. In this regard, quickly and simply will not work.

P
pfg21, 2021-12-23
@pfg21

via LVM partition virtualization system or via aufs cascaded file system

R
rPman, 2021-12-23
@rPman

Do everything from another system (for example by booting livecd
) raid in single mode, when disks fill up as needed and can be of different sizes) You edit /etc/fstab ps backups! such operations, no matter how reliable they may seem, can lead to data loss

M
meDveD_spb, 2021-12-23
@meDveD_spb

It took shape on a separate disk, /dev/sdb.
n>
It did not take shape, but you created a separate disk, instead of expanding the existing one, as, apparently, you originally wanted.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question