I
I
Ivan Ivanov2020-07-21 14:42:45
linux
Ivan Ivanov, 2020-07-21 14:42:45

Is it possible to increase the size of a folder with another volume?

In general, on hetzner, after adding a volume in the cloud, this is the situation:

df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        24G   22G  928M  96% /
udev             10M     0   10M   0% /dev
tmpfs           196M   28M  168M  15% /run
tmpfs           489M     0  489M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           489M     0  489M   0% /sys/fs/cgroup
tmpfs            98M     0   98M   0% /run/user/0
/dev/sdb        9.8G   37M  9.3G   1% /mnt/HC_Volume_6352371

Is there a way to increase the size of the "/" folder? That is, somehow connect / dev / sdb to / dev / sda1 and not lose data? Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2020-07-21
@q2digger

The situation is opposite, if there was LVM everything would be much simpler.
I would do so.
I would add another disk, say it will be sdb I would
determine what takes up the most space on the current partition, for example it will be /var
I would boot from for example systemrescuecd , mount sda1 , make a partition sdb1 , register sdb1 in fstab , transfer our large folder on the second disk and reboot to normal.

A
Alexey Dmitriev, 2020-07-21
@SignFinder

It is more correct to transfer some directories to the second disk (there are no folders in Linux, the directories are there).
On the partition where / is located, it is undesirable to place directories in which a large amount of information can suddenly appear and fill up all the free space - /home/, /var/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question