-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"zpool import" hangs #4322
Comments
This indicates ZFS suspended the pool due to I/O errors from the disk. In this case it looks like it was still working on importing the pool which is why all the commands are blocked. You'll want to investigate why there were disk errors. |
Thanks for your response. I'll investigate but it's odd since the backend device was a RAID device and it was taking read and writes fine. Each time we run the import (after reboot) the same thing happened. Ultimately we ended up deleting the pool and recreating it and the issue cleared. I'll update this issue if the problem occurs again. |
@BenEstrabaud That is not odd at all. RAID is almost entirely incapable of recognizing when the data it reads from the disks is wrong. The only exception occurs on a degraded array, when parity might catch it, but parity is not guaranteed to catch it. In all other cases, it will happily return wrong data. ZFS on the other hand, is designed to detect this and when it has sufficient redundancy, it will correct it. ZFS has redundant metadata such that it would normally be able to recover from this issue even without mirror / raidz vdevs. A failure despite that means that the storage under ZFS damaged multiple IOs. ZFS with raidz and/or mirror vdevs would have been able to recover from this and tell you which device caused it, assuming that it was just one. That said, your dmesg output suggests that you are using MD RAID 6. I suggest that you switch to raidz2. There are numerous problems with the design of RAID that are unfixable. Some of them are documented on the Open ZFS wiki in a discussion of Hardware RAID. Any point that does not describe some physical hardware component also applies to software RAID: |
Thanks for your answer, We are aware of the issue using a RAID as a backend storage (especially with regards to data integrity) is a less than optimal solution. It is possible that this RAID had been damaged during test before hand, I know understand that the issue could have stemmed from ZFS failing to start/hanging as metadata would be damaged. I suppose I'm going to close that issue as the hang happened because of a use case that's not a recommended one. Thanks both for those clarifications. |
@BenEstrabaud Someone pointed out to me that we really should have returned an error to userspace in this instance and he is right. This does not contradict the idea that data was clobbered in a way from which we couldn't recover, but it does suggest that there is some sort race that can occur when this happens. Upon examining the stack trace in more detail, I see that we are blocked trying to grab With that in mind, we probably should reopen this. The only stupid thing hardware is presently allowed to do that could hang import is fail to respond to IOs (this would irrecoverably hang anything non-FUSE at the moment). Everything else should cause import to terminate with an error code. |
Thanks for your answer. In our case having an error instead of a hang would help getting out of a situation where a reboot is the only alternative with heavy manual intervention to prevent further import. Here is the rest of the trace: <3>[ 361.131405] INFO: task zpool:3032 blocked for more than 120 seconds. Thanks a lot for your help! |
This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions. |
System setup:
After a system failure (both nodes failed, ZFS filesystem was running and not cleanly unmounted), one of the node restarted and attempted to "import" all 4 RAID backed zpools. All 4 "zpool command" then hang forever (still hung after hours).
Here is an extract from dmesg:
<7>[ 126.872975] RAID conf printout:
<7>[ 126.872976] --- level:6 rd:5 wd:5
<7>[ 126.872977] disk 0, o:1, dev:sdah3
<7>[ 126.872978] disk 1, o:1, dev:sdad3
<7>[ 126.872979] disk 2, o:1, dev:sdy3
<7>[ 126.872980] disk 3, o:1, dev:sdab3
<7>[ 126.872981] disk 4, o:1, dev:sdac3
<6>[ 126.872988] md/raid456: discard support disabled due to uncertainty.
<6>[ 126.880196] Set raid456.devices_handle_discard_safely=Y to override.
<6>[ 126.887515] created bitmap (1 pages) for device md_d1
<4>[ 126.893297] broadcasting MP EVENT 174 0:0:1
<6>[ 126.893327] md_d1: bitmap initialized from disk: read 1 pages, set 0 of 895 bits
<6>[ 126.893457] md_d1: detected capacity change from 0 to 5759937282048
<6>[ 126.913853] md_d1: p1 p2
<5>[ 128.579752] SPL: using hostid 0x00000000
<4>[ 138.713320] WARNING: Pool 'z0x1d2de4d79220088e' has encountered an uncorrectable I/O failure and has been suspended.
<4>[ 138.713320]
<6>[ 182.483156] nbd: registered device at major 43
<3>[ 188.552160] NFSD: Unable to end grace period: -110
<3>[ 361.131405] INFO: task zpool:3032 blocked for more than 120 seconds.
<3>[ 361.138580] Tainted: P O 4.1.5 #6
<3>[ 361.144198] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
<6>[ 361.153053] zpool D ffff880f3bde7b78 0 3032 2331 0x00000002
<4>[ 361.161159] ffff880f3bde7b78 ffff880f93d3e200 ffff8810384a0000 ffff880f45a8e200
<4>[ 361.169813] ffff880f3bde4008 ffff880f93d3e200 ffffffffa08b04a4 00000000ffffffff
<4>[ 361.178474] ffffffffa08b04a8 ffff880f3bde7b98 ffffffff816b50ae ffff880f93d3e200
<4>[ 361.187132] Call Trace:
<4>[ 361.189960] [] schedule+0x3e/0x90
<4>[ 361.195604] [] schedule_preempt_disabled+0xe/0x10
<4>[ 361.202808] [] __mutex_lock_slowpath+0x93/0x100
<4>[ 361.209813] [] ? spl_kmem_free+0x2b/0x40 [spl]
<4>[ 361.216722] [] mutex_lock+0x23/0x40
<4>[ 361.222575] [] spa_prop_get+0x2493/0x2850 [zfs]
<4>[ 361.229582] [] ? T.2226+0x4a/0x60
<4>[ 361.235237] [] ? zvol_create_minor+0x70/0x1050 [zfs]
<4>[ 361.242729] [] spa_open+0x13/0x20 [zfs]
<4>[ 361.248962] [] dmu_objset_find+0x39/0x440 [zfs]
<4>[ 361.255980] [] zvol_create_minors+0x33/0x6f0 [zfs]
<4>[ 361.263288] [] spa_import+0x49d/0x720 [zfs]
<4>[ 361.269905] [] ? nvlist_exists+0xe4/0x130 [znvpair]
<4>[ 361.277311] [] dataset_name_hidden+0x2454/0x4770 [zfs]
<4>[ 361.285012] [] pool_status_check+0x537/0x580 [zfs]
<4>[ 361.292342] [] do_vfs_ioctl+0x93/0x540
<4>[ 361.298470] [] SyS_ioctl+0xa1/0xb0
<4>[ 361.304211] [] system_call_fastpath+0x12/0x6a
<3>[ 361.311024] INFO: task zpool:3071 blocked for more than 120 seconds.
Any idea what is causing this problem? Any subsequent "zpool" command (like "zpool list") also hangs forever.
Thanks in advance.
The text was updated successfully, but these errors were encountered: