Now on my server, we have 20GB disk size. We use it for daily backup with this path: /var/lib/backup
. Filesystem is on /vda
.
But it's small. It will be used out in future soon. So we added another volume(disk) to this instance. It like:
sudo lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sr0 iso9660 config-2 2020-03-05-17-33-22-00
vda
`-vda1 xfs 5c248666-70f5-4037-8b24-17100c2f5c1e /
vdb swap 5210b427-142c-4958-a2f9-461b4a431eec [SWAP]
vdc
`-vdc1 xfs 5c248666-70f5-4037-8b24-17100c2f5c1e
vdc
is added new one. /dev/vdc1
can be used.
If mount /dev/vdc1
to a special path such as /mnt
, the disk can be added. But daily files increasing occurred at /var/lib/backup
path(vda
volume). /mnt
can't be used automatically. How to make it possible to join them together?
I tried symbolic link for it.
ln -s /var/lib/backup /mnt
Here I have another question. If files in /var/lib/backup
increased, that's on /vda
, link to /vdc
, are the files use the same space both on the /vda
and /vdc
? Or use /vda
only, when /vda
used out, continue use /vdc
? How they use 2 different disks?
Here are the points I want to clarify:
/mnt
. Instead, you mount on a directory under it like/mnt/mydisk
.It is still possible to use links to increase disk space without too much trouble combining the partitions / disks.
Suppose, you have your files/directories organized under two directories like:
You need to backup your files under
dir1
, remove it, and then create a link:I am assuming you mounted the new partition under
/mnt/mydisk
and createddir1
.When writing to
dir1
, you are now writing to the new partition. When writing todir2
, you are still writing to the old partition.