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 11-03-2015, 04:30 AM   #1
hahacc
Member
 
Registered: Oct 2010
Posts: 93

Rep: Reputation: 1
Question multipath and sysfs device dependency


Hi Folks,
One of our server is using multipath, take dm-5 for example, we can see only one path found:

Code:
[root@test ~]# multipath -l
3600605b00a2f47e0000c5e9a0ba779b5 dm-5 LSI,MR9361-8i
size=1.1T features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
  `- 0:2:7:0 sdh 8:112 active ready running
And from sysfs, dm-5 holds dm-14 & dm-15:

Code:
[root@test ~]# ls /sys/block/dm-5/holders/
dm-14/ dm-15/
And below is from dmsetup ls:
Code:
[root@test ~]# dmsetup ls
3600605b00a2f47e0000c5e9a0ba779b5       (252, 5)
3600605b00a2f47e0000c5e9a0ba779b5p1     (252, 14)
3600605b00a2f47e0000c5e9a0ba779b5p9     (252, 15)
I'm a little confused about sysfs output, could anyone help me out of this?

Thanks!
 
Old 11-03-2015, 08:53 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
The sysfs output means that dm-5 is held by dm-14 and dm-15, not that it holds them. dmsetup ls reveals that they are partitions created on top of dm-5.

On the other hand, you would see that dm-5 holds sdh.
 
Old 11-03-2015, 08:48 PM   #3
hahacc
Member
 
Registered: Oct 2010
Posts: 93

Original Poster
Rep: Reputation: 1
Thumbs up

Quote:
Originally Posted by berndbausch View Post
The sysfs output means that dm-5 is held by dm-14 and dm-15, not that it holds them. dmsetup ls reveals that they are partitions created on top of dm-5.

On the other hand, you would see that dm-5 holds sdh.
Thanks, proved from another DM multipath device dm-0:

Code:
[root@test ~]# multipath -l
3600605b00a2f47e0000c5e820a4351fe dm-0 LSI,MR9361-8i
size=1.1T features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=0 status=active
  `- 0:2:2:0 sdc 8:32  active undef running

[root@test ~]# blkid|grep 3600605b00a2f47e0000c5e820a4351fe1
/dev/mapper/3600605b00a2f47e0000c5e820a4351fep1: UUID="da2359ef-815f-455d-9402-d28031129afd" TYPE="ext3" SEC_TYPE="ext2"

[root@test ~]# ls /sys/block/dm-0/holders/
dm-17  dm-18

[root@test ~]# cat /etc/fstab|grep da2359ef-815f-455d-9402-d28031129afd
UUID=da2359ef-815f-455d-9402-d28031129afd /extend2 ext3 defaults 0 0

[root@test ~]# dmsetup ls
3600605b00a2f47e0000c5e820a4351fe       (252, 0)
3600605b00a2f47e0000c5e820a4351fep1     (252, 17)
3600605b00a2f47e0000c5e820a4351fep9     (252, 18)

[root@test ~]# fdisk -l /dev/sdc

    WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.


    Disk /dev/sdc: 1198.9 GB, 1198999470080 bytes
    255 heads, 63 sectors/track, 145770 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1               1      145771  1170897919+  ee  EFI GPT

[root@test ~]# parted /dev/sdc print

    Model: LSI MR9361-8i (scsi)
    Disk /dev/sdc: 1199GB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt

    Number  Start   End     Size    File system  Name     Flags
     1      131kB   1199GB  1199GB  ext3         zfs
     9      1199GB  1199GB  8389kB               solaris

    Information: Don't forget to update /etc/fstab, if necessary.
 
  


Reply



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
how to return to use multipath device to construct the Vg? hilou Linux - Newbie 3 09-10-2013 10:57 AM
How to open USB device in user mode via sysfs. mpoupe Linux - Kernel 1 02-04-2010 06:54 AM
Device attribute in sysfs sticktrick Linux - Kernel 0 07-11-2009 10:04 AM
how to create a device node in sysfs? hash123 Linux - Kernel 0 08-11-2008 01:41 AM
device mapper / multipath creating extra device, won't let me talk to the one i want chakkerz Linux - Server 1 03-16-2008 05:52 PM

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

All times are GMT -5. The time now is 08:29 AM.

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