[rescue] Solaris ZFS questions
patrick at zill.net
Fri Jan 14 13:07:22 CST 2011
On 1/14/2011 1:58 PM, der Mouse wrote:
>> 1. I believe that the degraded drive had a read-error. When I take
>> this drive out of the pool, how can I verify that I can read/write
>> all sectors?
> Um, dd to/from the raw disk device? It's been a while since I used
> Solaris, but I think back then it still fit the common Unix paradigms
> well enough for that. (I didn't play with zfs, but it sounds as though
> you want to do this after telling zfs to let go of the drive, so zfs
> isn't really involved with this part.)
> In case you don't know what I mean by that, it'd be something like
> dd if=/dev/whatever of=/dev/null bs=65536
Solaris' "format" command can do tests either destructively (will cause
data to be lost on the disk) or non-destructively. Even has a nice
little text interface :-)
>> 2. I tried to back up the data on the pool using GnuTAR with the
>> --ignore-failed-read and GnuTar still errored/exited out and didn't
>> just skip the file and continue writing. How can I get around this
>> as I thought that the ignore failed read would just skip the file and
>> continue on.
> The manpage I have documents --ignore-failed-read as "Don't exit with
> non-zero status on unreadable files". It doesn't say whether this
> means "files whose permission bits deny read access" or "files on which
> read() returns an error indication"; given your experience, I suspect
> it's the former.
Surely a little bit of scripting combined with regular tar or cpio would
do it. If you generate a list of all files on the drive, then feed that
into a script, echo'ing the current filename, when the script errors out
and stops you know which file is the culprit.
More information about the rescue