LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-14-2020, 09:17 AM   #1
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369
Blog Entries: 1

Rep: Reputation: 49
Understanding /dev/


Dear LQ,

Anyone volounteers to explain what those lines mean ? it's the output of testdisk. What is /dev/mapper/* and what is /dev/dm* ?


>Disk /dev/sda - 599 GB / 558 GiB - HP LOGICAL VOLUME
Disk /dev/sdb - 1499 GB / 1396 GiB - HP LOGICAL VOLUME
Disk /dev/mapper/DataStorage-vm--106--disk--0 - 268 GB / 250 GiB - HP LOGICAL V
Disk /dev/mapper/DataStorage-vm--106--disk--2 - 107 GB / 100 GiB - HP LOGICAL V
Disk /dev/mapper/pve-data - 461 GB / 429 GiB
Disk /dev/mapper/pve-data_tdata - 461 GB / 429 GiB - HP LOGICAL VOLUME
Disk /dev/mapper/pve-data_tmeta - 4706 MB / 4488 MiB - HP LOGICAL VOLUME
Disk /dev/mapper/pve-data-tpool - 461 GB / 429 GiB
Disk /dev/mapper/pve-root - 103 GB / 96 GiB - HP LOGICAL VOLUME
Disk /dev/mapper/pve-swap - 8589 MB / 8192 MiB - HP LOGICAL VOLUME
Disk /dev/mapper/pve-vm--101--disk--0 - 21 GB / 20 GiB
Disk /dev/mapper/pve-vm--102--disk--0 - 21 GB / 20 GiB
Disk /dev/mapper/pve-vm--103--disk--0 - 34 GB / 32 GiB
Disk /dev/mapper/pve-vm--103--state--http_OK - 4819 MB / 4596 MiB
Disk /dev/dm-0 - 8589 MB / 8192 MiB - HP LOGICAL VOLUME
Disk /dev/dm-1 - 103 GB / 96 GiB - HP LOGICAL VOLUME
Disk /dev/dm-10 - 34 GB / 32 GiB
Disk /dev/dm-12 - 4819 MB / 4596 MiB
Disk /dev/dm-17 - 268 GB / 250 GiB - HP LOGICAL VOLUME
Disk /dev/dm-2 - 4706 MB / 4488 MiB - HP LOGICAL VOLUME
Disk /dev/dm-3 - 461 GB / 429 GiB - HP LOGICAL VOLUME
Disk /dev/dm-4 - 461 GB / 429 GiB
Disk /dev/dm-5 - 461 GB / 429 GiB
Disk /dev/dm-7 - 21 GB / 20 GiB
Disk /dev/dm-8 - 21 GB / 20 GiB
Disk /dev/dm-9 - 107 GB / 100 GiB - HP LOGICAL VOLUME
 
Old 04-14-2020, 09:59 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
/dev/dm* are device mapper device files. Device mapper creates devices such as logical volumes, encrypted disks or multipath disks based on lower level devices. For example, a logical volume might be created from several physical volumes or parts of those physical volumes.

/dev/dm* file names are not persistent. There is no guarantee that a device gets the same name after a reboot. To solve this problem, persistent names are created under /dev/mapper. The files in this directory are symbolic links that point to the correct /dev/dm* files.

In your case, device mapper implements logical volumes in a volume group named pve.
 
Old 04-14-2020, 10:13 AM   #3
ychaouche
Member
 
Registered: Mar 2017
Distribution: Mint, Debian, Q4OS, Mageia, KDE Neon
Posts: 369

Original Poster
Blog Entries: 1

Rep: Reputation: 49
Thanks berndbausch ! so if I understand correcltly there should be two logical groups : pve and datastorage ?
 
Old 04-14-2020, 12:59 PM   #4
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
You should (also) be looking at it from the LVM perspective, to see exactly what is what.
vgs
vgdisplay
lvs
lvdisplay
and so on.

Proxmox uses LVM by default and allocates linux volumes to its virtual machines (kvm) and to its containers (lxc), but by default it also uses a thin pool - that's a feature in lvm that uses dynamically allocated space, so that you have a more efficient use of space. If you preallocated space, then you can't (easily) change it afterwards. But using thin pools can also be risky, of course, 'cause if you run out of a space it's usually more dangerous than running out of ram or cpu and the VM usually 'think' they have more space available than they actually have.

I think vgdisplay (or vgs) should tell if you if you're using a thin-pool, there should be a 't' flag somewhere.

They might call 'pve' the physical volume, I don't remember exactly. LVM consists of three layers: physical disks, volume groups, linux volumes. A physical disk is usually linux partition. A volume group can span several physical disks (you can create arrays). And linux volumes reside inside volume groups. So inside the linux volumes you can format that space to create the actual filesystem, which in turn can eventually be used for storing the 'real' data.

Anyway, what you see there is a notation used by proxmox. It might be physical disk + linux volume or rather volume group + linux volume, don't remember exactly.

In any case, there are a lot of useful lvm tutorials on the internet, for instance:
https://www.digitalocean.com/communi...and-operations
 
1 members found this post helpful.
  


Reply

Tags
partitions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Help with understanding the 'with' keyword and understanding file reading and writing. vysero Programming 3 05-30-2018 02:37 PM
pseudo terminals: /dev/ptmx <-> /dev/pts/ vs. /dev/ptyp <-> /dev/ttyp rtspitz Linux - Software 2 12-02-2011 02:07 PM
/dev/cdrom links to /dev/sg0 instead of /dev/sr0 -why? Yalla-One Slackware 3 10-01-2006 07:02 PM
/dev/tty0, /dev/tty1, /dev/tty10...and so on...which should be used for a device ??? b0nd Slackware 2 04-02-2006 08:14 AM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 07:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration