From owner-freebsd-bugs@FreeBSD.ORG Fri Sep 11 15:29:39 2009 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5C8410656C1; Fri, 11 Sep 2009 15:29:39 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello087206049004.chello.pl [87.206.49.4]) by mx1.freebsd.org (Postfix) with ESMTP id 11EDB8FC15; Fri, 11 Sep 2009 15:29:38 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 6D43E45C9F; Fri, 11 Sep 2009 17:29:36 +0200 (CEST) Received: from localhost (pdawidek.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id 962DF45C8C; Fri, 11 Sep 2009 17:29:31 +0200 (CEST) Date: Fri, 11 Sep 2009 17:29:34 +0200 From: Pawel Jakub Dawidek To: Weldon S Godfrey 3 Message-ID: <20090911152934.GE1673@garage.freebsd.pl> References: <200908271900.n7RJ09Ax095497@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SWTRyWv/ijrBap1m" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 8.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: freebsd-bugs@FreeBSD.org, FreeBSD-gnats-submit@FreeBSD.org Subject: Re: kern/138244: dd attempts bitwise transfer onto ZFS pool X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2009 15:29:39 -0000 --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--