Peter | 2 Oct 23:07

udev doesn't detect ddf-format raid array

Hi!

I have an adaptec hostraid controller (fakeraid) with 2 drives connected in a 
RAID1 array (metadata is in DDF format) which is nicely detected and enabled 
by dmraid, there is no problem with it after it's enabled.

Recently debian's dmraid-booter has switched to use udev. But udev does not 
detect my drives as raid type, ID_FS_USAGE is missing from the drive info (it 
should be "raid"), so the result is that dmraid does not called at boot. Also 
vol_id sees the partitions as normal partitions.

I've recognised that one of my disks has a HPA, the other hasn't. I'm not sure 
if this has any effect, but because of this, the DDF1-headers are not at the 
same position on the 2 drives.

Below are some outputs. The last one is a 'dmraid -n' output, and what is 
strange for me at first sight is that both drives has 2 DDF1-headers. Is this 
normal? Or do you think I should try to rebuild the raid array with the bios 
utility (maybe after some bios upgrade)? Or is this rather an udev problem?

Thanks,
Peter

$ udevinfo --query=all --name=sda
P: /block/sda
N: sda
S: disk/by-id/ata-SAMSUNG_SP2004C_S07GJ1LYB11332
S: disk/by-id/scsi-SATA_SAMSUNG_SP2004CS07GJ1LYB11332
S: disk/by-path/pci-0000:03:00.0-scsi-0:0:0:0
E: ID_VENDOR=ATA
(Continue reading)

Kay Sievers | 3 Oct 00:47
Gravatar

Re: udev doesn't detect ddf-format raid array

On Thu, Oct 2, 2008 at 11:09 PM, Peter <ple <at> upcmail.hu> wrote:
> I have an adaptec hostraid controller (fakeraid) with 2 drives connected in a
> RAID1 array (metadata is in DDF format) which is nicely detected and enabled
> by dmraid, there is no problem with it after it's enabled.
>
> Recently debian's dmraid-booter has switched to use udev. But udev does not
> detect my drives as raid type, ID_FS_USAGE is missing from the drive info (it
> should be "raid"), so the result is that dmraid does not called at boot. Also
> vol_id sees the partitions as normal partitions.
>
> I've recognised that one of my disks has a HPA, the other hasn't. I'm not sure
> if this has any effect, but because of this, the DDF1-headers are not at the
> same position on the 2 drives.
>
> Below are some outputs. The last one is a 'dmraid -n' output, and what is
> strange for me at first sight is that both drives has 2 DDF1-headers. Is this
> normal? Or do you think I should try to rebuild the raid array with the bios
> utility (maybe after some bios upgrade)? Or is this rather an udev problem?

Likely, that volume_id needs a fix. I never really tested with a real
ddf volume.

What udev version are you running?

Is this an Adaptec controller?

Can you send me a copy of the sectors containing the ddf header? Along
with the exact dd commandline you used to extract it, so can copy it
to a drive and test it.

(Continue reading)

Peter Leipold | 3 Oct 09:59

Re: udev doesn't detect ddf-format raid array

On Friday 03 October 2008 00.47.23 Kay Sievers wrote:
> Likely, that volume_id needs a fix. I never really tested with a real
> ddf volume.
>
> What udev version are you running?

0.125-7

