Re: ZFS rollback snapshot general question
"Bobb Shires" <[email protected]> Fri, 26 Jun 2026 10:14:17 -0400
| Newsgroups | gmane.os.freebsd.questions |
|---|---|
| Message-ID | <[email protected]> |
Hi Kevin... Yes, I knew I had done something incorrectly. Thanks for the reminder. On Thu, Jun 25, 2026, at 21:11, Kevin P. Neal wrote: > On Mon, Jun 22, 2026 at 12:57:23PM -0400, Bobb Shires wrote: >> Recently upgraded my 14.4 installation to 15.1 and something went very wrong, so I decided to rollback the snapshot the installer script made for me (THANK YOU). >> >> When I hit enter on the rollback command the screen went completely blank, there was some brief disk activity, and the keyboard was unresponsive (like no caps lock response etc). >> >> I waited a few minutes and hit the power button, then powered back on and... it worked! Back to 14.4 >> >> My question is, I'm thinking that's not the expected behavior and I did something wrong? How and when should the ifs rollback command be invoked, and what should I expect to see? >> I was logged in as me (regular user) and did su then zfs rollback. Thanks! > > You did a zfs rollback of the current root filesystem on a running system? > I'm not surprised it went badly. I'm not sure the kernel expects filesystems > that programs are currently running out of to blow away programs with no > way to page any required pages back in, for example. > > Normally when a running program, or indeed any open file, is deleted the > inode remains valid until the program ends/the file is closed. (That's why > the system call is "unlink()" and not "delete()".) A ZFS rollback would > blow away the inode. If that case isn't explicitly supported then it will > probably blow up on you. > > After a rollback of the root filesystem (and /usr), what should the kernel > do about all the running programs including /sbin/init (which has a PID > of 1)? A rollback would result in probably all running programs being > killed, but that leaves no program left to do anything including ask what > shell to use for a single user mode command line. > > Really, the rollback should have been blocked and not allowed. > -- > Kevin P. Neal http://www.pobox.com/~kpn/ > "14. Re-reading No. 13, I realize that it's quite possible I'm losing my > mind. I'm glad that for the most part I'm not aware it's happening." > -- from "20 things I'm thankful for": Fortune, Nov 29, 2004, page 230