Skip to content
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

zfs initializes slowly on hardware, fast on VM #8928

Closed
twork opened this issue Jun 18, 2019 · 4 comments
Closed

zfs initializes slowly on hardware, fast on VM #8928

twork opened this issue Jun 18, 2019 · 4 comments
Labels
Status: Stale No recent activity for issue

Comments

@twork
Copy link

twork commented Jun 18, 2019

System information

Type Version/Name
Distribution Name: Ubuntu
Distribution Version: 19.04
Linux Kernel: #17-Ubuntu SMP Wed May 15 10:52:21 UTC 2019
Architecture: x86_64
ZFS Version: 0.7.12-1ubuntu5
SPL Version: 0.7.12-1ubuntu3

Describe the problem you're observing

I've built two fresh installs with zfs on the base filesystem. On the VM, it runs fine. But on the hardware instance, while it runs normally after it's through booting, the filesystems initialize so slowly I thought the OS had hung.

Describe how to reproduce the problem

I'm following the "ZFS on Ubuntu" guide, at:

https://github.com/zfsonlinux/zfs/wiki/Ubuntu-18.04-Root-on-ZFS

The only thing unusual that I find is (on both) the system is run on three disks instead of just one, so instead of:

zpool create -f -o ashift=12 [...settings copied from the HOWTO...] -R /mnt bpool [disk]

...I have, on both VM and hardware:

zpool create -f -o ashift=12 [...settings copied from the HOWTWO...] -R /mnt bpool raidz [three disks]

Since I'm using Ubuntu 19.04, there are a few differences, mostly minor; overall it seems to go just fine. My test instance, a VM on VirtualBox, has run with no issues.

Trouble appears on hardware, an old-ish PC. Initial setup runs fine, no problems appearing. But when I boot the host after installing it, it runs fine until we reach the initial mount of the boot filesystem, and then again when the root tries to mount. Those each pause for several minutes, so long that at first I'd thought that the OS had hung when it initializes.

I've been looking for other instances of this problem and haven't been able to find any. Maybe I'm just not putting the right words into Google, so hints are welcome.

The closest I've been able to come is a case where someone was having trouble that was similar and on the same Ubuntu release as me, though the pauses were not as extreme -- maybe 20-30 seconds rather than several minutes. There, it was fixed by replacing 'zfs-initramfs' with 'zfs-dracut', so I tried it here, but that made no difference in this case. VM is still fine, hardware still pauses for several minutes at two stages of the boot process.

Include any warning/errors/backtraces from the system logs

@qt-br
Copy link

qt-br commented Jun 19, 2019

Might be related to the fact that VirtualBox by default doesn't flush data immediately to disk, see:
https://www.virtualbox.org/ticket/7143

"If desired, the virtual disk images can be flushed when the guest issues the IDE FLUSH CACHE command. Normally these requests are ignored for improved performance."
https://www.virtualbox.org/manual/ch12.html#idm10187

@twork
Copy link
Author

twork commented Jun 19, 2019 via email

@twork
Copy link
Author

twork commented Jun 20, 2019

kpande said:

can you provide output from rd.debug cmdline option with zfs-dracut?

On the (hardware) system I've been restarting from scratch. I'm up to the point where I'd answer this question, and now I realize I don't follow it. Where would I find the answer to this?

Maybe relevant: in the HOWTO that I'm working from (referenced above), one step is to run:

update-initramfs -u -k all

...after grub-probe and before update-grub. And, that command doesn't exist since I rebuilt the machine with dracut/zfs-dracut instead of initramfs. I haven't looked yet but I'm guessing that I should be running a different command to replace that. Hints welcome; I'll go looking.

@stale
Copy link

stale bot commented Aug 24, 2020

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.

@stale stale bot added the Status: Stale No recent activity for issue label Aug 24, 2020
@stale stale bot closed this as completed Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale No recent activity for issue
Projects
None yet
Development

No branches or pull requests

3 participants
@twork @qt-br and others