Paul Wallace wrote:
> 
> 
> Evan Layton wrote:
>> Can you provide the output from
>> zfs list
>> zfs list -o name,mountpoint,mounted
> I also include 'beadm list' which shows that "opensolaris-2"
> is the active BE. "opensolaris-3" was the new one created during
> image-update but it was destroyed following failed update.
> 
> Looks like "opensolaris2" lives in a strange place "/tmp/mnt3509"
> which I guess was created when I performed the interim
> update to b101b a while ago (which has since been very stable)

I'm not sure what may have mounted it at /tmp/mnt3509 but normally the
temporary mountpoint will be something more like "/tmp/.be.LQaGAd".

> 
> I am guessing that this causes "opensolaris-3" to be mounted in the
> wrong place which then fails at the image-update step - hence suggestion
> that I try to build a new BE manually in a sensible place.
> (although it looks like it tried to mount in "/tmp/.be.LQaGAd"
> which seems sensible enough
>

The problem is since /opt in the currently active BE is not empty
it won't be empty in the new BE since it's a clone. Because it's
not empty the rpool/ROOT/opensolaris-3/opt can't be mounted there
since it's relative to the mountpoint of the root dataset
(rpool/ROOT/opensolaris-3 mounted at /tmp/.be.LQaGAd)

> 
> # beadm list
> BE            Active Mountpoint Space  Policy Created         
> --            ------ ---------- -----  ------ -------         
> opensolaris   -      -          10.23M static 2008-06-03 12:44
> opensolaris-1 -      -          87.43M static 2008-06-25 17:42
> opensolaris-2 NR     /          12.15G static 2008-12-08 13:41
> 
> # zfs list
> NAME                           USED  AVAIL  REFER  MOUNTPOINT
> rpool                         24.1G  32.5G    62K  /rpool
> rpool/ROOT                    9.98G  32.5G    18K  /rpool/ROOT
> rpool/ROOT/opensolaris        9.71M  32.5G  2.46G  legacy
> rpool/ROOT/opensolaris-1      86.9M  32.5G  2.81G  legacy
> rpool/ROOT/opensolaris-1/opt   515K  32.5G   516M  /opt
> rpool/ROOT/opensolaris-2      9.89G  32.5G  5.77G  /tmp/mnt3509
> rpool/ROOT/opensolaris-2/opt   932M  32.5G   484M  /tmp/mnt3509/opt

Ok it is what I was referring to and 1156 is the cause. You can see
that the mountpoints for the currently active BE are not correct and
you can see below that rpool/ROOT/opensolaris-2/opt is not mounted at
all.

> rpool/ROOT/opensolaris/opt     531K  32.5G   516M  /opt
> rpool/export                  14.1G  32.5G    19K  /export
> rpool/export/home             14.1G  32.5G  14.1G  /export/home
> 
> # zfs list -o name,mountpoint,mounted
> NAME                          MOUNTPOINT        MOUNTED
> rpool                         /rpool                yes
> rpool/ROOT                    /rpool/ROOT           yes
> rpool/ROOT/opensolaris        legacy                 no
> rpool/ROOT/opensolaris-1      legacy                 no
> rpool/ROOT/opensolaris-1/opt  /opt                   no
> rpool/ROOT/opensolaris-2      /tmp/mnt3509          yes
> rpool/ROOT/opensolaris-2/opt  /tmp/mnt3509/opt       no
> rpool/ROOT/opensolaris/opt    /opt                   no
> rpool/export                  /export               yes
> rpool/export/home             /export/home          yes
> root at paw-opensolaris-2008.05:~#
> 
>> Also if the dataset rpool/ROOT/opensolaris-3/opt is not currently
>> mounted is there any data in /opt of your currenty booted BE
>> (opensolaris-3).
> BE "opensolaris-3" was created and then destroyed during the failed update.
> It's not clear why a new BE created by image-update would not be created
> correctly and would fail in this way. No obvious problems with disk space
> or anything like that.

This is because the new BE is a clone of the current BE and the
current BE is not correct due to it being left mounted over a reboot.
It is a documented requirement that a BE that has been mounted be
unmounted before rebooting or booting to that BE.

> 
>> http://defect.opensolaris.org/bz/show_bug.cgi?id=1156
> Don't think this helps, it doesn't get as far as booting,
> the image-update step fails.

It already had booted the BE that has the problem. You're hitting
this because the currectly active BE is the one that has the issue.
At some point int eh past opensolaris-2 was mounted at /tmp/mnt3509
and never unmounted, leaving the mountpoint properties set to these
temporary mount points.

Thankfully this is less of an issue for installations going back
to 2008.11 since there is no separate /opt dataset. Due to this
these newer installations are much less likely to hit this issue.

To fix this we're going to have to play around with the datasets
a bit...

The following steps should resolve the issue:

# beadm activate opensolaris-1
# reboot

When booted to opensolaris-1 run:
# beadm umount opensolaris-2
# zfs set mountpoint=/a rpool/ROOT/opensolaris-2
# zfs mount rpool/ROOT/opensolaris-2
# zfs set mountpoint=/tmp/mnt rpool/ROOT/opensolaris-2/opt
# zfs mount rpool/ROOT/opensolaris-2/opt
# cp -R /a/opt/* /tmp/mnt
# zfs umount rpool/ROOT/opensolaris-2/opt
# zfs set mountpoint=/opt rpool/ROOT/opensolaris-2/opt
# mv /a/opt /a/old-opt (so we can still get back to this if
                         we need to)
# zfs umount rpool/ROOT/opensolaris-2
# zfs set mountpoint=legacy rpool/ROOT/opensolaris-2
# zfs list (to check that the mount points are now correct)
# beadm activate opensolaris-2
# reboot

At this point you should be able to do the image-update.

-evan


Reply via email to