Tuesday, 7 May 2013

Solaris - ludelete and zones

An update on patching zones (which is why the information came to light).

I have noticed that when you create a BE on a server running local zones and then patch it an additional zone directory is created. But when I delete the old BE the old zone directory didn't go with it...... If it creates the folder when I lucreate why doesn't it delete when I use ludelete? Maybe it was just naive of me to expect it to be removed.......

For example if I wanted to patch a server running a zone called ZONE1, first of all I would create a new BE and call it for arguments sake newBE. Once the BE creation had completed my zone folder location would look something like this:

/export/ZONE1 (running BE)
/export/ZONE1-newBE (BE to be patched)

Then I would run the unzipped CPU against the newBE.

When all the patching has occurred, the newBE has been activated and a reboot has occurred ZONE1 is now running from /export/ZONE1-newBE.

 At some point in the near future I would do some tidying up and remove the old BE by running ludelete and then check the number of BEs by running lustatus.

But when I check the /export directory it shows both folders still being there.

Luckily you can remove the old directories with no issues, but to be safe check first what directory the zone is running from by typing:

zoneadm list -iv

Now to amend the Work Instruction so others at work know what needs to be done.......

FYI - Oracle say this is normal behavior, but I don't  recall reading anything about it (but it doesn't mean there isn't - I just haven't seen it!).