Date: Fri, 11 Sep 2009 17:29:34 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Weldon S Godfrey 3 <weldon@excelsusphoto.com> Cc: freebsd-bugs@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org Subject: Re: kern/138244: dd attempts bitwise transfer onto ZFS pool Message-ID: <20090911152934.GE1673@garage.freebsd.pl> In-Reply-To: <alpine.BSF.2.00.0909110946080.48448@emmett.excelsus.com> References: <200908271900.n7RJ09Ax095497@freefall.freebsd.org> <alpine.BSF.2.00.0909110946080.48448@emmett.excelsus.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--SWTRyWv/ijrBap1m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 11, 2009 at 09:57:45AM -0400, Weldon S Godfrey 3 wrote: >=20 > Sorry, I lost the reply to this >=20 > the command was: >=20 > dd if=3D/dev/zero of=3D/export/store1-1 bs=3D64k count=3D10000 > the 'of' was an accident, it was meant to be to a file and not the=20 > mountpoint > here is the df > tank/store1-1 2882037632 1161418880 1720618752 40%=20 > /export/store1-1 Hmm, bascially you cannot write to directories directly: tank/foobar on /foo/bar (zfs, local) # dd if=3D/dev/zero of=3D/foo/bar bs=3D64k count=3D10000 dd: /foo/bar: Is a directory > sorry, I didn't execute this and I misunderstood what happened. I=20 > thought the 'of' was to tank/store1-1 so this may not be=20 > such an issue. >=20 > I personally never tested to see if you use the mountpoint=20 > instead of the /dev special file (or zfs volume in this case) with the 'o= f=20 > argument in dd, would dd treat the mountpoint as if it was the /dev=20 > special file. dd(1) simply use open(2) to open the 'of' target. If you can't for example ls(1) the target you won't be able to use it for dd(1). > however, the result was understood correctly, it zeroed out the dir, it= =20 > appeared in FreeBSD as if it was blank. I tried to do a rollback but tha= t=20 > caused the system to panic. Which turned out to be great, the system cam= e=20 > back fine (not zeroed out) and not rolled back (as it was before the dd= =20 > comand was executed). >=20 > sorry, this may not be an issue at all. we are happy that zfs didn't kil= l=20 > the data on this accident. You must misinterpret something, because it is not possible to write to a directory... --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --SWTRyWv/ijrBap1m Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKqmzeForvXbEpPzQRAq+jAJ0UavBVoN71IGuRWk3kkCU/hMkulgCcDvqt 5FtnIpxISX+Etog2BtjY04Y= =swIg -----END PGP SIGNATURE----- --SWTRyWv/ijrBap1m--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090911152934.GE1673>