Quantcast
Channel: Active questions tagged zfs - Server Fault
Viewing all articles
Browse latest Browse all 138

Recover ZFS mirror from pool with unavailable device

$
0
0

I tried to expand my two-way mirror to a three-way mirror. The new drive had some filesystem issues (ext4) so I tried to force zpool add -f the drive for ZFS to handle for me. This led to a weird configuration:

 config:    mypool                ONLINE      mirror-0            ONLINE        wwn-drive1-part1  ONLINE        wwn-drive2-part1  ONLINE      scsi-new-drive      ONLINE

So I then tried to attach the new drive:

sudo zpool attach -f mypool wwn-drive1-part1 scsi-new-drive /dev/disk/by-id/scsi-new-drive is in use and contains a unknown filesystem.

What I then did which further complicated things is export the pool and wipe the drive (wipefs -a). Now of course when I try to import the pool I get:

 config:    mypool                    UNAVAIL  insufficient replicas      mirror-0                ONLINE        wwn-drive1-part1      ONLINE        wwn-drive1-part1      ONLINE      scsi-new-drive          UNAVAIL

The existing mirror has two 10TB drives with about 6TB used. I have backups but if possible, I'd like to avoid them and recover (or move?) the pool. I want to get to this state:

    mypool      mirror-0        wwn-drive1-part1        wwn-drive1-part1        new-drive

Is there any hope? What can I do to restore the pool to operational?


Viewing all articles
Browse latest Browse all 138

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>