Force unmount of a SWAP filesystem left over from bad Live Upgrade


 
Thread Tools Search this Thread
Operating Systems Solaris Force unmount of a SWAP filesystem left over from bad Live Upgrade
# 1  
Old 10-25-2017
Question Force unmount of a SWAP filesystem left over from bad Live Upgrade

Hello,

Long story short, we built an alternate boot env. back in July and applied the latest CPU to about 15 servers. Of the 15 servers, 7 servers failed to start the zones after the luactivate / reboot. The zones failed to rename from <zone>-<boot_env> back to <zone>. This is fixed in patch 121430-95.

Anyway, we got that mess fixed up (or so we thought) but now I'm trying to apply the Oct CPU and running into an issue. I can build a new boot env. I can even apply-prereq but I cannot patch the BE.

It appears there is zone/lu mount that is causing me this problem.

Code:
# ./installpatchset -B Oct2017CPU --s10patchset
ERROR: Failed to determine zone configuration for target boot environment.

       Please ensure all LU boot environments are unmounted, and altroots other
       than the target altroot are unmounted prior to executing this script.

# df -h | grep -i swap | grep lu
swap                   309G     0K   309G     0%    /zoneroot/spahwfm1/lu

# umount /zoneroot/spahwfm1/lu
umount: /zoneroot/spahwfm1/lu busy

# fuser -cu /zoneroot/spahwfm1/lu
/zoneroot/spahwfm1/lu:

# umount -f /zoneroot/spahwfm1/lu
umount: Operation not supported
umount: cannot unmount /zoneroot/spahwfm1/lu

We rebooted one of the servers and the lu mount did not come back and than we can complete the installcluster / installpatchset.

Is there any way for me to force an unmount of this zone lu SWAP?

I don't think I'll be able to request that we reboot 6 production servers just to patch them and reboot them again.

HELP!

EDIT: Two things I want to mention, no, the /etc/zones/index does not list the global zone as configured instead of install (at global or in BE) and no I am not missing zone packages. I know this is related to the zone lu SWAP.

Last edited by mainegeek; 10-25-2017 at 08:40 PM..
# 2  
Old 10-26-2017
On Solaris 10 local zone swap space is inherited from the global zone. So the swap you are trying to manipulate should show up there.

This swap space is obviously still in use so you probably need to tell the system to stop using it (provided the system has enough swap space elsewhere to keep running).

Tell the OS to stop using this swap:
Code:
# /usr/sbin/swap -d <path to swap>

Reference:
Removing a Swap File From Use - System Administration Guide: Devices and File Systems

What O/S version is it exactly?
What filesystem type, UFS or ZFS?
This User Gave Thanks to hicksd8 For This Post:
# 3  
Old 10-26-2017
Thanks for the reply!

This is a Solaris 10 server with a ZFS root file system.

The swap is at the global zone. That is where I am seeing it. I checked the (single) zone running on the box and it doesn't appear to be using that swap volume.

This swap is not listed using the swap command

From the global zone:
Code:
# df -h | grep -i swap
swap                   308G   1.8M   308G     1%    /etc/svc/volatile
swap                   308G   1.1M   308G     1%    /tmp
swap                   308G   112K   308G     1%    /var/run
swap                   308G     0K   308G     0%    /zoneroot/spahwfm1/lu

# swap -l
swapfile             dev  swaplo blocks   free
/dev/zvol/dsk/rpool/swap 256,1      16 268435440 268435440

# swap -d /zoneroot/spahwfm1/lu
/zoneroot/spahwfm1/lu: Is a directory

From the zone:
Code:
# swap -l
swapfile             dev  swaplo blocks   free
/dev/swap           4294967295,4294967295     16 33554432 31264976

# df -h | grep -i swap
swap                    16G   1.1G    15G     7%    /etc/svc/volatile
swap                    16G   1.1G    15G     7%    /tmp
swap                    16G   1.1G    15G     7%    /var/run

# 4  
Old 10-26-2017
Hmmmmm...............

You posted,

Quote:
/zoneroot/spahwfm1/lu: Is a directory
Is it really? Can you check that out. If it is a directory, is there anything in it?
# 5  
Old 10-26-2017
Yes, it is an empty directory

Code:
[root@spahwfm1gz:/zoneroot/spahwfm1] # ls -lh
total 46
drwxr-xr-x  14 root     sys           55 Oct 25 18:30 dev
drwxr-xr-x   2 root     root         117 Aug 24 14:12 lu
drwxr-xr-x  50 root     root          59 Oct 26 09:18 root
[root@spahwfm1gz:/zoneroot/spahwfm1] # cd lu
[root@spahwfm1gz:/zoneroot/spahwfm1/lu] # ls -la
total 19
drwxr-xr-x   2 root     root         117 Aug 24 14:12 .
drwx------   5 root     root           5 May  5 20:30 ..
[root@spahwfm1gz:/zoneroot/spahwfm1/lu] # du -hs
   8K   .
