0

I am relatively new to linux, but am working on a remote server. Here's the output of df -h

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        29G  1.9G   28G   7% /
devtmpfs        252G     0  252G   0% /dev
tmpfs           252G     0  252G   0% /dev/shm
tmpfs            51G  1.0M   51G   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           252G     0  252G   0% /sys/fs/cgroup
/dev/sdb15      105M  5.2M  100M   5% /boot/efi
/dev/loop0       62M   62M     0 100% /snap/core20/1494
/dev/loop1       45M   45M     0 100% /snap/snapd/15904
/dev/loop2       68M   68M     0 100% /snap/lxd/22753
/dev/sdc1       2.4T   85M  2.2T   1% /mnt
tmpfs            51G     0   51G   0% /run/user/1000

I am generating ~100GB of data from a program, hence the 29GB space is getting filled mid-program run on /dev/root.

  1. Can I switch to either devtmpfs to tmpfs so that I am able to run this program? If yes, how?
  2. If not, how can I merge these filesystems so /dev/root has more space?
2
  • tmpfs is not a persistent filesystem - it's stored in RAM and disappears when it's unmounted (so also when the system shuts down). You have a 2+TB filesystem at /mnt, why not use it? How are you running the program?
    – gronostaj
    Commented Jun 2, 2022 at 10:44
  • Writing to /devtmpfs may not be advisable as that is shared memory (unless you want ramdisk like characteristics for the data). You can't practically merge /dev/root with /dev/devtmpfs as /dev/tmpfs is not a real disk filesystem.
    – davidgo
    Commented Jun 2, 2022 at 10:45

1 Answer 1

0

If you know, where your program writes to, you could either look into configuration or just mount the folder, where the program writes to, to a different drive and folder.

mount command

4
  • Tried the following 2 commands, getting these errors: azureuser@da-tpch-dbgen-ubuntu2:~$ sudo mount /dev/sdc1 /mnt. mount: /mnt: /dev/sdc1 already mounted on /mnt.. azureuser@da-tpch-dbgen-ubuntu2:~$ sudo mount devtmpfs /dev. mount: /dev: special device devtmpfs does not exist.. Commented Jun 2, 2022 at 10:31
  • Well, according to your list /dev/sdc1 is indeed already mounted as well as devtmpfs. It's already listed in the column in your OP. Basically under /mnt/ you are already accessing the root folder of the partition /dev/sdc1. You could also just create a folder within it like /mnt/myspecialfolder and then mount the folder that is used by your program to it.
    – rarog4k
    Commented Jun 2, 2022 at 10:35
  • Right, so how do I make my program use these instead of /dev/root which just has 29GB? Commented Jun 2, 2022 at 10:36
  • 1
    Your program probably doesn't write directly to /, so you first should find the exact folder that is used.
    – rarog4k
    Commented Jun 2, 2022 at 10:38

You must log in to answer this question.

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