[OpenIndiana-discuss] ZFS Rollback Question

Timothy Coalson tsc5yc at mst.edu
Sat Mar 9 00:02:22 UTC 2013


Two thoughts:

1) you didn't use the -r or -R flags to zfs rollback

2) are /usr or /var on a different filesystem?  Probably not, but good to
check.

Tim

On Fri, Mar 8, 2013 at 5:58 PM, DormitionSkete at hotmail.com <
dormitionskete at 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:
>
>
> myadmin at baptist.ds:~# zoneadm -z tomcat halt
> myadmin at 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
> myadmin at baptist.ds:~# zfs snapshot rpool/zones/tomcat at 2013-0308-1553
> myadmin at 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.
>
>
> myadmin at baptist.ds:~# zoneadm -z tomcat halt
> myadmin at baptist.ds:~# zfs rollback rpool/zones/tomcat at 2013-0308-1553
> cannot rollback to 'rpool/zones/tomcat at 2013-0308-1553': more recent
> snapshots exist
> use '-r' to force deletion of the following snapshots:
> rpool/zones/tomcat at zfs-auto-snap_frequent-2013-03-08-16h01
> myadmin at baptist.ds:~# zfs rollback -r rpool/zones/tomcat at 2013-0308-1553
> myadmin at baptist.ds:~# zoneadm -z tomcat boot
> myadmin at 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.
>
>
> myadmin at baptist.ds:~# zfs list -t snapshot | grep tomcat
> rpool/zones/tomcat at zfs-auto-snap_hourly-2013-02-20-21h45
>           19K      -    32K  -
> rpool/zones/tomcat at zfs-auto-snap_weekly-2013-02-27-13h45
>           18K      -    33K  -
> rpool/zones/tomcat at zfs-auto-snap_weekly-2013-03-06-13h45
>           18K      -    33K  -
> rpool/zones/tomcat at zfs-auto-snap_daily-2013-03-08-13h46
>            0      -    33K  -
> rpool/zones/tomcat at zfs-auto-snap_hourly-2013-03-08-15h46
>             0      -    33K  -
> rpool/zones/tomcat at 2013-0308-1553
>            0      -    33K  -
> rpool/zones/tomcat at zfs-auto-snap_frequent-2013-03-08-16h31
>             0      -    33K  -
> rpool/zones/tomcat/ROOT at zfs-auto-snap_weekly-2013-03-06-13h45
>            0      -    31K  -
> rpool/zones/tomcat/ROOT at zfs-auto-snap_daily-2013-03-08-13h46
>             0      -    31K  -
> rpool/zones/tomcat/ROOT at zfs-auto-snap_hourly-2013-03-08-15h46
>            0      -    31K  -
> rpool/zones/tomcat/ROOT at zfs-auto-snap_frequent-2013-03-08-16h31
>            0      -    31K  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-02-20-18h45
>         328K      -   317M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-02-20-20h45
>         208K      -   317M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-02-20-21h45
>         271K      -   317M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-02-20-22h45
>         207K      -   358M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-02-21-02h45
>          33K      -   358M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_weekly-2013-02-27-13h45
>          62K      -   358M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-02-28-02h45
>          26K      -   358M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_daily-2013-03-02-13h45
>           27K      -   358M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_daily-2013-03-03-13h45
>           27K      -   358M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-03-03-20h45
>        2.56M      -   359M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-03-04-02h46
>          76K      -   362M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_daily-2013-03-04-13h45
>           42K      -   362M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-03-05-02h45
>          69K      -   362M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-03-05-10h45
>          91K      -   362M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-03-05-12h45
>          55K      -   362M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_daily-2013-03-05-13h45
>           18K      -   362M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_weekly-2013-03-06-13h45
>        25.5K      -   362M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-03-07-02h48
>        25.5K      -   362M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_daily-2013-03-07-13h46
>         25.5K      -   362M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-03-08-12h46
>          24K      -   362M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_daily-2013-03-08-13h46
>         48.2M      -   413M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_hourly-2013-03-08-15h46
>        2.64M      -   569M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_frequent-2013-03-08-16h01
>        28.0M      -   594M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_frequent-2013-03-08-16h16
>        10.2M      -   579M  -
> rpool/zones/tomcat/ROOT/zbe at zfs-auto-snap_frequent-2013-03-08-16h31
>         532K      -   596M  -
> myadmin at 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 at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
>


More information about the OpenIndiana-discuss mailing list