The root file system of a zone is not kept in the zonepath but in zonepath/ROOT/zbe - look for that filesystem to snapshot/rollback, not the zonepath filesystem itself (which is just an empty container). Your snapshot listing below shows that.
-- Saso On 03/08/2013 11:58 PM, dormitionsk...@hotmail.com wrote: > I decided to try out the zfs rollback feature today. I halted my tomcat > zone, and took a zfs snapshot of it like this: > > > myad...@baptist.ds:~# zoneadm -z tomcat halt > myad...@baptist.ds:~# zoneadm list -cv > ID NAME STATUS PATH BRAND IP > > 0 global running / ipkg > shared > 1 routerb2 running /zones/routerb2 ipkg excl > > 4 webphp4 running /zones/webphp4 ipkg excl > > 6 mysql running /zones/mysql ipkg excl > > 12 dovecot2 running /zones/dovecot2 ipkg excl > > 13 mail running /zones/mail ipkg excl > > 14 stamps running /zones/stamps ipkg excl > > - zone1 installed /zones/zone1 ipkg excl > > - tomcat installed /zones/tomcat ipkg excl > > - dovecot installed /zones/dovecot ipkg excl > > - zone2 installed /zones/zone2 ipkg excl > > myad...@baptist.ds:~# zfs snapshot rpool/zones/tomcat@2013-0308-1553 > myad...@baptist.ds:~# zoneadm -z tomcat boot > > > Then I logged into the zone with "zlogin -C tomcat". I did some work which > created a bunch of files in /usr and /var. I didn't like how it worked out, > so I logged out of the zone, exited the console, and then halted the zone. > > I did a zfs rollback to the snapshot I had just taken previously. > > > myad...@baptist.ds:~# zoneadm -z tomcat halt > myad...@baptist.ds:~# zfs rollback rpool/zones/tomcat@2013-0308-1553 > cannot rollback to 'rpool/zones/tomcat@2013-0308-1553': more recent snapshots > exist > use '-r' to force deletion of the following snapshots: > rpool/zones/tomcat@zfs-auto-snap_frequent-2013-03-08-16h01 > myad...@baptist.ds:~# zfs rollback -r rpool/zones/tomcat@2013-0308-1553 > myad...@baptist.ds:~# zoneadm -z tomcat boot > myad...@baptist.ds:~# > > > I booted the zone, and logged back into it. All of those files I had > created, that I didn't like, were still there. > > The zfs-auto-snap_frequent that I thought was supposed to be deleted still > remains, too. > > > myad...@baptist.ds:~# zfs list -t snapshot | grep tomcat > rpool/zones/tomcat@zfs-auto-snap_hourly-2013-02-20-21h45 > 19K - 32K - > rpool/zones/tomcat@zfs-auto-snap_weekly-2013-02-27-13h45 > 18K - 33K - > rpool/zones/tomcat@zfs-auto-snap_weekly-2013-03-06-13h45 > 18K - 33K - > rpool/zones/tomcat@zfs-auto-snap_daily-2013-03-08-13h46 > 0 - 33K - > rpool/zones/tomcat@zfs-auto-snap_hourly-2013-03-08-15h46 > 0 - 33K - > rpool/zones/tomcat@2013-0308-1553 > 0 - 33K - > rpool/zones/tomcat@zfs-auto-snap_frequent-2013-03-08-16h31 > 0 - 33K - > rpool/zones/tomcat/ROOT@zfs-auto-snap_weekly-2013-03-06-13h45 > 0 - 31K - > rpool/zones/tomcat/ROOT@zfs-auto-snap_daily-2013-03-08-13h46 > 0 - 31K - > rpool/zones/tomcat/ROOT@zfs-auto-snap_hourly-2013-03-08-15h46 > 0 - 31K - > rpool/zones/tomcat/ROOT@zfs-auto-snap_frequent-2013-03-08-16h31 > 0 - 31K - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-02-20-18h45 > 328K - 317M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-02-20-20h45 > 208K - 317M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-02-20-21h45 > 271K - 317M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-02-20-22h45 > 207K - 358M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-02-21-02h45 > 33K - 358M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_weekly-2013-02-27-13h45 > 62K - 358M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-02-28-02h45 > 26K - 358M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_daily-2013-03-02-13h45 > 27K - 358M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_daily-2013-03-03-13h45 > 27K - 358M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-03-03-20h45 > 2.56M - 359M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-03-04-02h46 > 76K - 362M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_daily-2013-03-04-13h45 > 42K - 362M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-03-05-02h45 > 69K - 362M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-03-05-10h45 > 91K - 362M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-03-05-12h45 > 55K - 362M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_daily-2013-03-05-13h45 > 18K - 362M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_weekly-2013-03-06-13h45 > 25.5K - 362M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-03-07-02h48 > 25.5K - 362M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_daily-2013-03-07-13h46 > 25.5K - 362M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-03-08-12h46 > 24K - 362M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_daily-2013-03-08-13h46 > 48.2M - 413M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_hourly-2013-03-08-15h46 > 2.64M - 569M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_frequent-2013-03-08-16h01 > 28.0M - 594M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_frequent-2013-03-08-16h16 > 10.2M - 579M - > rpool/zones/tomcat/ROOT/zbe@zfs-auto-snap_frequent-2013-03-08-16h31 > 532K - 596M - > myad...@baptist.ds:~# > > > So, what did I do wrong? > > I thought those files should have been gone, and the zone should have been > set back to the way it was at the snapshot I took... > > > > > _______________________________________________ > OpenIndiana-discuss mailing list > OpenIndiana-discuss@openindiana.org > http://openindiana.org/mailman/listinfo/openindiana-discuss > _______________________________________________ OpenIndiana-discuss mailing list OpenIndiana-discuss@openindiana.org http://openindiana.org/mailman/listinfo/openindiana-discuss