devfsadm and bootadm taking long time for configs with large number of zvols
There are several problems here:
1. when running 'bootadm update-archive' I see that lots of time is spent in newfs. The problem here is that this call is using libdiskmgt to verify that the lofi device is not being used by anybody. Since the lofi device was just created the use of libdiskmgmt here is unnecessary.
2. devzvol_readdir() traverses every snapshot.
I looked at removing the snapshots from /dev/zvol by making a change in the zvol code. This does improve things but doesn't it solve it completely. In my investigation I still saw that mkfs would still try to lstat() every zvol snapshot even though the device node did not exist.
Digging further I think the real solution is to change the dev subsystem to prevent both pseudo and the /dev/zvol links from being created.
This change adds a tunable which disables creation of /dev/zvol links for snapshots. By default, the behavior is not changed, but if you don't need to access zvol snapshots through /dev/zvol, you can disable them for a nice performance improvement.
Updated by Electric Monk about 6 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
commit 470bc2d6d44a4a70ed9403c0bce321333e897c31 Author: George Wilson <email@example.com> Date: 2016-07-14T19:11:34.000Z 6327 devfsadm and bootadm taking long time for configs with large number of zvols Reviewed by: Matthew Ahrens <firstname.lastname@example.org> Reviewed by: Sebastien Roy <email@example.com> Reviewed by: Eric Schrock <firstname.lastname@example.org> Reviewed by: Igor Kozhukhov <email@example.com> Reviewed by: Richard Elling <Richard.Elling@RichardElling.com> Reviewed by: Dan McDonald <firstname.lastname@example.org> Approved by: Robert Mustacchi <email@example.com>