LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
LinkBack Search this Thread
Old 08-03-2012, 04:58 PM   #1
n0rus
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Rep: Reputation: Disabled
LVM pvs is showing /dev/dm-x as PV name instead of /dev/mapper


Hello folks,

I am having some hard time making LVM's pvs command print /dev/mapper devices instead of dm-X devices.

Extract from lvm.conf:
preferred_names = [ "^/dev/mapper/", "^/dev/[hs]d" ]
filter = [ "a/dev/mapper/.*/", "a/dev/sdb/", "a/dev/sdc/", "r/dev/sd.*/" ]


The weirdest part is that I'm getting /dev/mapper entries when I issue pvscan, but not when I do pvs.

[root@begonia ~]# pvscan
PV /dev/sdc1 VG Volsdc_local lvm2 [135.50 GB / 508.00 MB free]
PV /dev/sdb5 VG Volsda400 lvm2 [46.50 GB / 18.50 GB free]
PV /dev/mapper/new_eva_sandisk1p1 VG NewSanVolEVA01 lvm2 [200.00 GB / 10.00 GB free]
PV /dev/mapper/new_eva_sandisk2p1 VG NewSanVolEVA01 lvm2 [250.00 GB / 5.00 GB free]
PV /dev/mapper/san_disk1 VG san_vg1 lvm2 [450.00 GB / 15.00 GB free]
Total: 5 [1.06 TB] / in use: 5 [1.06 TB] / in no VG: 0 [0 ]

[root@begonia ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/dm-7 san_vg1 lvm2 a- 450.00G 15.00G
/dev/dm-8 NewSanVolEVA01 lvm2 a- 250.00G 5.00G
/dev/dm-9 NewSanVolEVA01 lvm2 a- 200.00G 10.00G
/dev/sdb5 Volsda400 lvm2 a- 46.50G 18.50G
/dev/sdc1 Volsdc_local lvm2 a- 135.50G 508.00M

[root@begonia ~]# ls -l /dev/mapper/
total 0
crw------- 1 root root 10, 63 Aug 4 2012 control
brw-rw---- 1 root disk 253, 6 Aug 3 23:26 new_eva_sandisk1
brw-rw---- 1 root disk 253, 9 Aug 3 23:26 new_eva_sandisk1p1
brw-rw---- 1 root disk 253, 5 Aug 3 23:26 new_eva_sandisk2
brw-rw---- 1 root disk 253, 8 Aug 3 23:26 new_eva_sandisk2p1
brw-rw---- 1 root disk 253, 17 Aug 3 23:26 NewSanVolEVA01-staging
brw-rw---- 1 root disk 253, 11 Aug 3 23:26 NewSanVolEVA01-u01
brw-rw---- 1 root disk 253, 12 Aug 3 23:26 NewSanVolEVA01-u02
brw-rw---- 1 root disk 253, 13 Aug 3 23:26 NewSanVolEVA01-u04
brw-rw---- 1 root disk 253, 14 Aug 3 23:26 NewSanVolEVA01-u06
brw-rw---- 1 root disk 253, 15 Aug 3 23:26 NewSanVolEVA01-u07
brw-rw---- 1 root disk 253, 16 Aug 3 23:26 NewSanVolEVA01-u99
brw-rw---- 1 root disk 253, 7 Aug 3 23:26 san_disk1
brw-rw---- 1 root disk 253, 24 Aug 3 23:26 san_vg1-san_staging
brw-rw---- 1 root disk 253, 18 Aug 3 23:26 san_vg1-san_u01
brw-rw---- 1 root disk 253, 19 Aug 3 23:26 san_vg1-san_u02
brw-rw---- 1 root disk 253, 20 Aug 3 23:26 san_vg1-san_u04
brw-rw---- 1 root disk 253, 21 Aug 3 23:26 san_vg1-san_u06
brw-rw---- 1 root disk 253, 22 Aug 3 23:26 san_vg1-san_u07
brw-rw---- 1 root disk 253, 23 Aug 3 23:26 san_vg1-san_u99
brw-rw---- 1 root disk 253, 0 Aug 4 2012 Volsda400-LogVol00
brw-rw---- 1 root disk 253, 3 Aug 4 2012 Volsda400-LogVol01
brw-rw---- 1 root disk 253, 2 Aug 4 2012 Volsda400-LogVol02
brw-rw---- 1 root disk 253, 1 Aug 4 2012 Volsda400-LogVol03
brw-rw---- 1 root disk 253, 4 Aug 4 2012 Volsda400-LogVol04
brw-rw---- 1 root disk 253, 10 Aug 3 23:26 Volsdc_local-u888


I have read these existing forum topics, but nothing worked for me.
http://www.linuxquestions.org/questi...x-path-754073/
http://www.linuxquestions.org/questi...volume-754741/

What am I doing wrong?
 
Old 08-04-2012, 04:16 PM   #2
deadeyes
Member
 
Registered: Aug 2006
Posts: 601

Rep: Reputation: 78
I actually think you are doing nothing wrong at all

Could you do ls -lh /dev/dm* ?

Note that LVM actually uses dm.
The ls -lh of the dm* devices should confirm this. (if your udev rules keeps them there.)
 
Old 08-05-2012, 10:27 AM   #3
n0rus
LQ Newbie
 
Registered: Aug 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks for replying.

Actually, I think I found the problem. It seems that "pvdispay", "pvs" and possibly other commands simply ignore the changes you do to lvm.conf. However, "pvscan" is reading the config correctly.

When I disabled caching (write_cache_state = 0), I started getting the PVM names I was after.
 
Old 08-05-2012, 12:12 PM   #4
deadeyes
Member
 
Registered: Aug 2006
Posts: 601

Rep: Reputation: 78
Quote:
Originally Posted by n0rus View Post
Thanks for replying.

Actually, I think I found the problem. It seems that "pvdispay", "pvs" and possibly other commands simply ignore the changes you do to lvm.conf. However, "pvscan" is reading the config correctly.

When I disabled caching (write_cache_state = 0), I started getting the PVM names I was after.
In the end these are symlinks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
pseudo terminals: /dev/ptmx <-> /dev/pts/ vs. /dev/ptyp <-> /dev/ttyp rtspitz Linux - Software 2 12-02-2011 02:07 PM
[SOLVED] CURRENT: LVM/CRYPTSETUP duplicate devices in /dev/mapper again. GazL Slackware 11 01-31-2011 06:36 PM
vgcreate command is changing /dev/mapper as PV Name in pvdisplay to /dev/dm-xx path neeravsingh Linux - Enterprise 6 03-23-2010 03:05 AM
LVM mount as /dev/vg00/lv00 instead of /dev/mapper/vg00-lv00 ZedLeppelin Linux - Newbie 2 03-29-2009 05:44 PM
Where is /dev/mapper? Swift&Smart Fedora 1 12-08-2007 02:09 AM


All times are GMT -5. The time now is 10:50 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration