Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Jun 2015 22:29:32 -0400
From:      Quartz <quartz@sneakertech.com>
To:        Chris Stankevitz <chrisstankevitz@gmail.com>
Cc:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   Re: Corrupt GPT on ZFS full-disks that shouldn't be using GPT
Message-ID:  <5590AD8C.7030904@sneakertech.com>
In-Reply-To: <20150628232208.GA69625@neutralgood.org>
References:  <CAPi0psvpvO4Kpbietpzyx1TjyB20hWV%2BCK-y3bWG4OARE1VMSg@mail.gmail.com> <558F99B6.2080205@sneakertech.com> <CAPi0pst6FP3m6Du-BpSU%2BVm_WGhfVjay_qAzfA%2BOaEz3fb1Fkg@mail.gmail.com> <559070CC.8040105@sneakertech.com> <20150628232208.GA69625@neutralgood.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> When making changes like dd'ing the end of a disk be sure to do a scrub
> after touching _only_ _one_ disk. I suggest doing scrubs until you get a
> clean one. Then move on to the next disk, doing the write/scrub steps on
> each disk in turn.

This is good advice.


> It may just make recovery more complicated. If it was me I'd just zero the
> last block without the offline/online dance.

... but I'm not sure that is.

>Can I use dd on a /dev/daX that is currently part of an
> imported, mounted, and online zpool?

There's nothing technically stopping you, but screwing with it "live" is 
not a great idea. At the least, if zfs IS using those blocks or 
otherwise notices, it will consider the drive to be throwing errors and 
mark it as failing, so you'll have to deal with the issue anyway.

Honestly though, this whole thread is really better suited for 
freebsd-fs rather than freebsd-questions. You'll probably get better 
answers there.


>Also, if anyone can answer this
> question more generally, I'd appreciate it: are there times (other
> than r-x) when I do not have permission/ability to dd if=/dev/zero
> of=/dev/daX?

It can happen. I've bumped into that once when a dvd was improperly 
cloned onto a usb drive and it got stuck in a weird read-only mode and I 
had to jump through a couple hoops to erase it (this wasn't freebsd though).





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5590AD8C.7030904>