How can I use commands to replace a bad hard drive when the my zpool is offline and cannot be imported #16182
Replies: 2 comments 2 replies
-
To replace a failed disk you have to have enough redundancy left to import the pool and do the replacement. If two of the disks failed for raidz1 you may not have enough disks to recover the data and the pool will fail to import. I would start by identifying where your data is - which disks or partitions hold the data. Use the following command with one of the partitions constituting the zpool: |
Beta Was this translation helpful? Give feedback.
-
it's possible you removed wrong disk and now it thinks it has lost 2 and can't proceed. restore, and run a "zpool import" so we can see how many are bad |
Beta Was this translation helpful? Give feedback.
-
Hello, everybody.
I have a RAID-Z1 pool that uses 5 hard drives, and I recently received a SMART alert about 1 of them. When I shut down my NAS, found the bad hard drive and inserted a new one, then turned it back on and executed the zfs replace command, zfs reminded me that the pool didn't exist.
root@truenas[/home/admin]# zpool import massstorage
cannot import 'massstorage': I/O error
Destroy and re-create the pool from
a backup source.
root@truenas[/home/admin]#
It looks like zfs can only be replaced in an imported pool, can I execute the replacement command on an offline ZFS pool? What can I do to get ZFS to automatically rebuild my RAID-Z1 pool, which has about 6TB of precious data in it.
Pious need help from anyone :)
Beta Was this translation helpful? Give feedback.
All reactions