strange error of GEOM_RAID3 on RELENG_5

Pawel Jakub Dawidek pjd at FreeBSD.org
Fri Mar 25 02:41:26 PST 2005


On Fri, Mar 25, 2005 at 02:25:33PM +0900, Hiroki Sato wrote:
+> Pawel Jakub Dawidek <pjd at FreeBSD.org> wrote
+>   in <20050324135602.GZ591 at darkness.comp.waw.pl>:
+> 
+> pj> This is very strange and I've no idea why you get EPERM from ad[246]s1a.
+> 
+>  Ah, I found a simple use of dd failed.  Sorry for the false alarm...
+> 
+>  I used a disklabel like this:
+> 
+>  a:   100g      *    4.2BSD
+>  c:    *        *    unused
+> 
+>  When the offset of /dev/ad2s1a is 0,
+>  "dd if=/dev/zero of=/dev/ad2s1a bs=512 count=1" works fine but
+>  "dd if=/dev/zero of=/dev/ad2s1a bs=512 count=2" fails (count > 2 or
+>  bs!=512 also occurs EPERM with whatever skip= value).
+>  When the offset is set to >2, dd works as expected.
+> 
+>  The second sector seems to contain the disklabel information
+>  and "disklabel -w /dev/ad2s1a auto" generates an offset
+>  of 16 for a: partition.  Is using an offset of 0 wrong?
+>  I assumed that the offset can be 0 and /dev/ad2s1a does not
+>  (effectively) overlap with the disklabel area and so on,
+>  but am I mistaken about it?
+> 
+>  And if the offset is necessary, I still do not understand why
+>  "dd if=/dev/zero of=/dev/ad2s1a bs=512 count=2 skip=1000" fails.

Offset 0 is bogus for 'a' partition - it means, you can overwrite
BSD label by writting to the partition.
bsdlabel(8) generated 'a' partition at offset 16, which is ok, but
sysinstall do it at offset 0.

I've no idea why your dd test with count=200 fails...

PS. CCing phk@

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20050325/9a2e3f68/attachment.bin


More information about the freebsd-geom mailing list