* [linux-lvm] unwanted autocreation of /dev/mapper/ entries while using parted on lvm devices
@ 2014-02-23 22:36 Oliver Rath
2014-02-24 8:41 ` Peter Rajnoha
0 siblings, 1 reply; 5+ messages in thread
From: Oliver Rath @ 2014-02-23 22:36 UTC (permalink / raw)
To: LVM general discussion and development
Hi List,
Im not sure, if the udev-rules of lvm is creating this. Im Using Ubuntu
12.04.4 + lvm git yesterday, compiles with --enable-udev_sync
--enable-udev_rules. Here my testing results:
root@dmicrash\:rules.d# vgcreate myvg /dev/sdc1 /dev/sdd1
Volume group "myvg" successfully created
root@dmicrash\:rules.d# lvcreate --name test --size 20G myvg
Logical volume "test" created
root@dmicrash\:rules.d# parted /dev/myvg/test mklabel msdos
root@dmicrash\:rules.d# parted /dev/myvg/test mkpart primary 0% 40%
root@dmicrash\:rules.d# ls /dev/mapper/
control myvg-test myvg-test1
The device myvg-test1 was created automatically (normally this is done
by kpartx?). I disabled gnome-automounter, didnt help.
I tried to monitor this with udevadm --monitor, but i didnt get
displayed the rule-file who did this.
Any hints?
Tfh!
Oliver
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] unwanted autocreation of /dev/mapper/ entries while using parted on lvm devices
2014-02-23 22:36 [linux-lvm] unwanted autocreation of /dev/mapper/ entries while using parted on lvm devices Oliver Rath
@ 2014-02-24 8:41 ` Peter Rajnoha
2014-02-24 12:17 ` Oliver Rath
2014-02-24 12:40 ` [linux-lvm] [SOLVED] " Oliver Rath
0 siblings, 2 replies; 5+ messages in thread
From: Peter Rajnoha @ 2014-02-24 8:41 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: rath
On 02/23/2014 11:36 PM, Oliver Rath wrote:
> Hi List,
>
> Im not sure, if the udev-rules of lvm is creating this. Im Using Ubuntu
> 12.04.4 + lvm git yesterday, compiles with --enable-udev_sync
> --enable-udev_rules. Here my testing results:
>
>
> root@dmicrash\:rules.d# vgcreate myvg /dev/sdc1 /dev/sdd1
> Volume group "myvg" successfully created
> root@dmicrash\:rules.d# lvcreate --name test --size 20G myvg
> Logical volume "test" created
> root@dmicrash\:rules.d# parted /dev/myvg/test mklabel msdos
>
> root@dmicrash\:rules.d# parted /dev/myvg/test mkpart primary 0% 40%
>
> root@dmicrash\:rules.d# ls /dev/mapper/
> control myvg-test myvg-test1
>
> The device myvg-test1 was created automatically (normally this is done
> by kpartx?). I disabled gnome-automounter, didnt help.
>
> I tried to monitor this with udevadm --monitor, but i didnt get
> displayed the rule-file who did this.
>
> Any hints?
The parted itself creates a new device-mapper mapping that represents
the partition. Then it's like any other device-mapper device and so
the /dev content is created by 10-dm-disk.rules (the /dev/mapper
content) and 13-dm-disk.rules (the /dev/disk content).
Parted has this functionality integrated so there's no need to call
kpartx in addition.
--
Peter
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] unwanted autocreation of /dev/mapper/ entries while using parted on lvm devices
2014-02-24 8:41 ` Peter Rajnoha
@ 2014-02-24 12:17 ` Oliver Rath
2014-02-24 12:40 ` [linux-lvm] [SOLVED] " Oliver Rath
1 sibling, 0 replies; 5+ messages in thread
From: Oliver Rath @ 2014-02-24 12:17 UTC (permalink / raw)
To: linux-lvm
Hi Peter,
thanks for your reply!
Am 24.02.2014 09:41, schrieb Peter Rajnoha:
> On 02/23/2014 11:36 PM, Oliver Rath wrote:
>> [..]
> The parted itself creates a new device-mapper mapping that represents
> the partition. Then it's like any other device-mapper device and so
> the /dev content is created by 10-dm-disk.rules (the /dev/mapper
> content) and 13-dm-disk.rules (the /dev/disk content).
>
> Parted has this functionality integrated so there's no need to call
> kpartx in addition.
>
Ist it possible to avoid this /dev/mapper-generation, if I partitioning
lvm-devices? My problem ist, that Im not able to export the whole device
i.e. as iscsi, if some sub-device is mapped in /dev/mapper/... (says,
its busy then ..).
At the moment I always have to delete these subdevices via kpartx -d
/dev/myvg/.. (or dmsetup remove ..) before exporting it, which is a bit
annoying.
I took a look into 10-dm.rules, but have no idea, what to do.
Regards,
Oliver
^ permalink raw reply [flat|nested] 5+ messages in thread
* [linux-lvm] [SOLVED] unwanted autocreation of /dev/mapper/ entries while using parted on lvm devices
2014-02-24 8:41 ` Peter Rajnoha
2014-02-24 12:17 ` Oliver Rath
@ 2014-02-24 12:40 ` Oliver Rath
2014-02-24 13:09 ` Peter Rajnoha
1 sibling, 1 reply; 5+ messages in thread
From: Oliver Rath @ 2014-02-24 12:40 UTC (permalink / raw)
To: linux-lvm
Hi Peter!
Am 24.02.2014 09:41, schrieb Peter Rajnoha:
> On 02/23/2014 11:36 PM, Oliver Rath wrote:
> The parted itself creates a new device-mapper mapping that represents
> the partition. Then it's like any other device-mapper device and so
> the /dev content is created by 10-dm-disk.rules (the /dev/mapper
> content) and 13-dm-disk.rules (the /dev/disk content). Parted has this
> functionality integrated so there's no need to call kpartx in addition.
On my machine parted-2.3 was running. Upgrading to parted-3.1 didnt
help, BUT building parted-3.1 for myself with ./configure
--disable-device-mapper works! Then parted does his job without creating
these deices implicitly.
Maybe you know a less radical method? I.e. I could exclude some names in
lvm.conf or something like this? The names of the lvm whould should
create subvolumes are well defined.
Regards,
Oliver
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] [SOLVED] unwanted autocreation of /dev/mapper/ entries while using parted on lvm devices
2014-02-24 12:40 ` [linux-lvm] [SOLVED] " Oliver Rath
@ 2014-02-24 13:09 ` Peter Rajnoha
0 siblings, 0 replies; 5+ messages in thread
From: Peter Rajnoha @ 2014-02-24 13:09 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: rath
On 02/24/2014 01:40 PM, Oliver Rath wrote:
> Hi Peter!
>
> Am 24.02.2014 09:41, schrieb Peter Rajnoha:
>> On 02/23/2014 11:36 PM, Oliver Rath wrote:
>> The parted itself creates a new device-mapper mapping that represents
>> the partition. Then it's like any other device-mapper device and so
>> the /dev content is created by 10-dm-disk.rules (the /dev/mapper
>> content) and 13-dm-disk.rules (the /dev/disk content). Parted has this
>> functionality integrated so there's no need to call kpartx in addition.
>
> On my machine parted-2.3 was running. Upgrading to parted-3.1 didnt
> help, BUT building parted-3.1 for myself with ./configure
> --disable-device-mapper works! Then parted does his job without creating
> these deices implicitly.
Yes, I was just about to write that :) I think there's no option in parted
to avoid creating these mappings for partitions once the parted is
compiled with device-mapper support. So yes, the only option is either
to recompile without devmapper support or always remove these mappings
manually...
>
> Maybe you know a less radical method? I.e. I could exclude some names in
> lvm.conf or something like this? The names of the lvm whould should
> create subvolumes are well defined.
You would need to tell parted to stop syncing the state after partition
signatures are created/removed on/from disk. But parted always creates/removes
the partition mappings unconditionally (...or it calls BLKRRPART/blkpg for
non-dm devices).
You can try using fdisk instead which does not do this step and requires
calling partprobe or kpartx manually after partitioning.
--
Peter
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-24 13:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-23 22:36 [linux-lvm] unwanted autocreation of /dev/mapper/ entries while using parted on lvm devices Oliver Rath
2014-02-24 8:41 ` Peter Rajnoha
2014-02-24 12:17 ` Oliver Rath
2014-02-24 12:40 ` [linux-lvm] [SOLVED] " Oliver Rath
2014-02-24 13:09 ` Peter Rajnoha
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).