[root@spahwfm1gz:/zoneroot/spahwfm1/lu] #

I also cannot remove it, was hoping to than be able to brute force an umount

Code:
[root@spahwfm1gz:/zoneroot/spahwfm1/lu] # cd ..
[root@spahwfm1gz:/zoneroot/spahwfm1] # rmdir lu
rmdir: directory "lu": Directory is a mount point or in use
[root@spahwfm1gz:/zoneroot/spahwfm1] # rm -Rf lu/
rm: Unable to remove directory lu/: Device busy

# 6  
Old 10-26-2017
From global zone can you try:

Code:
 
 # /usr/sbin/swap -d /zoneroot/spahwfm1/lu

using full path of swap command in case you've got another swap command in your path.

Just covering all options. Still thinking about this one.
# 7  
Old 10-26-2017
Thanks! No luck unfortunately

Code:
[root@spahwfm1gz:/] # /usr/sbin/swap -d /zoneroot/spahwfm1/lu
/zoneroot/spahwfm1/lu: Is a directory

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. AIX

Filesystem unable unmount

Hi all , I have issue oracle filesystem name /oracle/SID unable to unmount even though no any process are running mentioned fs .would appreciate anyone assist further high level .my system running aix 6.1 (7 Replies)
Discussion started by: Arulji
7 Replies

2. Solaris

Live upgrade first steps

Hello Guys, I am a little confused about the first step in the live upgrade process. I will be glad if someone can clarify this for me. The pre-live upgrade patch, when do you add this patch to the OS you want to upgrade? 1. before creating the new boot environment? or 2. after creating... (1 Reply)
Discussion started by: cjashu
1 Replies

3. Solaris

Live upgrade query

Hi All, Is it possible to use external san disk for creating alternate boot environment and boot from it.My root disk is about 70 gb and i want to use external san disk for 272gb to create alternate boot environment.If this is possible can you please redirect me some good documents, i had... (1 Reply)
Discussion started by: sahil_shine
1 Replies

4. Emergency UNIX and Linux Support

Live Upgrade Query

I am upgrading Solaris-9 Update-7 to Solaris-9 Update-9 through live upgrade. I am able to create another boot environment and have OS DVD inside server. But i am confused for, what command/path should I give for luupgrade. OS DVD is mounted on /mnt Boot environments are Solaris9old (Active now)... (2 Replies)
Discussion started by: solaris_1977
2 Replies

5. Solaris

Live Upgrade Issue

I tried a live upgrade for one my solaris 10u8 server which didnt go sucessfull and after that i now have following mounts in memory. df: cannot statvfs /.alt.sol10u8_2/var: No such file or directory df: cannot statvfs /.alt.sol10u8_2/var/run: No such file or directory df: cannot statvfs... (0 Replies)
Discussion started by: fugitive
0 Replies

6. Solaris

Live upgrade question

I want to basically update an ABE that someone created a few months back. I'm sure stuff has changed since it was made, and I was going to delete it and create a new one. But from what I'm looking at, the lumake appears like it would be a faster approach. I want to use live upgrade to... (0 Replies)
Discussion started by: BG_JrAdmin
0 Replies

7. Solaris

No Space Left - Memory/Swap issue

:wall:I'm having a bit of a problem with Solaris 10u8 and one of our applications requesting memory and being told, "no space left". The break down: 24GB Physical Memory 8GB swap at the time of occurance, here's what a memory breakdown looks like: Page Summary Pages ... (21 Replies)
Discussion started by: aychbee45
21 Replies

8. OS X (Apple)

Can't Mount Disk / Image after bad unmount

I have had a little issue with one of my disks, the usb cacble was pulled out and one of the external drives on it would no longer mount. I used First Aid and it verified and repaired both OK / nothing to do). After lots of messing around and not being able to mount I used Drive Genius 2 and that... (1 Reply)
Discussion started by: Cranie
1 Replies

9. Solaris

Live upgrade Issue

Hi, I upgraded solaris 10 x86 from update 3 to update 7 with zones installed n UFS file system . The global zone was updated but the non global zone still shows update 3 what could be the reason for this and how can i update the local zones to update 7 (0 Replies)
Discussion started by: fugitive
0 Replies
Login or Register to Ask a Question