But I downloaded 0.129 yesterday and compiled it (I cannot install it 
system-wide, as I'm not that expert to know what stuff needs to be copied 
where, and I don't want to break this system). I tried to run udevadm and 
vol_id from the place of the compilation, the former didn't work, the latter 
gave the same result as in the 0.125 version:

# ./udev-129/udev/udevadm info --query=all --name=sda
device node not found

# ./udev-129/extras/volume_id/vol_id /dev/sda2
ID_FS_USAGE=filesystem
ID_FS_TYPE=ext3
ID_FS_VERSION=1.0
ID_FS_UUID=db631065-7ca8-45fc-bf60-a9259a732dec
ID_FS_UUID_ENC=db631065-7ca8-45fc-bf60-a9259a732dec
ID_FS_LABEL=
ID_FS_LABEL_ENC=
ID_FS_LABEL_SAFE=

> Is this an Adaptec controller?

Yes, it's their simplest 2-port card, model name 1220SA I think. It has a 
(Continue reading)

Kay Sievers | 3 Oct 10:17
Gravatar

Re: udev doesn't detect ddf-format raid array

On Fri, Oct 3, 2008 at 9:59 AM, Peter Leipold <ple <at> upcmail.hu> wrote:
> On Friday 03 October 2008 00.47.23 Kay Sievers wrote:
>> Likely, that volume_id needs a fix. I never really tested with a real
>> ddf volume.
>>
>> What udev version are you running?
>
> 0.125-7

That's fine, there have been no changes to ddf after udev 111

> But I downloaded 0.129 yesterday and compiled it (I cannot install it
> system-wide, as I'm not that expert to know what stuff needs to be copied
> where, and I don't want to break this system). I tried to run udevadm and
> vol_id from the place of the compilation, the former didn't work, the latter
> gave the same result as in the 0.125 version:
>
> # ./udev-129/udev/udevadm info --query=all --name=sda
> device node not found

I guess it's because configure uses the default --prefix=/usr anf
therefore /usr/local/dev/ to look for device nodes. But 125 sounds
fine anyway.

> # ./udev-129/extras/volume_id/vol_id /dev/sda2
> ID_FS_USAGE=filesystem
> ID_FS_TYPE=ext3
> ID_FS_VERSION=1.0
> ID_FS_UUID=db631065-7ca8-45fc-bf60-a9259a732dec
> ID_FS_UUID_ENC=db631065-7ca8-45fc-bf60-a9259a732dec
(Continue reading)

Peter Leipold | 3 Oct 10:59

Re: udev doesn't detect ddf-format raid array

On Friday 03 October 2008 10.17.37 Kay Sievers wrote:
> 0xDE11DE11 is the signature we are looking for. I'll see if I can make
> that work.

Thank you Kay! As I fell into the mistake of buying such a card and believing 
it's true raid, I really appreciate your work!
	
Peter
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Kay Sievers | 3 Oct 15:33
Gravatar

Re: udev doesn't detect ddf-format raid array

On Fri, Oct 3, 2008 at 10:17 AM, Kay Sievers <kay.sievers <at> vrfy.org> wrote:
> On Fri, Oct 3, 2008 at 9:59 AM, Peter Leipold <ple <at> upcmail.hu> wrote:
>> On Friday 03 October 2008 00.47.23 Kay Sievers wrote:

>>> Can you send me a copy of the sectors containing the ddf header? Along
>>> with the exact dd commandline you used to extract it, so can copy it
>>> to a drive and test it.
>>
>> Attached. I hope I did the right thing. I got the offset and size with
>> dmraid's help (dumping raid metadata). So these dd commands resulted the same
>> files as dmraid -rD:
>>
>> dd if=/dev/sda of=sda_ddf1.dat bs=1 count=6144 skip=200048559616
>> dd if=/dev/sdb of=sdb_ddf1.dat bs=1 count=6144 skip=200049641472
>
> Looks good:
>  hexdump -C sda_ddf1.dat  | head -1
>  00000000  11 de 11 de e2 e6 4c ae  38 5a b0 49 95 10 42 02  |......L.8Z.I..B.|
>
> 0xDE11DE11 is the signature we are looking for. I'll see if I can make
> that work.

Here is what I get now from the sector you sent:
  $ dd if=~/Desktop/sdb_ddf1.dat bs=1 seek=200049641472 of=ddf-header.img
  $ losetup /dev/loop0 ddf-header.img
  $ ./vol_id /dev/loop0
  ID_FS_USAGE=raid
  ID_FS_TYPE=ddf_raid_member
  ID_FS_VERSION=02.00.0
  ID_FS_UUID=8Z_I__B_8Z_I_e_I_q_I____
(Continue reading)

Peter Leipold | 3 Oct 18:53

Re: udev doesn't detect ddf-format raid array

On Friday 03 October 2008 15.33.29 Kay Sievers wrote:
> If you want to try, let me know what it says:

Great, it works, thanks! :)

# ./vol_id /dev/sda
ID_FS_USAGE=raid
ID_FS_TYPE=ddf_raid_member
ID_FS_VERSION=02.00.0
ID_FS_UUID=_VsJ__B__VsJ0bsJ_nsJ____
ID_FS_UUID_ENC=\x08VsJ\x95\x10B\x02\x08VsJ0bsJ\x18nsJ\xff\xff\xff\xff
ID_FS_LABEL=
ID_FS_LABEL_ENC=

# ./vol_id /dev/sdb
ID_FS_USAGE=raid
ID_FS_TYPE=ddf_raid_member
ID_FS_VERSION=02.00.0
ID_FS_UUID=_VsJ__B__VsJ0bsJ_nsJ____
ID_FS_UUID_ENC=\x08VsJ\x95\x10B\x02\x08VsJ0bsJ\x18nsJ\xff\xff\xff\xff
ID_FS_LABEL=
ID_FS_LABEL_ENC=

> Note, that ./vol_id is just a autotools wrapper script, which runs the
> program with libvolume_id from the source tree, so don't copy the
> script to your system. :)

Ok, it's not crucial, I have a workaround to my original problem, so I can 
wait until debian-unstable starts using this upgraded libvolume_id.

(Continue reading)


Gmane