zfs list
stuck after importing a damaged file-backed pool
#10223
Labels
Status: Stale
No recent activity for issue
System information
zfs-kmod-0.8.3-1ubuntu11
Describe the problem you're observing
I wanted to replicate the scenario described in https://jrs-s.net/2016/05/02/zfs-copies-equals-n/. My thinking is that although --copies=2 does not guarantee each copy will be on a separate disk, and neither that the metadata will be spread out, it should be possible to recover something even if a drive fails. I built the zfs pool using files, not loop-mounted devices.
I booted computer from Ubuntu 20.04 Daily 2020-04-16 installation iso, loaded onto USB disk.
When I issued
zfs import
to import my damaged pool, the command froze, all otherzfs
orzpool
commands (except for trivial ones like--version
) would also freeze, and system reboot also froze, requiring me to reboot using SysRq shortcut.I tried again after reboot and also got the same result, that is handing
zpool import
and zfs commands hanging too. The dmesg messages were also similar.When this happened for the first time, I had another pool mounted. It looked unafected (I could ls the mounted files just fine). I was afraid to touch it more, so I
umount
ed it quickly.Describe how to reproduce the problem
Create the pool
Put two files on it
Check I can export and reimport
First test, export the pool, and overwrite one of the backing files. Then reimport. Test passed.
Second test, export the pool and delete one of the files. Expected result is that I can no longer import. Test passed.
Now, replace the missing file with a blank file. I now expect that this will import ok, and, if I am lucky, one or both files will be restored from undamaged copy. The
zpool import
hangs.Include any warning/errors/backtraces from the system logs
dmesg output
another dmesg, when I encountered issue first time
restarting zsysd would also hang, here's output when running under strace
zfs list under strace, also hangs
The text was updated successfully, but these errors were encountered: