Project

General

Profile

Bug #8503

Avatar?id=14398&size=22x22

beadm + grub is slow

Added by Sean Fagan over 5 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Nice to have
Assignee:
Kris Moore
Category:
Middleware
Seen in:
Severity:
New
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
Yes
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

Near as I can tell, when you do anything with a boot environment, beadm goes through, mounts each BE, and then does its thing.

This is a very annoying thing to do when you have 20+ BEs, and you are booted off a thumb drive. (Which even with USB3 is still slow.)

Can this be improved?

History

#1 Avatar?id=14398&size=24x24 Updated by Kris Moore over 5 years ago

  • Status changed from Unscreened to Screened

Yea, anytime you update beadm, it will need to re-gen GRUB config files for all the BE's. There are two ways to solve this:

1. Disable updating GRUB automatically from beadm in /usr/local/etc/beadm.conf (set GRUB=NO). Then after you do all your beadm commands, run "grub-mkconfig -o /boot/grub/grub.cfg" manually.

2. I could add an environment variable to skip updating GRUB, so you could set it before doing a lot of beadm options, then unset it before running the last command.

Either one of those ways would work. Additionally I'll take a look into the grub scripts themselves, see if anything can be sped up there. I think the mounting / umounting of datasets is probably taking the longest.

#2 Avatar?id=14398&size=24x24 Updated by Kris Moore over 5 years ago

  • Status changed from Screened to Resolved

Ok, these two changes should speed up grub re-stamping.

This one has been sent to Xin, which disables the probing of other disks for dual-boot

https://github.com/pcbsd/freebsd-ports/commit/dea08a2966006cdcee12fa5f69f707b97a3d2d82

This one went in yesterday, it removes the mount / copy of grub.cfg / modules to each BE in the boot-pool (saving lots of time here). You'll want to remove that from your relevant restamp-grub script also. This step isn't necessary anymore.

https://github.com/pcbsd/pcbsd/commit/7dbe3dfb48321bb7a84e9e398373e3619ced31de

#3 Updated by Sean Fagan over 5 years ago

We only have the one boot, so we don't copy grub.cfg to each BE as it is.

Our big problem is that thumb drives are slow.

#4 Updated by Dru Lavigne almost 3 years ago

  • Target version set to Master - FreeNAS Nightlies

Also available in: Atom PDF