Folks, I''ve been seeing this for a while, but never had the urge to ask, until now. When I take a snapshot of my current root-FS and tell the system to reboot off that snapshot, I''m faced with an assertion failure (running DEBUG bits) that looks like this: root at codemonkey:~# df -h / Filesystem Size Used Avail Use% Mounted on rpool/ROOT/bfu 129G 8.2G 121G 7% / root at codemonkey:~# zfs snapshot rpool/ROOT/bfu at ro root at codemonkey:~# reboot rpool/ROOT/bfu at ro Dec 8 20:41:17 codemonkey reboot: initiated by root on /dev/console panic[cpu0]/thread=ffffff01e1023040: assertion failed: vfsp->vfs_count != 0, file: ../../common/fs/vfs.c, line: 4374 ffffff0007fb1c90 genunix:assfail+7e () ffffff0007fb1cc0 genunix:vfs_rele+86 () ffffff0007fb1ce0 zfs:zfs_freevfs+2a () ffffff0007fb1d00 genunix:fsop_freefs+1a () ffffff0007fb1d30 genunix:vfs_rele+3b () ffffff0007fb1d60 genunix:vfs_remove+65 () ffffff0007fb1db0 genunix:dounmount+a3 () ffffff0007fb1de0 genunix:vfs_unmountall+92 () ffffff0007fb1e50 genunix:kadmin+549 () ffffff0007fb1eb0 genunix:uadmin+10f () ffffff0007fb1f00 unix:brand_sys_syscall32+295 () syncing file systems... done dumping to /dev/zvol/dsk/rpool/dump, offset 65536, content: kernel 0:14 100% done 100% done: 256267 pages dumped, dump succeeded rebooting... I''ve tried to reason why this happens, but fail to come up with a plausible answer. Has anyone else seen this? Anyone knows what''s amiss? I''m hesitant to file a bug without a pointer to a possible cause. This only happens when I try to reboot off a snapshot. If I first create a clone of the snapshot and reboot off that, the system is perfectly happy... TIA, Joep
There are two calls to vfs_rele in the stack trace, may be explaining why the assertion failed. Regards, Andrey On Tue, Dec 8, 2009 at 10:48 PM, Joep Vesseur <Joep.Vesseur at sun.com> wrote:> Folks, > > I''ve been seeing this for a while, but never had the urge to ask, until now. > When I take a snapshot of my current root-FS and tell the system to reboot off > that snapshot, I''m faced with an assertion failure (running DEBUG bits) that > looks like this: > > root at codemonkey:~# df -h / > Filesystem ? ? ? ? ? ?Size ?Used Avail Use% Mounted on > rpool/ROOT/bfu ? ? ? ?129G ?8.2G ?121G ? 7% / > root at codemonkey:~# zfs snapshot rpool/ROOT/bfu at ro > root at codemonkey:~# reboot rpool/ROOT/bfu at ro > Dec ?8 20:41:17 codemonkey reboot: initiated by root on /dev/console > > panic[cpu0]/thread=ffffff01e1023040: assertion failed: vfsp->vfs_count != 0, > file: ../../common/fs/vfs.c, line: 4374 > > ffffff0007fb1c90 genunix:assfail+7e () > ffffff0007fb1cc0 genunix:vfs_rele+86 () > ffffff0007fb1ce0 zfs:zfs_freevfs+2a () > ffffff0007fb1d00 genunix:fsop_freefs+1a () > ffffff0007fb1d30 genunix:vfs_rele+3b () > ffffff0007fb1d60 genunix:vfs_remove+65 () > ffffff0007fb1db0 genunix:dounmount+a3 () > ffffff0007fb1de0 genunix:vfs_unmountall+92 () > ffffff0007fb1e50 genunix:kadmin+549 () > ffffff0007fb1eb0 genunix:uadmin+10f () > ffffff0007fb1f00 unix:brand_sys_syscall32+295 () > > syncing file systems... done > dumping to /dev/zvol/dsk/rpool/dump, offset 65536, content: kernel > ?0:14 100% done > 100% done: 256267 pages dumped, dump succeeded > rebooting... > > I''ve tried to reason why this happens, but fail to come up with a > plausible answer. Has anyone else seen this? Anyone knows what''s > amiss? I''m hesitant to file a bug without a pointer to a possible > cause. > > This only happens when I try to reboot off a snapshot. If I first create > a clone of the snapshot and reboot off that, the system is perfectly happy... > > TIA, > > Joep > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >
Hi Joep, Booting from a snapshot isn''t possibly because the snapshot is not writable and the boot operation writes to the BE. Booting from a clone is successful because the clone is writable. The second issue is whether the reboot command understands what a snapshot is. I see from the reboot man page that it supports -e environment but I haven''t tested this feature with a ZFS BE or clone. Thanks, Cindy On 12/08/09 12:48, Joep Vesseur wrote:> Folks, > > I''ve been seeing this for a while, but never had the urge to ask, until now. > When I take a snapshot of my current root-FS and tell the system to reboot off > that snapshot, I''m faced with an assertion failure (running DEBUG bits) that > looks like this: > > root at codemonkey:~# df -h / > Filesystem Size Used Avail Use% Mounted on > rpool/ROOT/bfu 129G 8.2G 121G 7% / > root at codemonkey:~# zfs snapshot rpool/ROOT/bfu at ro > root at codemonkey:~# reboot rpool/ROOT/bfu at ro > Dec 8 20:41:17 codemonkey reboot: initiated by root on /dev/console > > panic[cpu0]/thread=ffffff01e1023040: assertion failed: vfsp->vfs_count != 0, > file: ../../common/fs/vfs.c, line: 4374 > > ffffff0007fb1c90 genunix:assfail+7e () > ffffff0007fb1cc0 genunix:vfs_rele+86 () > ffffff0007fb1ce0 zfs:zfs_freevfs+2a () > ffffff0007fb1d00 genunix:fsop_freefs+1a () > ffffff0007fb1d30 genunix:vfs_rele+3b () > ffffff0007fb1d60 genunix:vfs_remove+65 () > ffffff0007fb1db0 genunix:dounmount+a3 () > ffffff0007fb1de0 genunix:vfs_unmountall+92 () > ffffff0007fb1e50 genunix:kadmin+549 () > ffffff0007fb1eb0 genunix:uadmin+10f () > ffffff0007fb1f00 unix:brand_sys_syscall32+295 () > > syncing file systems... done > dumping to /dev/zvol/dsk/rpool/dump, offset 65536, content: kernel > 0:14 100% done > 100% done: 256267 pages dumped, dump succeeded > rebooting... > > I''ve tried to reason why this happens, but fail to come up with a > plausible answer. Has anyone else seen this? Anyone knows what''s > amiss? I''m hesitant to file a bug without a pointer to a possible > cause. > > This only happens when I try to reboot off a snapshot. If I first create > a clone of the snapshot and reboot off that, the system is perfectly happy... > > TIA, > > Joep > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
You may be interested in PSARC 2009/670: "Read-Only Boot from ZFS Snapshot". Here''s the description from: http://arc.opensolaris.org/caselog/PSARC/2009/670/20091208_joep.vesseur> Allow for booting from a ZFS snapshot. The boot image will be read-only. > Early in boot a clone of the root is created and used to provide writable storage for the system image during its lifetime. > Upon reboot, the system image will reset to the same previous state."This case is part of a larger "validated execution" effort. For more info: http://www.c0t0d0s0.org/archives/6188-Upcoming-Security-PSARC-cases.html -- This message posted from opensolaris.org