Skip to content

Recovering a zpool from it’s iscsi mirror

December 21, 2007

While I have stopped using iscsi to back up my laptops as zfs send and receive have proved to be more reliable and convenient my Dell laptop broke when I was still using this. So the only back up of the bits on the disk I have was living on my server in a zdev. Also since the data is now so old I don’t really need to restore it at all. However it would be rude not to try. So first following the instructions from my original post I have the iscsi target available:

: sigma TS 2 $; pfexec zpool import   pool: home     id: 9959281504147327308  state: DEGRADED status: One or more devices contains corrupted data. action: The pool can be imported despite missing or damaged devices.  The         fault tolerance of the pool may be compromised if imported.    see: http://www.sun.com/msg/ZFS-8000-4J config:          home                                       DEGRADED           mirror                                   DEGRADED             c0d0s7                                 FAULTED  corrupted data             c4t0100001731F649B400002A0046264D39d0  ONLINE : sigma TS 3 $; pfexec zpool import home   cannot mount ‘/export/home’: directory is not empty : sigma TS 4 $;  bin/sh/zfs_send-r home/users export/users   zfs send home/users@day_13 |zfs receive export/users zfs send -i home/users@day_13 home/users@day_16 |zfs receive export/users zfs send -i home/users@day_16 home/users@day_21 |zfs receive export/users zfs send -i home/users@day_21 home/users@day_28 |zfs receive export/users zfs send -i home/users@day_28 home/users@day_03 |zfs receive export/users zfs send -i home/users@day_03 home/users@day_10 |zfs receive export/users zfs send -i home/users@day_10 home/users@hour_07 |zfs receive export/users zfs send -i home/users@hour_07 home/users@hour_01 |zfs receive export/users zfs send -i home/users@hour_01 home/users@day_25 |zfs receive export/users zfs send -i home/users@day_25 home/users@hour_02 |zfs receive export/users zfs send -i home/users@hour_02 home/users@hour_03 |zfs receive export/users zfs send -i home/users@hour_03 home/users@hour_04 |zfs receive export/users zfs send -i home/users@hour_04 home/users@hour_05 |zfs receive export/users zfs send -i home/users@hour_05 home/users@hour_06 |zfs receive export/users zfs send -i home/users@hour_06 home/users@hour_10 |zfs receive export/users zfs send -i home/users@hour_10 home/users@hour_23 |zfs receive export/users zfs send -i home/users@hour_23 home/users@hour_08 |zfs receive export/users zfs send -i home/users@hour_08 home/users@hour_16 |zfs receive export/users zfs send -i home/users@hour_16 home/users@hour_09 |zfs receive export/users zfs send -i home/users@hour_09 home/users@hour_22 |zfs receive export/users zfs send -i home/users@hour_22 home/users@hour_17 |zfs receive export/users zfs send -i home/users@hour_17 home/users@hour_15 |zfs receive export/users 

Nice to know it worked and I still have all the snapshots going back until the dawn of time, well 2005 anyway.

Advertisements

From → Solaris

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: