Date: Fri, 25 Mar 2005 11:41:20 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Hiroki Sato <hrs@FreeBSD.org> Cc: freebsd-geom@FreeBSD.org Subject: Re: strange error of GEOM_RAID3 on RELENG_5 Message-ID: <20050325104120.GG591@darkness.comp.waw.pl> In-Reply-To: <20050325.142533.35104027.hrs@allbsd.org> References: <20050324082319.GU591@darkness.comp.waw.pl> <20050324.183055.74659435.hrs@allbsd.org> <20050324135602.GZ591@darkness.comp.waw.pl> <20050325.142533.35104027.hrs@allbsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--W39hVXXos07RO0vT Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 25, 2005 at 02:25:33PM +0900, Hiroki Sato wrote: +> Pawel Jakub Dawidek <pjd@FreeBSD.org> wrote +> in <20050324135602.GZ591@darkness.comp.waw.pl>: +>=20 +> pj> This is very strange and I've no idea why you get EPERM from ad[246]= s1a. +>=20 +> Ah, I found a simple use of dd failed. Sorry for the false alarm... +>=20 +> I used a disklabel like this: +>=20 +> a: 100g * 4.2BSD +> c: * * unused +>=20 +> When the offset of /dev/ad2s1a is 0, +> "dd if=3D/dev/zero of=3D/dev/ad2s1a bs=3D512 count=3D1" works fine but +> "dd if=3D/dev/zero of=3D/dev/ad2s1a bs=3D512 count=3D2" fails (count > = 2 or +> bs!=3D512 also occurs EPERM with whatever skip=3D value). +> When the offset is set to >2, dd works as expected. +>=20 +> 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? +>=20 +> And if the offset is necessary, I still do not understand why +> "dd if=3D/dev/zero of=3D/dev/ad2s1a bs=3D512 count=3D2 skip=3D1000" fai= ls. 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=3D200 fails... PS. CCing phk@ --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --W39hVXXos07RO0vT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFCQ+rQForvXbEpPzQRAkcFAKCL/rg86tYZlO6TV2Cu3ncXBhMZ6gCgm9Mo gg2AN8sgX5WSB+Rr8FwAJcc= =gjdL -----END PGP SIGNATURE----- --W39hVXXos07RO0vT--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050325104120.GG591>
