From: Victor on
I am trying to figure out an effective way to recover a host with
zones. The zone is whole-root zone in Sol10 05/09.

root(a)host1 # cat excludelist.txt
/tank
/patches
/zones/db1/root/tank/home (zfs)
/zones/db1/root/app (ufs)
/zones/db1/root/patches (lofs)

While zone db1 is running, I take a flash archive:

root(a)host1 # flarcreate -n host1 -X /var/tmp/excludelist.txt /var/tmp/
host1-zones-noapps.flar &

Jumpstart the host1, db1 does not boot automatically, and here is the
error.

root(a)host1 # zoneadm -z db1 boot
zoneadm: zone 'db1': could not stat /zones/db1/root/sbin/init: No such
file or directory

I checked the running zone, there is no /zones/db1/root/sbin/init.


So I step back to flash archive only OS, back up zone.

root(a)host1 # cat excludelist.txt
/tank
/patches
/zones

root(a)host1 # flarcreate -n host1 -X /var/tmp/excludelist.txt /var/tmp/
host1-zones-noapps.flar &

Halt the zone,
root(a)host1 # tar cf /var/tmp/zones-db1-halted.tar /zones/db1

Jumpstart the host, restore the zone and boot it. It works

If I let zone run while make a tar of the zone path, it throws out
some messages. But the zone boots after restoring the tar file.


What is your experience with DR strategy?


Victor
From: John D Groenveld on
In article <18f96b93-a090-4aad-9cf5-131f1ecc7d19(a)c34g2000yqn.googlegroups.com>,
Zfs.. <cian.scripter(a)gmail.com> wrote:
>90% of our zones are on zfs datasets, to restore or move a zone I use
>zfs send/recv

On Indiana backup is something like this:
foobar# zlogin foo init 5
foobar# zoneadm -z foo detach
foobar# zfs snapshot -r tank/var/zones/foo(a)backup
foobar# zoneadm -z foo attach
foobar# zoneadm -z foo boot
foobar# zfs send -R tank/var/zones/foo(a)backup | 7z a -si -bd /mnt/foo.snap.7z

Recovery is something like:
snafu# 7z x -bd -so /mnt/foo.snap.7z | zfs receive -u -d tank
snafu# zfs set mountpoint=/var/opt/zones/foo tank/var/zones/foo
snafu# zfs mount tank/var/zones/foo
snafu# mount -F zfs tank/var/zones/foo/ROOT/zbe /var/opt/zones/foo/root
snafu# zonecfg -z foo create -a /var/opt/zones/foo
snafu# zoneadm -z foo attach
snafu# zoneadm -z foo boot

John
groenveld(a)acm.org
From: Richard B. Gilbert on
John D Groenveld wrote:
> In article <18f96b93-a090-4aad-9cf5-131f1ecc7d19(a)c34g2000yqn.googlegroups.com>,
> Zfs.. <cian.scripter(a)gmail.com> wrote:
>> 90% of our zones are on zfs datasets, to restore or move a zone I use
>> zfs send/recv
>
> On Indiana backup is something like this:
> foobar# zlogin foo init 5
> foobar# zoneadm -z foo detach
> foobar# zfs snapshot -r tank/var/zones/foo(a)backup
> foobar# zoneadm -z foo attach
> foobar# zoneadm -z foo boot
> foobar# zfs send -R tank/var/zones/foo(a)backup | 7z a -si -bd /mnt/foo.snap.7z
>
> Recovery is something like:
> snafu# 7z x -bd -so /mnt/foo.snap.7z | zfs receive -u -d tank
> snafu# zfs set mountpoint=/var/opt/zones/foo tank/var/zones/foo
> snafu# zfs mount tank/var/zones/foo
> snafu# mount -F zfs tank/var/zones/foo/ROOT/zbe /var/opt/zones/foo/root
> snafu# zonecfg -z foo create -a /var/opt/zones/foo
> snafu# zoneadm -z foo attach
> snafu# zoneadm -z foo boot
>
> John
> groenveld(a)acm.org

"7z"?????

I think that's the first ever Solaris command with a leading numeric
character!
From: Zfs.. on
On Dec 22, 4:24 pm, Victor <victorfeng1...(a)yahoo.com> wrote:
> I am trying to figure out an effective way to recover a host with
> zones. The zone is whole-root zone in Sol10 05/09.
>
> root(a)host1 # cat excludelist.txt
> /tank
> /patches
> /zones/db1/root/tank/home (zfs)
> /zones/db1/root/app       (ufs)
> /zones/db1/root/patches   (lofs)
>
> While zone db1 is running, I take a flash archive:
>
> root(a)host1 # flarcreate -n host1 -X /var/tmp/excludelist.txt /var/tmp/
> host1-zones-noapps.flar &
>
> Jumpstart the host1, db1 does not boot automatically, and here is the
> error.
>
> root(a)host1 # zoneadm -z db1 boot
> zoneadm: zone 'db1': could not stat /zones/db1/root/sbin/init: No such
> file or directory
>
> I checked the running zone, there is no /zones/db1/root/sbin/init.
>
> So I step back to flash archive only OS, back up zone.
>
> root(a)host1 # cat excludelist.txt
> /tank
> /patches
> /zones
>
> root(a)host1 # flarcreate -n host1 -X /var/tmp/excludelist.txt /var/tmp/
> host1-zones-noapps.flar &
>
> Halt the zone,
> root(a)host1 # tar cf /var/tmp/zones-db1-halted.tar /zones/db1
>
> Jumpstart the host, restore the zone and boot it. It works
>
> If I let zone run while make a tar of the zone path, it throws out
> some messages. But the zone boots after restoring the tar file.
>
> What is your experience with DR strategy?
>
> Victor

90% of our zones are on zfs datasets, to restore or move a zone I use
zfs send/recv

zonepool/zone1 /zones/zone1

zfs sanpshot zonepool/zone1(a)move

zfs send zonepool/zone1(a)move | ssh targethost zfs recv -F newzonepool/
zone1

zfs set mountpoint=/zones/zone1 newzonepool/zone1

Then copy over the /etc/zones/zones.xml file along with the correct
entry in the index file in /etc/zones and modify the IP address

Then I am able to boot this zone on the target server.
From: John D Groenveld on
In article <3c2dnQLl7egHqazWnZ2dnUVZ_o1i4p2d(a)giganews.com>,
Richard B. Gilbert <rgilbert88(a)comcast.net> wrote:
>"7z"?????

Patch-ID# 137322-01
6657692 move p7zip file to SUNWbzip package in S10_U5

John
groenveld(a)acm.org