[Solved] df shows drives as /dev/dm-3 etc
[Solved] df shows drives as /dev/dm-3 etc
When I do
df -h
It should shows the drives as /dev/mapper/disk1 /dev/mapper/disk2 etc but it is showing them as /dev/dm-1 /dev/dm-2
It only started today and the only change was the latest 12.9 install.
fidsk / lsblk shows them as disk1/disk2 etc only df is showing it weird.
Solved: Looks like its a change and nothing I can do but live with it.
df -h
It should shows the drives as /dev/mapper/disk1 /dev/mapper/disk2 etc but it is showing them as /dev/dm-1 /dev/dm-2
It only started today and the only change was the latest 12.9 install.
fidsk / lsblk shows them as disk1/disk2 etc only df is showing it weird.
Solved: Looks like its a change and nothing I can do but live with it.
Last edited by debian1 on 2025-01-27 15:15, edited 1 time in total.
Re: [Software] df shows drives as /dev/dm-3 etc
Yes it works fine and it is being mounted by fstab. Just weird it was fine before the update and just changed recently. I can still see exactly what it's called using lsblk / fdisk etc. Just changed for df.
- pbear
- Posts: 557
- Joined: 2023-08-27 15:05
- Location: San Francisco
- Has thanked: 2 times
- Been thanked: 89 times
Re: [Software] df shows drives as /dev/dm-3 etc
As I recall, they're alternate ways of referring to the same thing. You're using encryption, right? FWIW, inxi also uses the dm- notation.
Re: [Software] df shows drives as /dev/dm-3 etc
@pbear That is the thing until the update, it was showing it properly.
- pbear
- Posts: 557
- Joined: 2023-08-27 15:05
- Location: San Francisco
- Has thanked: 2 times
- Been thanked: 89 times
Re: [Software] df shows drives as /dev/dm-3 etc
Checking an encrypted VM confirms my recollection. Run ls -l /dev/mapper and ls -l /dev/dm*. You'll see the former are merely symlinks to the latter. I would argue dm-0, etc. are the "real" folders. In other words, you're worrying about a non-issue. There's nothing to fix. FWIW, df reports /dev/mapper on two VMs (fully updated), so that's puzzling, but still not important.
For comparison, here's what I see with those two commands, plus a few others, in one of the VMs. For clarity, I've removed references to a couple of shared folders (which aren't in /dev/mapper or /dev/dm* anyway).
ETA: Testing a third encrypted VM for another thread, I discover df reports /dev/dm-0 for the system partition. What's different about said VM is that it was installed from a live ISO, where the other two were the Standard Installer. Can't imagine why this makes a difference, though. df is a GNU Core Utility and all three VMs are Debian 12, plain vanilla, fully updated.
For comparison, here's what I see with those two commands, plus a few others, in one of the VMs. For clarity, I've removed references to a couple of shared folders (which aren't in /dev/mapper or /dev/dm* anyway).
Code: Select all
pbear@fde-data:~$ ls -l /dev/dm*
brw-rw---- 1 root disk 253, 0 Jan 25 15:49 /dev/dm-0
brw-rw---- 1 root disk 253, 1 Jan 25 15:49 /dev/dm-1
pbear@fde-data:~$ ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Jan 25 15:48 control
lrwxrwxrwx 1 root root 7 Jan 25 15:49 sda4_crypt -> ../dm-0
lrwxrwxrwx 1 root root 7 Jan 25 15:49 sda5_crypt -> ../dm-1
pbear@fde-data:~$ df -hT -x tmpfs
Filesystem Type Size Used Avail Use% Mounted on
udev devtmpfs 2.8G 0 2.8G 0% /dev
/dev/mapper/sda4_crypt ext4 35G 13G 20G 40% /
/dev/sda3 ext4 974M 295M 613M 33% /boot
/dev/sda2 vfat 197M 5.9M 192M 3% /boot/efi
/dev/mapper/sda5_crypt ext4 24G 24K 23G 1% /data
pbear@fde-data:~$ inxi -Sp
System:
Host: fde-data Kernel: 6.1.0-30-amd64 arch: x86_64 bits: 64
Desktop: Cinnamon v: 5.6.8 Distro: Debian GNU/Linux 12 (bookworm)
Partition:
ID-1: / size: 34.14 GiB used: 12.64 GiB (37.0%) fs: ext4 dev: /dev/dm-0
ID-2: /boot size: 973.4 MiB used: 294.1 MiB (30.2%) fs: ext4
dev: /dev/sda3
ID-3: /boot/efi size: 196.9 MiB used: 5.8 MiB (3.0%) fs: vfat
dev: /dev/sda2
ID-4: /data size: 23.24 GiB used: 24 KiB (0.0%) fs: ext4 dev: /dev/dm-1
Re: [Software] df shows drives as /dev/dm-3 etc
I was not worried as everything worked and other commands showed the name as it used to. I was just wondering why df has now changed what it shows.
Re: [Software] df shows drives as /dev/dm-3 etc
Anyway to change it to back to how it was showing it before?
- pbear
- Posts: 557
- Joined: 2023-08-27 15:05
- Location: San Francisco
- Has thanked: 2 times
- Been thanked: 89 times
Re: [Software] df shows drives as /dev/dm-3 etc
Download the source code, edit to suit, compile as a binary, install.
This is going to be my last post in the thread. If anyone wants to take over, please feel free.
This is going to be my last post in the thread. If anyone wants to take over, please feel free.