Will OpenSolaris 2008.05 instance survive reboot after update ?

New OpenSolaris 2008.05 utilize ZFS root and use ZFS clones for system updates with IPS net based repository, it's counts on ability of reboot OS instance into new environment.

This entry is part of 'OpenSolaris on Amazon EC2' Workshop

Will OpenSolaris 2008.05 OS survive reboot after update ? Yes !!!

Select OpenSolaris 2008.05 JeOS

ec2-describe-images | grep JeOS
IMAGE   ami-7bXXac12    sun-osol/2008.05_JeOS_32_1.0.img.manifest.xml   327216928991  available private  i386    machine

Start instance JeOS

c2-run-instances -k my-keypair ami-7b49ac12
RESERVATION     r-ad3ffbc4      327216928991    default
INSTANCE        i-09468860      ami-7bXXac12                    pending my-keypair   0
m1.small        2008-05-19T13:25:10+0000                        aki-7846a311    ari-7d46a314

Check if instance is already running

ec2-describe-instances i-09468860
RESERVATION     r-ad3ffbc4      327216928991    default
INSTANCE        i-09468860      ami-7bXXac12    ec2-67-202-62-253.compute-1.amazonaws.com       ip-10-251-121-157.ec2.internal 
running my-keypair   0               m1.small        2008-05-19T13:25:10+0000          aki-7846a311    ari-7d46a314

Connect to instance

ssh -i id_rsa-my-keypair root@ec2-67-202-62-253.compute-1.amazonaws.com

Update instance

 pkg refresh

 pkg image-update
 PHASE                                        ACTIONS
 Update Phase                                   16/16

A clone of opensolaris exists and has been updated and activated. On next boot the Boot Environment opensolaris-1 will be mounted on '/'.
Reboot when ready to switch to this updated BE.

 init 6; exit

 zfs list
NAME                                                        USED  AVAIL  REFER  MOUNTPOINT
rpool                                                       998M  7.64G  56.5K  /rpool
rpool/ROOT                                                  997M  7.64G    18K  /rpool/ROOT
rpool/ROOT/opensolaris                                      230K  7.64G   804M  legacy
rpool/ROOT/opensolaris-1                                    997M  7.64G   804M  legacy
rpool/ROOT/opensolaris-1@static:-:2008-05-19-13:40:15       166M      -   804M  -
rpool/ROOT/opensolaris-1/opt                               26.7M  7.64G  26.7M  /opt
rpool/ROOT/opensolaris-1/opt@static:-:2008-05-19-13:40:15      0      -  26.7M  -
rpool/ROOT/opensolaris/opt                                     0  7.64G  26.7M  /opt
rpool/export                                                 37K  7.64G    19K  /export
rpool/export/home                                            18K  7.64G    18K  /export/home
zpool                                                      16.0G   131G    18K  /zpool
zpool/mnt                                                    18K   131G    18K  /mnt

Re-login to rebooted instance

ssh -i id_rsa-my-keypair root@ec2-67-202-62-253.compute-1.amazonaws.com

Nice, it's working, here is updated rebooted environment:

zfs list
NAME                                                        USED  AVAIL  REFER  MOUNTPOINT
rpool                                                      1.14G  7.47G  56.5K  /rpool
rpool/ROOT                                                 1.14G  7.47G    18K  /rpool/ROOT
rpool/ROOT/opensolaris                                      174M  7.47G   804M  legacy
rpool/ROOT/opensolaris-1                                    997M  7.47G   804M  legacy
rpool/ROOT/opensolaris-1@static:-:2008-05-19-13:40:15       166M      -   804M  -
rpool/ROOT/opensolaris-1/opt                               26.7M  7.47G  26.7M  /opt
rpool/ROOT/opensolaris-1/opt@static:-:2008-05-19-13:40:15      0      -  26.7M  -
rpool/ROOT/opensolaris/opt                                 42.5K  7.47G  26.7M  /opt
rpool/export                                                 37K  7.47G    19K  /export
rpool/export/home                                            18K  7.47G    18K  /export/home
zpool                                                      16.0G   131G    18K  /zpool
zpool/mnt                                                    18K   131G    18K  /mnt

Uptime was more then 14000 days, this is due date start from 1.1.1970 issues :-)

Will OpenSolaris 2008.05 data disks survive reboot after update ? No ?! Fixed !!!

However data on pool zpool which was located on ephemeral store was lost on reboot, new pool zpool was created !?!

Uaaaa !!!, pool zpool was not automatically activated after reboot because we lost new zfs cache file by booting old ramdisk image !!!

Need to add forcing of pool zpool import to ec2ifyme_mount script before attempt to create it as following:

/usr/sbin/zpool import zpool

Hmm, also boot archive is always rebuild on shutdown because we change zfs cache file ?!

updating /platform/i86pc/boot_archive
updating /platform/i86pc/amd64/boot_archive

Lesson Learned: I need to use static ramdisk image in development, not booting xVM VM with pyGRUB !!!

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Hands-on experience with Virtualization

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today