0

I am a regular Windows user and from time to time I've developed things on Linux but space and machine was provided to me back then. Now I'm using Microsoft Azure and an Ubuntu Virtual Machine by myself and this error seems so strange to me. Why there are lots of mounts and not a combined memory like just /dev/ ? Can't I just merge them altogether? And is there some command from terminal to make free space re-distributed from the one's that have it to one's that not have it.

I typed df -i to see whats going on and the result is:

Filesystem      Inodes  IUsed   IFree IUse% Mounted on
/dev/root      3870720 396517 3474203   11% /
devtmpfs       2048512    464 2048048    1% /dev
tmpfs          2049470     63 2049407    1% /dev/shm
tmpfs          2049470   1051 2048419    1% /run
tmpfs          2049470      4 2049466    1% /run/lock
tmpfs          2049470     18 2049452    1% /sys/fs/cgroup
/dev/loop0       10833  10833       0  100% /snap/core18/2246
/dev/loop1       10836  10836       0  100% /snap/core18/2253
/dev/loop2       11736  11736       0  100% /snap/core20/1242
/dev/loop3       11776  11776       0  100% /snap/core20/1270
/dev/loop5         796    796       0  100% /snap/lxd/21835
/dev/sdb15           0      0       0     - /boot/efi
/dev/loop6         479    479       0  100% /snap/snapd/14295
/dev/loop7         479    479       0  100% /snap/snapd/14066
/dev/loop4        5777   5777       0  100% /snap/docker/1125
/dev/sda1      2097152     12 2097140    1% /mnt
tmpfs          2049470     37 2049433    1% /run/user/123
tmpfs          2049470     64 2049406    1% /run/user/1000
/dev/loop8        2268   2268       0  100% /snap/intellij-idea-community/337
/dev/loop9       40310  40310       0  100% /snap/postman/149

df -h:

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        29G   27G  2.2G  93% /
devtmpfs        7.9G     0  7.9G   0% /dev
tmpfs           7.9G   83M  7.8G   2% /dev/shm
tmpfs           1.6G  1.5M  1.6G   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           7.9G     0  7.9G   0% /sys/fs/cgroup
/dev/loop1       56M   56M     0 100% /snap/core18/2253
/dev/loop0       56M   56M     0 100% /snap/core18/2246
/dev/loop2       62M   62M     0 100% /snap/core20/1242
/dev/loop3      818M  818M     0 100% /snap/intellij-idea-community/337
/dev/sdb15      105M  5.2M  100M   5% /boot/efi
/dev/loop4       62M   62M     0 100% /snap/core20/1270
/dev/loop5      169M  169M     0 100% /snap/postman/149
/dev/loop7       68M   68M     0 100% /snap/lxd/21835
/dev/loop6       44M   44M     0 100% /snap/snapd/14295
/dev/loop8      117M  117M     0 100% /snap/docker/1125
/dev/loop9       43M   43M     0 100% /snap/snapd/14066
/dev/sda1        32G   49M   30G   1% /mnt
tmpfs           1.6G   20K  1.6G   1% /run/user/123
tmpfs           1.6G   28K  1.6G   1% /run/user/1000
2
  • The command df -i checks for inodes on your filesystem. There does not seem to be any inode issues in your output. The output of the command df -h will show space usage instead of inode usage, does that output point to any problems? Dec 21, 2021 at 16:01
  • @GracefulRestart I updated the questions with df -h, thanks :) Dec 22, 2021 at 8:49

4 Answers 4

0

You are using an Azure Virtual Machine, so you mostly get whatever disk partition scheme they offer you.

The /dev mount is a devtmpfs file system which is a temporary file system loaded into RAM that is mostly used by your kernel to make device files available.

The /run mount is also a temporary file system loaded in RAM, mostly used by systemd and other services that want temporary file space.

The /snap mounts come from using software packages installed with Snap. These utilize loop devices and are usually not writable. You will get some sort of "No space on device" error when trying to write to any of these locations and that is represented in df -h as showing those mounts as 100% in use.

All of your usable disk space seems to be split between two devices:

/dev/root which reports 29G of total space and 27G used, leaving 2.2G available and is mounted at /, otherwise known as the root file system. The majority of your data looks to be somewhere in here. The command du -h --max-depth=1 / should show where the disk space is being used.

/dev/sda1 which reports 32G of total space and 40M used, leaving around 30G of available space and is mounted at /mnt. You should be able to configure things to use that location to store data.

For answers on why Azure does disks this way, you would have to ask them. If you want the space of your two data disks merged and offered as a single mount with 60G total space, they may be able to offer you a virtual machine that fits that criteria.

0

As you can see all those "full" filesystems are /dev/loop devices. And they map to file, not to disk. You can mount for example ISO image and will see the same result. Here is extract from man page:

The loop device is a block device that maps its data blocks not to a physical device such as a hard disk or optical disk drive, but to the blocks of a regular file in a filesystem or to another block device.

0

A bit more high-level: You're going to have a mountpoint for each "device" you have. There's no way to merge them, and you don't want your free space redistributed across "devices", that would mean files ending up on different "devices" than where you put them.

In your case there is no real problem. All the full filesystems are loop devices (i.e. "devices" corresponding to files) and mounted on /snap, while I don't know how snaps work, it doesn't surprise me that it involves virtual filesystems .

2
  • But I keep getting no space left on device error, is there a way to solve this? Dec 22, 2021 at 11:40
  • How to do that depends on what device that are causing them. Can you be a little more specific? As I suspect that to be your actual problem, maybe a new question around that, so others don't have to look in the comments to an answer to find it. Dec 22, 2021 at 14:13
0

@Jeredriq Demas : I'm facing a similar issue in Azure Linux VM. Did you solve this ? If so, can you post the solution

1

You must log in to answer this question.

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