* geometry of dm devices......
@ 2006-08-02 16:26 Peter Koutoupis
2006-08-08 20:05 ` Benjamin Marzinski
0 siblings, 1 reply; 6+ messages in thread
From: Peter Koutoupis @ 2006-08-02 16:26 UTC (permalink / raw)
To: device-mapper development
Unfortunately I got no reponses in my last post so I will try this
again...but now is a slightly different direction.
I understand the HDIO_GETGEO is an unsupported feature to dm
devices....but under normal practices how would a normal end-user be
able to obtain such geometry from a raw dm device? I have read of
individuals looking into the MBR or grub (which sometimes resulted in
incorrect results) and a few other things. But if a dba type app such
as oracle needs to work with a dm created raw device...how would it
normally stat for the device geometry? Any ideas? Directions?
Thanks,
Petros
-----Original Message-----
From: Peter Koutoupis
Sent: Friday, July 28, 2006 4:17 PM
To: 'device-mapper development'
Subject: [dm-devel] aliases as raw devices......
All,
Using Redhat Advanced Server 4 Update 3 and the
device-mapper/multipath-tools native to it
(device-mapper-1.02.02-3.RHEL4 +
device-mapper-multipath-0.4.5-12.0.RHEL4), we have a failover
configuration of however many raw devices sorted by their WWID. An
alias of both dm-x and the WWID number is given to that one LD of many
LUN mapping. Let us say I have:
/dev/sda
/dev/sdb
/dev/sdc
/dev/sdd
All being different LUN mappings of the same LD and assigned the alias
of dm-0. I can obviously write to the raw device of /dev/sda or
/dev/sdb and so on but I am unable to write to the raw device of
/dev/dm-0. Actually to get into more detail..... dd writes to dm-0 just
fine but our own coded I/O read/write utility as an issue with ioctl
statting the geometry to the alias to the raw device.
Oictl_status = ioctl(fd, HDIO_GETGEO, &disk_geometry_info); //part of
source
The IO utility comes back saying:
HDIO_GETGEO error number 25
To stat a dm device what parameter would be most appropriate for ioctl
to pass?
Regards,
Peter Koutoupis
Systems Engineer
Xyratex International, Inc.
1804 Centre Point Circle
Suite 112
Naperville, IL 60563 USA
(630)364-7656
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: geometry of dm devices......
2006-08-02 16:26 Peter Koutoupis
@ 2006-08-08 20:05 ` Benjamin Marzinski
0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Marzinski @ 2006-08-08 20:05 UTC (permalink / raw)
To: device-mapper development
On Wed, Aug 02, 2006 at 09:26:31AM -0700, Peter Koutoupis wrote:
> Unfortunately I got no reponses in my last post so I will try this
> again...but now is a slightly different direction.
>
> I understand the HDIO_GETGEO is an unsupported feature to dm
> devices....but under normal practices how would a normal end-user be
> able to obtain such geometry from a raw dm device? I have read of
> individuals looking into the MBR or grub (which sometimes resulted in
> incorrect results) and a few other things. But if a dba type app such
> as oracle needs to work with a dm created raw device...how would it
> normally stat for the device geometry? Any ideas? Directions?
I suppose it depends on what the dm device is. If it is a mirror or stripped
device with multiple devices under it, I'm not sure what a good answer is.
However if it is a multipath device, with only one physical device under it,
couldn't you just send the ioctl to one of the underlying paths?
Say you have a multipath device (dm-0), that is composed of 4 paths (sda, sdb,
sdc, sdd). Sending the ioctl to any one of those sd* paths would return the
same device geometry. Since you are using multipath, you are obviously concerned
that one of those paths might be down. So you could try sending the ioctl
down each path in succession, until you got one that successfully returned.
-Ben
> Thanks,
>
> Petros
>
> -----Original Message-----
> From: Peter Koutoupis
> Sent: Friday, July 28, 2006 4:17 PM
> To: 'device-mapper development'
> Subject: [dm-devel] aliases as raw devices......
>
> All,
>
> Using Redhat Advanced Server 4 Update 3 and the
> device-mapper/multipath-tools native to it
> (device-mapper-1.02.02-3.RHEL4 +
> device-mapper-multipath-0.4.5-12.0.RHEL4), we have a failover
> configuration of however many raw devices sorted by their WWID. An
> alias of both dm-x and the WWID number is given to that one LD of many
> LUN mapping. Let us say I have:
> /dev/sda
> /dev/sdb
> /dev/sdc
> /dev/sdd
> All being different LUN mappings of the same LD and assigned the alias
> of dm-0. I can obviously write to the raw device of /dev/sda or
> /dev/sdb and so on but I am unable to write to the raw device of
> /dev/dm-0. Actually to get into more detail..... dd writes to dm-0 just
> fine but our own coded I/O read/write utility as an issue with ioctl
> statting the geometry to the alias to the raw device.
>
> Oictl_status = ioctl(fd, HDIO_GETGEO, &disk_geometry_info); //part of
> source
>
> The IO utility comes back saying:
>
> HDIO_GETGEO error number 25
>
> To stat a dm device what parameter would be most appropriate for ioctl
> to pass?
>
> Regards,
>
> Peter Koutoupis
> Systems Engineer
> Xyratex International, Inc.
> 1804 Centre Point Circle
> Suite 112
> Naperville, IL 60563 USA
> (630)364-7656
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: geometry of dm devices......
@ 2006-08-08 20:32 Peter Koutoupis
2006-08-08 22:08 ` Darrick J. Wong
0 siblings, 1 reply; 6+ messages in thread
From: Peter Koutoupis @ 2006-08-08 20:32 UTC (permalink / raw)
To: device-mapper development
I thank you for your response. I actually thought of this as a work
around for the dm multipath device and pretty much as a last resort.
But my concern was raised with a multipath device and I was hoping to
get a answer for any dm device but I guess it is not possible. Once
again thank you for your response.
Peter
-----Original Message-----
From: dm-devel-bounces@redhat.com [mailto:dm-devel-bounces@redhat.com]
On Behalf Of Benjamin Marzinski
Sent: Tuesday, August 08, 2006 3:06 PM
To: device-mapper development
Subject: Re: [dm-devel] geometry of dm devices......
On Wed, Aug 02, 2006 at 09:26:31AM -0700, Peter Koutoupis wrote:
> Unfortunately I got no reponses in my last post so I will try this
> again...but now is a slightly different direction.
>
> I understand the HDIO_GETGEO is an unsupported feature to dm
> devices....but under normal practices how would a normal end-user be
> able to obtain such geometry from a raw dm device? I have read of
> individuals looking into the MBR or grub (which sometimes resulted in
> incorrect results) and a few other things. But if a dba type app such
> as oracle needs to work with a dm created raw device...how would it
> normally stat for the device geometry? Any ideas? Directions?
I suppose it depends on what the dm device is. If it is a mirror or
stripped device with multiple devices under it, I'm not sure what a good
answer is.
However if it is a multipath device, with only one physical device under
it, couldn't you just send the ioctl to one of the underlying paths?
Say you have a multipath device (dm-0), that is composed of 4 paths
(sda, sdb, sdc, sdd). Sending the ioctl to any one of those sd* paths
would return the same device geometry. Since you are using multipath,
you are obviously concerned that one of those paths might be down. So
you could try sending the ioctl down each path in succession, until you
got one that successfully returned.
-Ben
> Thanks,
>
> Petros
>
> -----Original Message-----
> From: Peter Koutoupis
> Sent: Friday, July 28, 2006 4:17 PM
> To: 'device-mapper development'
> Subject: [dm-devel] aliases as raw devices......
>
> All,
>
> Using Redhat Advanced Server 4 Update 3 and the
> device-mapper/multipath-tools native to it
> (device-mapper-1.02.02-3.RHEL4 +
> device-mapper-multipath-0.4.5-12.0.RHEL4), we have a failover
> configuration of however many raw devices sorted by their WWID. An
> alias of both dm-x and the WWID number is given to that one LD of many
> LUN mapping. Let us say I have:
> /dev/sda
> /dev/sdb
> /dev/sdc
> /dev/sdd
> All being different LUN mappings of the same LD and assigned the alias
> of dm-0. I can obviously write to the raw device of /dev/sda or
> /dev/sdb and so on but I am unable to write to the raw device of
> /dev/dm-0. Actually to get into more detail..... dd writes to dm-0
> just fine but our own coded I/O read/write utility as an issue with
> ioctl statting the geometry to the alias to the raw device.
>
> Oictl_status = ioctl(fd, HDIO_GETGEO, &disk_geometry_info); //part of
> source
>
> The IO utility comes back saying:
>
> HDIO_GETGEO error number 25
>
> To stat a dm device what parameter would be most appropriate for ioctl
> to pass?
>
> Regards,
>
> Peter Koutoupis
> Systems Engineer
> Xyratex International, Inc.
> 1804 Centre Point Circle
> Suite 112
> Naperville, IL 60563 USA
> (630)364-7656
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: geometry of dm devices......
2006-08-08 20:32 Peter Koutoupis
@ 2006-08-08 22:08 ` Darrick J. Wong
0 siblings, 0 replies; 6+ messages in thread
From: Darrick J. Wong @ 2006-08-08 22:08 UTC (permalink / raw)
To: device-mapper development
[-- Attachment #1.1: Type: text/plain, Size: 715 bytes --]
Peter Koutoupis wrote:
>> I understand the HDIO_GETGEO is an unsupported feature to dm
>> devices....but under normal practices how would a normal end-user be
>> able to obtain such geometry from a raw dm device? I have read of
Wow, I'm late to the game. If your kernel/software are new enough, you
can set a dm device's geometry via the DM_DEV_SET_GEOMETRY_CMD ioctl.
iirc, the userland equivalent is:
# dmsetup setgeometry /dev/foo cyl head spt start
...after which HDIO_GETGEO should return nonzero values.
You'll need kernel 2.6.16+ and I think the requisite version of dmsetup
is 1.02. And to my (very limited) knowledge of multipath, geometry is
not set up automatically.
--D
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: geometry of dm devices......
@ 2006-08-10 11:38 Peter Koutoupis
2006-08-10 15:20 ` Darrick J. Wong
0 siblings, 1 reply; 6+ messages in thread
From: Peter Koutoupis @ 2006-08-10 11:38 UTC (permalink / raw)
To: Darrick J. Wong, device-mapper development
Thanks Darrick,
I actually saw that in the source to build 1.02.08 but unfortunately it
would be of no help in my situation. You see I work in a storage/array
test environment and as for dm, we must specifically work with the
builds packaged with the releases of Redhat, Suse, etc. I saw that
SLES10 had a build of 1.02.xx but I can also see that it was prior to
this new implementation. We are unable to modify (unless required in a
customer support scenario) what is packaged with these releases. Thanks
again.
Regards,
Peter
-----Original Message-----
From: dm-devel-bounces@redhat.com [mailto:dm-devel-bounces@redhat.com]
On Behalf Of Darrick J. Wong
Sent: Tuesday, August 08, 2006 5:09 PM
To: device-mapper development
Subject: Re: [dm-devel] geometry of dm devices......
Peter Koutoupis wrote:
>> I understand the HDIO_GETGEO is an unsupported feature to dm
>> devices....but under normal practices how would a normal end-user be
>> able to obtain such geometry from a raw dm device? I have read of
Wow, I'm late to the game. If your kernel/software are new enough, you
can set a dm device's geometry via the DM_DEV_SET_GEOMETRY_CMD ioctl.
iirc, the userland equivalent is:
# dmsetup setgeometry /dev/foo cyl head spt start
...after which HDIO_GETGEO should return nonzero values.
You'll need kernel 2.6.16+ and I think the requisite version of dmsetup
is 1.02. And to my (very limited) knowledge of multipath, geometry is
not set up automatically.
--D
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: geometry of dm devices......
2006-08-10 11:38 geometry of dm devices Peter Koutoupis
@ 2006-08-10 15:20 ` Darrick J. Wong
0 siblings, 0 replies; 6+ messages in thread
From: Darrick J. Wong @ 2006-08-10 15:20 UTC (permalink / raw)
To: Peter Koutoupis; +Cc: device-mapper development
Peter Koutoupis wrote:
> this new implementation. We are unable to modify (unless required in a
> customer support scenario) what is packaged with these releases. Thanks
> again.
Since the dm geometry features are upstream for both kernel and userland
tools, you could try filing a feature request "bug" with RH and Novell
to see if they'd be amenable to picking it up.
--D
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-08-10 15:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-10 11:38 geometry of dm devices Peter Koutoupis
2006-08-10 15:20 ` Darrick J. Wong
-- strict thread matches above, loose matches on Subject: below --
2006-08-08 20:32 Peter Koutoupis
2006-08-08 22:08 ` Darrick J. Wong
2006-08-02 16:26 Peter Koutoupis
2006-08-08 20:05 ` Benjamin Marzinski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.