kern/138244: dd attempts bitwise transfer onto ZFS pool
Pawel Jakub Dawidek
pjd at FreeBSD.org
Fri Sep 11 15:29:39 UTC 2009
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 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-bugs/attachments/20090911/67009f0a/attachment.pgp
More information about the freebsd-bugs
mailing list