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
[-- Attachment #1 --] On Fri, Sep 11, 2009 at 09:57:45AM -0400, Weldon S Godfrey 3 wrote: > > Sorry, I lost the reply to this > > the command was: > > dd if=/dev/zero of=/export/store1-1 bs=64k count=10000 > the 'of' was an accident, it was meant to be to a file and not the > mountpoint > here is the df > tank/store1-1 2882037632 1161418880 1720618752 40% > /export/store1-1 Hmm, bascially you cannot write to directories directly: tank/foobar on /foo/bar (zfs, local) # dd if=/dev/zero of=/foo/bar bs=64k count=10000 dd: /foo/bar: Is a directory > sorry, I didn't execute this and I misunderstood what happened. I > thought the 'of' was to tank/store1-1 so this may not be > such an issue. > > I personally never tested to see if you use the mountpoint > instead of the /dev special file (or zfs volume in this case) with the 'of > argument in dd, would dd treat the mountpoint as if it was the /dev > 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 > appeared in FreeBSD as if it was blank. I tried to do a rollback but that > caused the system to panic. Which turned out to be great, the system came > back fine (not zeroed out) and not rolled back (as it was before the dd > comand was executed). > > sorry, this may not be an issue at all. we are happy that zfs didn't kill > the data on this accident. You must misinterpret something, because it is not possible to write to a directory... -- Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFKqmzeForvXbEpPzQRAq+jAJ0UavBVoN71IGuRWk3kkCU/hMkulgCcDvqt 5FtnIpxISX+Etog2BtjY04Y= =swIg -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090911152934.GE1673>
