[rescue] Solaris ZFS questions
mouse at Rodents-Montreal.ORG
Fri Jan 14 12:58:40 CST 2011
> 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
for a read test, or "if=/dev/zero of=/dev/whatever" for a write test.
"whatever" is the disk name; fuzzy memory from back when I touched
Solaris says it'd be something like /dev/rdsk/c0t1d0s2. There's
nothing special about 65536; it needs to be a multiple of the drive
sector size (probably 512 or 4096 or some such) and should be large so
as to amortize syscall overhead over much data. I often use 1048576
instead when doing this kind of thing.
> 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.
How to deal with this? You need a tool better suited to the job. I
don't know of any standard ones. My tar has options that cna do this,
but I'm not sure whether they work when reading through the filesystem;
I added them for use with the read-below-the-filesystem code, and that
code is FFSv1-only.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse at rodents-montreal.org
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
More information about the rescue