linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Oliver Rath <rath@mglug.de>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] Identifying useable block devices
Date: Wed, 15 Jan 2014 17:17:51 +0100	[thread overview]
Message-ID: <52D6B4AF.9010007@mglug.de> (raw)
In-Reply-To: <87zjmxzmga.fsf@red.mvo.lan>

Hi Marius!

the /dev/mapper/.. devices are for internal use only. This is needed,
because the thinPOOL is a device logical between vg and lv, which is
represented with help of these special devices.

Normally you should alway use the /dev/vg/lv name scheme for you own
lvm-devices. Nevertheless, if you would persist to use /dev/mapper/
pathes, you can create the path with /dev/mapper/<vg>-<lv>. Note: If you
lv-name includes some "-", they will be doubled in /dev/mapper notation
for differentiating to the "-", which separates vg and lv name. I.e. you
LV is name my-own-lv and your VG is mariusvg, then you can find the
(thintpool-) device under /dev/mapper/mariusvg-my--own--lv and (better)
as link /dev/mariusvg/my-own-lv.

There is a point you have unfortunatly to use the /dev/mapper-notation:
If you need i.e. kpartx for creating subdevices (i.e. the lv includes a
virtual windows disk with partitions), then the temporalily created
names are only accessible via /dev/mapper.

The other created metadevices for thinpool-managment you should never touch.

Hth,
Oliver


On 15.01.2014 09:19, Marius Vollmer wrote:
> Hi,
>
> when looking at the udev properties of a device mapper node, how can I
> decide whether this is a block device that the user can use for creating
> filesystems on, etc?
>
> For example, when creating a thinly provisioned logical volume with these
> steps
>
>  # vgcreate TEST /dev/loop1
>  # lvcreate TEST --thinpool pool -L 80
>  # lvcreate -T TEST/pool -n thin -V 100
>
> I end up with a lot of devices:
>
>  # ls /dev/mapper/TEST-*
>  /dev/mapper/TEST-pool        /dev/mapper/TEST-pool_tmeta  /dev/mapper/TEST-thin
>  /dev/mapper/TEST-pool_tdata  /dev/mapper/TEST-pool-tpool
>
> How can a program tell that only /dev/mapper/TEST-thin can really be
> used as a block device, and the rest should be ignored?
>
> Is there a way to do this by looking at "udevadm info", for example?
>
> (What seems to work is skipping all nodes that have
> DM_UDEV_IGNORE_DISK_RULES_FLAG set to true.  Is this maybe even
> documented somewhere?)
>
> Thanks!
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

  parent reply	other threads:[~2014-01-15 16:17 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15  8:19 [linux-lvm] Identifying useable block devices Marius Vollmer
2014-01-15 15:49 ` Alasdair G Kergon
2014-01-15 16:17 ` Oliver Rath [this message]
2014-01-15 20:24   ` Anatoly Pugachev
2014-01-16  1:32     ` Paul B. Henson
2014-01-16  5:42       ` Peter Rajnoha
2014-01-16 21:03         ` Paul B. Henson
2014-01-17  7:54           ` Peter Rajnoha
2014-01-17  9:29             ` Karel Zak
2014-01-17  9:53               ` Peter Rajnoha
2014-01-16  6:04 ` Peter Rajnoha
2014-01-17 10:02 ` Marius Vollmer
2014-01-17 13:35   ` Marius Vollmer
2014-01-20 11:52     ` Peter Rajnoha
2014-01-20 11:49   ` Peter Rajnoha
2014-01-20 12:02     ` Peter Rajnoha
2014-01-22  9:23       ` Marius Vollmer
2014-01-23 11:42         ` Peter Rajnoha
2014-01-23 12:35           ` Marius Vollmer
2014-01-24 13:24             ` Peter Rajnoha
2014-01-24 13:29               ` Peter Rajnoha
2014-01-24 14:39                 ` Marius Vollmer
2014-01-24 15:02                   ` Peter Rajnoha
2014-01-27  7:37                     ` Marius Vollmer
2014-01-24 14:50               ` Marius Vollmer
2014-01-24 15:08                 ` Peter Rajnoha
2014-01-24 15:17                 ` Zdenek Kabelac
2014-01-24 15:20                   ` Peter Rajnoha
2014-01-22  9:02     ` Marius Vollmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52D6B4AF.9010007@mglug.de \
    --to=rath@mglug.de \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).