From: "Bryn M. Reeves" <bmr@redhat.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: linux-lvm@redhat.com
Subject: Re: [linux-lvm] [dm-devel] udev rules do not create partition entries when an lvm lv is partitioned
Date: Fri, 4 Sep 2015 20:12:09 +0100 [thread overview]
Message-ID: <20150904191209.GA8446@localhost.localdomain> (raw)
In-Reply-To: <55E9E072.8080209@joejulian.name>
On Fri, Sep 04, 2015 at 11:18:26AM -0700, Joe Julian wrote:
> Yes, I'm aware of all the arguments against even doing this, but I have my
> reasons for doing it this way.
>
> When you create a partition on an lv:
>
> sgdisk /dev/vg1/lv1 -n 0:0:0
>
> there is no udev rule to create the partition entry, '/dev/vg1/lv1p1' (for
> instance). For my immediate use case, this causes ceph-disk to fail as it
> cannot find the partition as it's expecting to find the device name with a
> new "1" at the end. Any suggestions on how I could make this happen?
Why not just name the LV lv1p1 if ceph-disk is hard wired to expect that
naming?
There's not a lot of benefits to using partitions on top of logical
volumes and if you're not expecting them they can be problematic (e.g.
when they are the partitions of a running VM that is also accessing the
disk).
It is possible to create partitions on pretty much any device-mapper
device using the normal tools and then create new dm devices to map the
partitions using kpartx.
Multipath-tools supplies udev rules to automate this so that the
partition maps are created automatically by udev (since it works with
whole disks): you could use that as an example if you really want to try
that approach but it's fairly easy to get the rules wrong in subtle ways
that may prevent booting.
If you just want a temporary mapping to set things up run:
# kpartx -a /dev/vg1/lv1
And you should find partition maps at /dev/mapper/vg1-lv1p1 etc.
kpartx -d to remove.
Regards,
Bryn.
prev parent reply other threads:[~2015-09-04 19:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-04 18:18 [linux-lvm] udev rules do not create partition entries when an lvm lv is partitioned Joe Julian
2015-09-04 19:12 ` Bryn M. Reeves [this message]
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=20150904191209.GA8446@localhost.localdomain \
--to=bmr@redhat.com \
--cc=dm-devel@redhat.com \
--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).