* Extending DM w/ new target type
@ 2013-08-01 17:04 John Strange
2013-08-01 17:54 ` Alasdair G Kergon
2013-08-02 12:07 ` Zdenek Kabelac
0 siblings, 2 replies; 4+ messages in thread
From: John Strange @ 2013-08-01 17:04 UTC (permalink / raw)
To: dm-devel
[-- Attachment #1.1: Type: text/plain, Size: 633 bytes --]
two questions:
1. I'd like to use DM with a new target type. I'm porting our virtualized
storage solution from Windows. I've been able to register my target and
get callbacks working, but in looking at the dm-raid code, I'm concerned
with how tightly coupled it is with the routines in md.c (multiple devices
implementation). Is there an expectation that a DM target use the md_xxxx
routines?
2. I used dmsetup to create a mapping for a device that my target
controls. Is there a way to make the underlying device (e.g. /dev/sdb) not
visible to the system? I'm paranoid about external accesses to a LUN that
I'm using.
-john
[-- Attachment #1.2: Type: text/html, Size: 738 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Extending DM w/ new target type
2013-08-01 17:04 Extending DM w/ new target type John Strange
@ 2013-08-01 17:54 ` Alasdair G Kergon
2013-08-02 12:07 ` Zdenek Kabelac
1 sibling, 0 replies; 4+ messages in thread
From: Alasdair G Kergon @ 2013-08-01 17:54 UTC (permalink / raw)
To: John Strange; +Cc: dm-devel
On Thu, Aug 01, 2013 at 11:04:37AM -0600, John Strange wrote:
> 1. I'd like to use DM with a new target type. I'm porting our virtualized
> storage solution from Windows. I've been able to register my target and
> get callbacks working, but in looking at the dm-raid code, I'm concerned
> with how tightly coupled it is with the routines in md.c (multiple devices
> implementation). Is there an expectation that a DM target use the md_xxxx
> routines?
If you need that sort of raid functionality, then yes (and you should
look into using the external metadata support if you have a new format).
> 2. I used dmsetup to create a mapping for a device that my target
> controls. Is there a way to make the underlying device (e.g. /dev/sdb) not
> visible to the system?
No and this is by design: all layers of the device stack are addressable from
userspace.
> I'm paranoid about external accesses to a LUN that
> I'm using.
Utilities should detect the device is in use.
Alasdair
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Extending DM w/ new target type
2013-08-01 17:04 Extending DM w/ new target type John Strange
2013-08-01 17:54 ` Alasdair G Kergon
@ 2013-08-02 12:07 ` Zdenek Kabelac
2013-08-09 14:50 ` John Strange
1 sibling, 1 reply; 4+ messages in thread
From: Zdenek Kabelac @ 2013-08-02 12:07 UTC (permalink / raw)
To: device-mapper development; +Cc: John Strange
Dne 1.8.2013 19:04, John Strange napsal(a):
> two questions:
>
> 1. I'd like to use DM with a new target type. I'm porting our virtualized
> storage solution from Windows. I've been able to register my target and get
> callbacks working, but in looking at the dm-raid code, I'm concerned with how
> tightly coupled it is with the routines in md.c (multiple devices
> implementation). Is there an expectation that a DM target use the md_xxxx
> routines?
>
> 2. I used dmsetup to create a mapping for a device that my target controls.
> Is there a way to make the underlying device (e.g. /dev/sdb) not visible to
> the system? I'm paranoid about external accesses to a LUN that I'm using.
In lvm2 it's solved in a way - that we use special flags for udev to avoid
some scanning/watchrules - however all device are always available through
/dev/mapper but user visible devices are accessible via /dev/vg/lv name
which is the only suggested and supported way to use LVs.
Obviously we often get reports where users are directly playing with
/dev/dm-XXX devices or /dev/mapper/vg-lv in their scripts and configs...
But you can't hide existing devices in system from userland visibility.
Zdenek
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Extending DM w/ new target type
2013-08-02 12:07 ` Zdenek Kabelac
@ 2013-08-09 14:50 ` John Strange
0 siblings, 0 replies; 4+ messages in thread
From: John Strange @ 2013-08-09 14:50 UTC (permalink / raw)
To: device-mapper development
[-- Attachment #1.1: Type: text/plain, Size: 1832 bytes --]
I see dmraid has two options -p (no_partitions) and -Z (rm_partitions). I
see that rm_partitions does just that, but it's not clear to me what the
no_partitions option does. Can somebody explain please?
How do utilities detect that a device is in use by DM? I would like to be
able to prevent creation of partitions on any disks my mapping target is
using. Are there ways to do that? It would seem that DM solutions like
raid, multipath, etc. would require this capability.
Thanks,
-john
On Fri, Aug 2, 2013 at 6:07 AM, Zdenek Kabelac <zkabelac@redhat.com> wrote:
> Dne 1.8.2013 19:04, John Strange napsal(a):
>
> two questions:
>>
>> 1. I'd like to use DM with a new target type. I'm porting our virtualized
>> storage solution from Windows. I've been able to register my target and
>> get
>> callbacks working, but in looking at the dm-raid code, I'm concerned with
>> how
>> tightly coupled it is with the routines in md.c (multiple devices
>> implementation). Is there an expectation that a DM target use the md_xxxx
>> routines?
>>
>> 2. I used dmsetup to create a mapping for a device that my target
>> controls.
>> Is there a way to make the underlying device (e.g. /dev/sdb) not visible
>> to
>> the system? I'm paranoid about external accesses to a LUN that I'm using.
>>
>
> In lvm2 it's solved in a way - that we use special flags for udev to avoid
> some scanning/watchrules - however all device are always available through
> /dev/mapper but user visible devices are accessible via /dev/vg/lv name
> which is the only suggested and supported way to use LVs.
>
> Obviously we often get reports where users are directly playing with
> /dev/dm-XXX devices or /dev/mapper/vg-lv in their scripts and configs...
>
> But you can't hide existing devices in system from userland visibility.
>
>
> Zdenek
>
>
[-- Attachment #1.2: Type: text/html, Size: 2519 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-09 14:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01 17:04 Extending DM w/ new target type John Strange
2013-08-01 17:54 ` Alasdair G Kergon
2013-08-02 12:07 ` Zdenek Kabelac
2013-08-09 14:50 ` John Strange
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).