dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* noob usage question
@ 2013-08-09 21:01 John Strange
  2013-08-09 22:22 ` Brassow Jonathan
  0 siblings, 1 reply; 4+ messages in thread
From: John Strange @ 2013-08-09 21:01 UTC (permalink / raw)
  To: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 255 bytes --]

When I create a linear target, I can't create partitions or format the
mapped drive.  I get an invalid parameter argument for an ioctl.  I'm
obviously doing something stupid.  What do I need to do to create
partitions, format, mount a dm-n?
Thanks,
-john

[-- Attachment #1.2: Type: text/html, Size: 319 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: noob usage question
  2013-08-09 21:01 noob usage question John Strange
@ 2013-08-09 22:22 ` Brassow Jonathan
  2013-08-10  2:19   ` John Strange
  0 siblings, 1 reply; 4+ messages in thread
From: Brassow Jonathan @ 2013-08-09 22:22 UTC (permalink / raw)
  To: device-mapper development


On Aug 9, 2013, at 4:01 PM, John Strange wrote:

> When I create a linear target, I can't create partitions or format the mapped drive.  I get an invalid parameter argument for an ioctl.  I'm obviously doing something stupid.  What do I need to do to create partitions, format, mount a dm-n?

You don't want to create partitions, do you?

Just create an mapping and use it.  If you need another, create another.  Need to remove one, just remove it.

Also, I'm assuming you want to use device-mapper.  If you want persistent devices (ones that stick around after a reboot), you may wish to use LVM.

 brassow

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: noob usage question
  2013-08-09 22:22 ` Brassow Jonathan
@ 2013-08-10  2:19   ` John Strange
  2013-08-12 11:40     ` Bryn M. Reeves
  0 siblings, 1 reply; 4+ messages in thread
From: John Strange @ 2013-08-10  2:19 UTC (permalink / raw)
  To: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 1914 bytes --]

Yes, I think I do want to create partitions.  My expectation is to create a
mapping based on one or more raw physical device (luns).  There are a
number features I would like implement behind my mapping target driver.  My
understanding is that I can treat the mapping (the target device) as if it
were a raw disk and that I can format it as appropriate for whatever
workload will use it.

For instance... I need to present a device (it would appear to the OS as a
raw block device) composed of ranges of blocks from different devices -
spinning media, ssd, PCIe flash, etc.  My target driver can guarantee a QOS
(throughput, latency, combo) and it will service read requests across the
range of physical media comprising the target.

This target device would appear to the OS as a block device.  The workload
that uses the device might require a filesystem on it, so I need to mount a
FS.

That's what I'm aiming for.  I ran into problems trying to format my target
device so I created a linear mapping and it behaved the same way... could
not put a partition on it or format it.

-john


On Fri, Aug 9, 2013 at 4:22 PM, Brassow Jonathan <jbrassow@redhat.com>wrote:

>
> On Aug 9, 2013, at 4:01 PM, John Strange wrote:
>
> > When I create a linear target, I can't create partitions or format the
> mapped drive.  I get an invalid parameter argument for an ioctl.  I'm
> obviously doing something stupid.  What do I need to do to create
> partitions, format, mount a dm-n?
>
> You don't want to create partitions, do you?
>
> Just create an mapping and use it.  If you need another, create another.
>  Need to remove one, just remove it.
>
> Also, I'm assuming you want to use device-mapper.  If you want persistent
> devices (ones that stick around after a reboot), you may wish to use LVM.
>
>  brassow
>
>
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>

[-- Attachment #1.2: Type: text/html, Size: 2517 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: noob usage question
  2013-08-10  2:19   ` John Strange
@ 2013-08-12 11:40     ` Bryn M. Reeves
  0 siblings, 0 replies; 4+ messages in thread
From: Bryn M. Reeves @ 2013-08-12 11:40 UTC (permalink / raw)
  To: device-mapper development; +Cc: John Strange

On 08/10/2013 03:19 AM, John Strange wrote:
> Yes, I think I do want to create partitions.  My expectation is to create a 
> mapping based on one or more raw physical device (luns).  There are a number 
> features I would like implement behind my mapping target driver.  My 
> understanding is that I can treat the mapping (the target device) as if it were 
> a raw disk and that I can format it as appropriate for whatever workload will 
> use it.

For typical uses you would format the raw physical device and then use
the kpartx device-mapper application to create linear maps for each
partition contained on the device.

For e.g. this is how users work with partitions on multipath devices
managed by multipath-tools and device-mapper.

> For instance... I need to present a device (it would appear to the OS as a raw 
> block device) composed of ranges of blocks from different devices - spinning 
> media, ssd, PCIe flash, etc.  My target driver can guarantee a QOS (throughput, 
> latency, combo) and it will service read requests across the range of physical 
> media comprising the target.
> 
> This target device would appear to the OS as a block device.  The workload that 
> uses the device might require a filesystem on it, so I need to mount a FS.

Still not sure why you would want to place partitions on the linear maps
but you can do it if you really want to:

http://paste.fedoraproject.org/31461/76307438/

First example is creating and partitioning a linar mapping (I used a
loop device as the backing but it will work with any block device).

Following that is creating a file system on a partitioned linear device,
and then on the whole linear device.

There's no problem with either operation.

> That's what I'm aiming for.  I ran into problems trying to format my target 
> device so I created a linear mapping and it behaved the same way... could not 
> put a partition on it or format it.

You do not need a partition to be able to format or use a device-mapper
device - dm's devices do not support partitions (which is why you have
to use the userspace kpartx - it reads partition tables and creates
equivalend DM linear mappings for them).

It sounds like something else is going on in your case - what errors do
you get when you try to use the linear devices (busy for e.g.)?

Regards,
Bryn.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-12 11:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-09 21:01 noob usage question John Strange
2013-08-09 22:22 ` Brassow Jonathan
2013-08-10  2:19   ` John Strange
2013-08-12 11:40     ` Bryn M. Reeves

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).