1

On my Debian machine I have an application which is logging to a directory called /var/bbb/my-apps1.

This directory is currently mounted under the / (root partition), which in the following table, only has 877M of free space. Another application is logging to /var/bbb/my-apps2 and is using the 5.8G free space (see following table).

What is the best way to let the apps logging to /var/bbb/my-apps1 use the space of the Filesystem at /dev/xvdf1 ?

I want to avoid creating an entire new file system.

df -h

Filesystem      Size  Used Avail Use% Mounted on
udev            3.0G     0  3.0G   0% /dev
tmpfs           396M   40M  356M  11% /run
/dev/xvda2      12G   11G  877M  93% /
tmpfs           3.0G   12K  3.0G   1% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/xvdf1       20G   13G  5.8G  69% /var/bbb/my-apps2
tmpfs           395M     0  395M   0% /run/user/1000

Thank you

1 Answer 1

2

You could create a symlink.

ln -s apps2 /var/bbb/my-apps1

Linux also allows the same filesystem to be mounted at multiple locations. If they all need to have the same filesystem root mounted, it should be fine to just include the same /dev/xvdf1 device multiple times in fstab.

On the other hand, if some locations need a subdirectory to be mounted instead, you can use "bind" mounts to achieve this. For example:

mount --bind <source> <target>
mount --bind /mnt/data/apps1 /var/aaa/my-apps1

In fstab the entry would look like:

<source>  <target>  none  bind  0  0
/mnt/data/apps2  /var/aaa/my-apps2  none  bind  0  0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .