I had to use the labelfix hack (and I had to recompile it at that) on 1/2 of an old zpool. I made this change: /* zio_checksum(ZIO_CHECKSUM_LABEL, &zc, buf, size); */ zio_checksum_table[ZIO_CHECKSUM_LABEL].ci_func[0](buf, size, &zc); and I''m assuming [0] is the correct endianness, since afterwards I saw it come up with "zpool import". Unfortunately, I can''t import it. Here''s what happens: # uname -a SunOS neuromancer 5.11 snv_130 i86pc i386 i86pc # zpool import pool: hdc id: 18323387294498987089 state: FAULTED status: The pool was last accessed by another system. action: The pool cannot be imported due to damaged devices or data. The pool may be active on another system, but can be imported using the ''-f'' flag. see: http://www.sun.com/msg/ZFS-8000-EY config: hdc FAULTED corrupted data mirror-0 DEGRADED c1t0d0s0 FAULTED corrupted data c8t1d0s0 ONLINE # zpool import -f hdc cannot import ''hdc'': one or more devices is currently unavailable Destroy and re-create the pool from a backup source. # zpool status pool: rpool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM rpool ONLINE 0 0 0 c8t0d0s0 ONLINE 0 0 0 errors: No known data errors # Note that c1t0d0s0 was on the old system, and that it''s now the (wiped clean) c8t0d0s0. Any clues are, as always, welcome. I''d prefer not to restore my saved zfs-send streams, so I''d like to get the import of the old root pool (hdc) to work. Thanks! Dan McD. -- This message posted from opensolaris.org
Cindy Swearingen
2010-Jan-05 18:09 UTC
[zfs-discuss] "zpool import -f" not forceful enough?
Hi Dan, Can you describe what you are trying to recover from with more details because we can''t quite follow what steps might have lead to this scenario. For example, your hdc pool had two disks, c1t0d0s0 and c8t1d0s0, and your rpool has c8t0d0s0 so s8t0d0s0 cannot be wiped clean. Maybe you mean c8t1d0s0 is now relabeled (with labelfix) and reconnected for hdc but c1t0d0s0 is still corrupted so the hdc pool cannot be re-imported is my guess... Thanks, Cindy On 01/03/10 14:49, Dan McDonald wrote:> I had to use the labelfix hack (and I had to recompile it at that) on 1/2 of an old zpool. I made this change: > > /* zio_checksum(ZIO_CHECKSUM_LABEL, &zc, buf, size); */ > zio_checksum_table[ZIO_CHECKSUM_LABEL].ci_func[0](buf, size, &zc); > > and I''m assuming [0] is the correct endianness, since afterwards I saw it come up with "zpool import". > > Unfortunately, I can''t import it. Here''s what happens: > > # uname -a > SunOS neuromancer 5.11 snv_130 i86pc i386 i86pc > # zpool import > pool: hdc > id: 18323387294498987089 > state: FAULTED > status: The pool was last accessed by another system. > action: The pool cannot be imported due to damaged devices or data. > The pool may be active on another system, but can be imported using > the ''-f'' flag. > see: http://www.sun.com/msg/ZFS-8000-EY > config: > > hdc FAULTED corrupted data > mirror-0 DEGRADED > c1t0d0s0 FAULTED corrupted data > c8t1d0s0 ONLINE > # zpool import -f hdc > cannot import ''hdc'': one or more devices is currently unavailable > Destroy and re-create the pool from > a backup source. > # zpool status > pool: rpool > state: ONLINE > scrub: none requested > config: > > NAME STATE READ WRITE CKSUM > rpool ONLINE 0 0 0 > c8t0d0s0 ONLINE 0 0 0 > > errors: No known data errors > # > > Note that c1t0d0s0 was on the old system, and that it''s now the (wiped clean) c8t0d0s0. Any clues are, as always, welcome. I''d prefer not to restore my saved zfs-send streams, so I''d like to get the import of the old root pool (hdc) to work. > > Thanks! > Dan McD.
> Hi Dan, > > Can you describe what you are trying to recover from > with more details > because we can''t quite follow what steps might have > lead to this > scenario.Sorry. I was running Nevada 103 with a root zpool called "hdc" with c1t0d0s0 and c1t1d0s0. I first uttered: "zpool detach hdc c1t1d0s0". I then detached that drive, installed OpenSolaris on what *was* c1t0d0s0. Once I rebooted into OpenSolaris, I noticed that the drive had become c8t0d0s0. Assuming the same remapping happened to the other drive, I plugged it back in, ran labelfix on c8t1d0s0, and now got to see that pool "hdc" assumes the mirror is c1t0d0s0 and c8t1d0s0. I have no idea what c1t0d0s0 points to on the new OpenSolaris view of things, but it is definitely corrupt from the point of view of a ZFS mirrored pool. So it sounds like I cannot whack c8t1d0s0 to be a pool all by itself and I should just give up. Is that correct? Thanks, Dan -- This message posted from opensolaris.org