FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 07-20-2011, 10:17 AM
li mohua
 
Default What is a /dev/dm-* file ?

from the device number(major,minor), we could see it's another kind
for device under /dev/mapper/*,sometimes could be a link(udev rules
etc,no idea about the max number, you could have a test, i guess,




[root@57 mapper]# ls -lrt
total 0
crw------- 1 root root 10, 63 Jul 18 05:52 control
brw-rw---- 1 root disk 253, 0 Jul 18 05:52
3600a0b80005b10ca00008e254c7726b1
brw-rw---- 1 root disk 253, 1 Jul 18 05:52
3600a0b80005b0acc00008c204c7744ba
brw-rw---- 1 root disk 253, 3 Jul 18 05:52
3600a0b80005b0acc00008c204c7744bap2
brw-rw---- 1 root disk 253, 2 Jul 18 05:52
3600a0b80005b0acc00008c204c7744bap1
brw-rw---- 1 root disk 253, 4 Jul 18 05:52
3600a0b80005b10ca00008e254c7726b1p1
brw-rw---- 1 root disk 253, 5 Jul 18 05:52 HostVG-Swap
brw-rw---- 1 root disk 253, 6 Jul 18 05:52 HostVG-RootBackup
brw-rw---- 1 root disk 253, 7 Jul 18 05:52 HostVG-Root
brw-rw---- 1 root disk 253, 9 Jul 18 05:52 HostVG-Logging
brw-rw---- 1 root disk 253, 8 Jul 18 05:52 HostVG-Config
brw-rw---- 1 root disk 253, 10 Jul 18 05:52 HostVG-Data
brw-rw---- 1 root disk 253, 11 Jul 18 05:52 live-rw




[root@57 mapper]# ls -lrt /dev/dm*
brw-rw---- 1 root root 253, 0 Jul 18 05:52 /dev/dm-0
brw-rw---- 1 root root 253, 1 Jul 18 05:52 /dev/dm-1
brw-rw---- 1 root root 253, 3 Jul 18 05:52 /dev/dm-3
brw-rw---- 1 root root 253, 2 Jul 18 05:52 /dev/dm-2
brw-rw---- 1 root root 253, 4 Jul 18 05:52 /dev/dm-4
brw-rw---- 1 root root 253, 5 Jul 18 05:52 /dev/dm-5
brw-rw---- 1 root root 253, 6 Jul 18 05:52 /dev/dm-6
brw-rw---- 1 root root 253, 7 Jul 18 05:52 /dev/dm-7
brw-rw---- 1 root root 253, 8 Jul 18 05:52 /dev/dm-8
brw-rw---- 1 root root 253, 9 Jul 18 05:52 /dev/dm-9
brw-rw---- 1 root root 253, 10 Jul 18 05:52 /dev/dm-10
brw-rw---- 1 root root 253, 11 Jul 18 05:52 /dev/dm-11







[root@cshao57 mapper]# ls -lrt
total 0
crw------- 1 root root 10, 63 Jul 18 05:52 control
brw-rw---- 1 root disk 253, 0 Jul 18 05:52
3600a0b80005b10ca00008e254c7726b1
brw-rw---- 1 root disk 253, 1 Jul 18 05:52
3600a0b80005b0acc00008c204c7744ba
brw-rw---- 1 root disk 253, 3 Jul 18 05:52
3600a0b80005b0acc00008c204c7744bap2
brw-rw---- 1 root disk 253, 2 Jul 18 05:52
3600a0b80005b0acc00008c204c7744bap1
brw-rw---- 1 root disk 253, 4 Jul 18 05:52
3600a0b80005b10ca00008e254c7726b1p1
brw-rw---- 1 root disk 253, 5 Jul 18 05:52 HostVG-Swap
brw-rw---- 1 root disk 253, 6 Jul 18 05:52 HostVG-RootBackup
brw-rw---- 1 root disk 253, 7 Jul 18 05:52 HostVG-Root
brw-rw---- 1 root disk 253, 9 Jul 18 05:52 HostVG-Logging
brw-rw---- 1 root disk 253, 8 Jul 18 05:52 HostVG-Config
brw-rw---- 1 root disk 253, 10 Jul 18 05:52 HostVG-Data
brw-rw---- 1 root disk 253, 11 Jul 18 05:52 live-rw
brw-rw---- 4 root root 253, 11 Jul 18 05:52 link2
brw-rw---- 4 root root 253, 11 Jul 18 05:52 link1
brw-rw---- 4 root root 253, 11 Jul 18 05:52 link
[root@cshao57 mapper]# ls -lrt /dev/dm*
brw-rw---- 1 root root 253, 0 Jul 18 05:52 /dev/dm-0
brw-rw---- 1 root root 253, 1 Jul 18 05:52 /dev/dm-1
brw-rw---- 1 root root 253, 3 Jul 18 05:52 /dev/dm-3
brw-rw---- 1 root root 253, 2 Jul 18 05:52 /dev/dm-2
brw-rw---- 1 root root 253, 4 Jul 18 05:52 /dev/dm-4
brw-rw---- 1 root root 253, 5 Jul 18 05:52 /dev/dm-5
brw-rw---- 1 root root 253, 6 Jul 18 05:52 /dev/dm-6
brw-rw---- 1 root root 253, 7 Jul 18 05:52 /dev/dm-7
brw-rw---- 1 root root 253, 8 Jul 18 05:52 /dev/dm-8
brw-rw---- 1 root root 253, 9 Jul 18 05:52 /dev/dm-9
brw-rw---- 1 root root 253, 10 Jul 18 05:52 /dev/dm-10
brw-rw---- 4 root root 253, 11 Jul 18 05:52 /dev/dm-11


On Wed, Jul 20, 2011 at 04:34:38AM -0400, Chao Yang wrote:
> Hi there,
>
> I have questions about /dev/dm-* in my mind for days, it seems here is the right place for the answers.
> What is a /dev/dm-* file? it says "/dev/dm-0: block special" from file command.
> Is there a limitation to the number of /dev/dm-* files ? I tried with RHEL6.1 GA, created 800 from dm-0 to dm-799 as maximum.
> Thanks.
>
>
> Best,
> Chao
>

> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel


--
我只担心一件事,我怕我配不上我所 *受的苦难

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 07-21-2011, 09:35 AM
"Bryn M. Reeves"
 
Default What is a /dev/dm-* file ?

On 07/20/2011 11:17 AM, li mohua wrote:
>
> from the device number(major,minor), we could see it's another kind
> for device under /dev/mapper/*,sometimes could be a link(udev rules
> etc,no idea about the max number, you could have a test, i guess,

On a modern system it's the other way around - the /dev/mapper entries are
symbolic links to ../dm-N entries maintained by a set of udev rules (look at
/lib/udev/rules.d/10-dm.rules on a RHEL6 system).

The /dev/$VG/$LV directories and symlinks for LVM2 volume groups and logical
volumes are maintained by a similar set of rules in 11-dm-lvm.rules.

Device mapper minor numbers are assigned dynamically so the upper limit is
dependent on the system (amount of memory) and the types of devices that you are
trying to create (number and type of targets used) - it's not that unusual to
see systems with 1000s of dm devices.

>> I have questions about /dev/dm-* in my mind for days, it seems here is the right place for the answers.
>> What is a /dev/dm-* file? it says "/dev/dm-0: block special" from file command.
>> Is there a limitation to the number of /dev/dm-* files ? I tried with RHEL6.1 GA, created 800 from dm-0 to dm-799 as maximum.

Generally it's advised not to use the dm-N device nodes directly since they do
not provide persistent naming and are created as soon as a device-mapper device
is assigned a minor number in the kernel but possibly before the device is in a
usable state.

Depending on the device-mapper application you're using (LVM2, multipath-tools,
dmraid etc.) there are probably better ways to reference the devices via the
types of symlinks mentioned above.

Regards,
Bryn.

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 05:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org