Device Mapper Notations and LVM

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Device Mapper Notations and LVM
# 1  
Old 12-02-2009
Device Mapper Notations and LVM

Hi,

I had a doubt regarding device mapper notations and their corresponding LVM volumes.

I have configured a volume group with two logical volumes in it as root and swap.

The entries in the /etc/fstab file show the dm notations namely,

/dev/mapper/VolGroup00-LogVol01
/dev/mapper/VolGroup00-LogVol02

instead of,

/dev/VolGroup00/LogVol01
/dev/VolGroup00/LogVol02

Also swapon -s command gives the dm notation, i.e /dev/mapper/VolGroup00-LogVol02 instead of the actual LVM path.

Is this normal behaviour or have I done something wrong?

Also, is there a way to find a mapping between the device mapper
notations and the corresponding lvm volumes?

Thanks,
KK
# 2  
Old 12-06-2009
When using SCSI devices, the path is clearly defined based on the SCSI ID of the controller, the port that the device is connected to, etc.

SATA/SAS drives do not have this luxury, as they are not defined on a chain. This causes some confusion, as when /dev/sda comes up next time, it may be /dev/sdc.

dev-mapper uses a different, non-volatile ID such as UUID or disk label (contained in metadata) to keep disk paths consistent, through its abstraction.

Basically, the short version is:

To make sure that your devices are named and in a consistent path, dev-mapper handles the devices so that your / is found properly each bootup and is not confused with /tmp or some other file system on another device.
# 3  
Old 12-06-2009
Quote:
Is this normal behaviour or have I done something wrong?
Yes, it is normal.

Quote:
is there a way to find a mapping between the device mapper notations and the corresponding lvm volumes?
Yes. Remove "/mapper", replace '-" with "/". Thus
Code:
/dev/mapper/VolGroup00-LogVol01

becomes
Code:
/dev/VolGroup00/LogVol01

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Command to see the logical volume path, device mapper path and its corresponding dm device path

Currently I am using this laborious command lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}' Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Discussion started by: royalibrahim
2 Replies

2. Red Hat

Device-mapper behaviour booting on init=bin/bash

Good morning Recently we needed to change the password from a redhat 6.5 system that no one knew the root password. Starting the system with the init=/bin/bash method took us to the following scenario: system_vg active with only root_lv and tmpfs mounted. our entries at fstab are like... (1 Reply)
Discussion started by: Ikaro0
1 Replies

3. UNIX for Dummies Questions & Answers

What is /dev/mapper used for?

I see a folder named "mapper" in /dev. This folder "mapper" has some soft link to other folders. What is mapper folder used for? (2 Replies)
Discussion started by: rupeshkp728
2 Replies

4. UNIX for Dummies Questions & Answers

How to convert non LVM root partition to LVM?

Hi Guys, I m using redhat 6, I have installed root partition as non-LVM . Is there any way i can convert it to LVM? (1 Reply)
Discussion started by: pinga123
1 Replies

5. UNIX for Advanced & Expert Users

lvm swapon failed Device or resource busy

Is there a trick to mounting swap in n a lvm? I can't get it to work. # swapon -va swapon on /dev/mapper/VG-lv_swap swapon: /dev/mapper/VG-lv_swap: found swap signature: version 1, page-size 4, same byte order swapon: /dev/mapper/VG-lv_swap: pagesize=4096, swapsize=4294967296,... (1 Reply)
Discussion started by: cokedude
1 Replies

6. AIX

LVM & Raw device i/o comparison

Please consider this a question about basics&best practices. On AIX 5.3 system, three raw physical volumes are defined from storage. While doing a read with command dd from the raw device, the speed rate is 250Mb/s. Then, it gets complex when I define these three pv's to an lv of type raw. Doing... (4 Replies)
Discussion started by: royalliege
4 Replies

7. Linux

If i don't have raid disks can i shut down dmraid device-mapper?

hello my centOS newly installed system loading dmraid modules on startup I did remove all LVM/raid things from system installation menus and after installation too but dmraid is still there and he says: no raid disks found also I did modprobe -r dm_raid45 and it do remove it but only until... (7 Replies)
Discussion started by: tip78
7 Replies

8. Red Hat

device-mapper-multipath path [undef]

I have an HP blade with Qlogic HBA's connected to an EVA8000. I have downloaded the latest multipath.conf from HP's website. The drive presented to the server appears to be configured and working except the output of "multipath -l" shows for all paths. What is causing this output? mpath0... (2 Replies)
Discussion started by: manzier
2 Replies

9. HP-UX

How to reduce LVM to create another LVM

Hi, I'm new to HP-UX. I have LVM on /var with 92Gig. I would like to reduce it to create another LVM for Oracle client with 800 meg or so. How to do it. I'm running 11.iv3 Thanks (4 Replies)
Discussion started by: lamoul
4 Replies
Login or Register to Ask a Question