rageek

A place for Unix Thoughts and Ideas

Live Upgrade BE Creation time

When working with Live Upgrade on ZFS, you can accumulate a lot of boot environments over time.

Here is a little trick for showing the creation time of your different boot environments

for i in `lustatus | egrep ‘yes|no’ | awk ‘{print $1}’ `; do lufslist $i | egrep ‘ / ‘ | awk ‘{print $1}’ | xargs -I {} zfs get creation {}; done | egrep -v ‘NAME *PROPERTY’ | sed -e ‘s/creation//’

root@testserver-03 # for i in `lustatus | egrep ‘yes|no’ | awk ‘{print $1}’ `; do lufslist $i | egrep ‘ / ‘ | awk ‘{print $1}’ | xargs -I {} zfs get creation {}; done | egrep -v ‘NAME *PROPERTY’ | sed -e ‘s/creation//’
rpool/ROOT/solaris10_1 Mon Jan 24 15:22 2011 –
rpool/ROOT/sol10_upgrade Tue Jan 25 9:35 2011 –
rpool/ROOT/before_sc33 Tue Jan 25 10:59 2011 –
rpool/ROOT/test Wed Feb 2 14:11 2011 –

You can get similar information on Solaris 11 with beadm

admin@sol11test:~# beadm list -d
BE/Dataset Active Mountpoint Space Policy Created
———- —— ———- —– —— ——-
baseInstall
rpool/ROOT/baseInstall – – 98.0K static 2010-12-10 11:39
solaris
rpool/ROOT/solaris NR / 2.13G static 2010-12-10 11:09
test
rpool/ROOT/test – – 55.0K static 2011-02-02 14:17

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: