EBUSY trying to mount unmounted /boot filesystem

Bug #122568 reported by Brian J. Murrell
14
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
Undecided
Unassigned
linux-source-2.6.22 (Ubuntu)
Won't Fix
Undecided
Kyle McMartin

Bug Description

Binary package hint: linux-source-2.6.22

Using 2.6.22-6.13 when I try to mount my /boot filesystem I get an EBUSY:

# mount /boot
mount: /dev/disk/by-uuid/12b8250a-d031-4ee1-b486-5e67478d06b4 already mounted or /boot busy

It's not mounted though:

# cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec 0 0
none /proc proc rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw 0 0
/dev/mapper/rootvol-edgy_root / ext3 rw,data=ordered 0 0
/dev/mapper/rootvol-edgy_root /dev/.static/dev ext3 rw,data=ordered 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
linux:/mnt/mp3 /mnt/mp3 nfs rw,vers=3,rsize=8192,wsize=8192,hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=linux 0 0
linux:/mnt/data/photos /data/photos nfs rw,vers=3,rsize=8192,wsize=8192,hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=linux 0 0
tmpfs /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw 0 0
usbfs /dev/bus/usb/.usbfs usbfs rw 0 0
udev /proc/bus/usb tmpfs rw 0 0
usbfs /proc/bus/usb/.usbfs usbfs rw 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
/dev/mapper/rootvol-edgy_usr /usr ext3 rw,data=ordered 0 0
/dev/mapper/rootvol-edgy_var /var ext3 rw,data=ordered 0 0
/dev/rootvol/home /home ext3 rw,data=ordered 0 0
/dev/rootvol/vms /vms ext3 rw,data=ordered 0 0
/dev/rootvol/XXX /XXX ext3 rw,data=ordered 0 0
/dev/rootvol/cooker_root /mnt/cooker ext3 ro,data=ordered 0 0
udev /mnt/cooker/dev tmpfs rw 0 0
none /mnt/cooker/proc proc rw,nosuid,nodev,noexec 0 0
/dev/rootvol/home /mnt/cooker/home ext3 rw,data=ordered 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
linux:/mnt/data /data nfs rw,vers=3,rsize=8192,wsize=8192,hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=linux 0 0
linux:/mnt/data/photos /data/photos nfs rw,vers=3,rsize=8192,wsize=8192,hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=linux 0 0
linux:/usr/local /usr/local nfs rw,vers=3,rsize=8192,wsize=8192,hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=linux 0 0
linux:/usr/src /usr/src nfs rw,vers=3,rsize=8192,wsize=8192,hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=linux 0 0
tmpfs /var/run tmpfs rw,nosuid,nodev,noexec 0 0
tmpfs /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
automount(pid5850) /autohome autofs rw,fd=4,pgrp=5850,timeout=300,minproto=2,maxproto=4,indirect 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec 0 0
pvr:/video /video nfs rw,vers=3,rsize=8192,wsize=8192,hard,intr,proto=tcp,timeo=600,retrans=2,sec=sys,addr=pvr 0 0
tmpfs /lib/modules/2.6.22-6-generic/volatile tmpfs rw 0 0

as you can see. I just noticed all those duplicate tmpfs mounts though. What's that all about? I digress.

Any ideas why trying to mount something not mounted would return an EBUSY?

Revision history for this message
Kyle McMartin (kyle) wrote :

Hi,

Can you run "lsof /boot" and see if anything has an open file handle there?

Cheers, Kyle

Changed in linux-source-2.6.22:
assignee: nobody → kyle
status: New → Incomplete
Revision history for this message
Brian J. Murrell (brian-interlinx) wrote : Re: [Bug 122568] Re: EBUSY trying to mount unmounted /boot filesystem

On Wed, 2007-06-27 at 15:51 +0000, Kyle McMartin wrote:
> Hi,
>
> Can you run "lsof /boot" and see if anything has an open file handle
> there?

Nothing:

# lsof /boot
[ no output ]
# lsof -n | grep /boot
[ again, no output ]

b.

--
My other computer is your Microsoft Windows server.

Brian J. Murrell

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

I've seen no update since I provided the requested information. Also this bug is marked Incomplete. How is it? Have I not provided all of the requested information?

I have just discovered that this problem affects no only my /dev/hda1 partition but my /dev/hda2 partition as well. In fact I have no reason to believe that this would be the same problem for any partition I tried to mount.

Please advise how we shall proceed with this issue.

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

I have figured this problem out. Here is the cause:

$ ls -l /dev/mapper
total 0
crw-rw---- 1 root root 10, 63 2007-08-08 04:56 control
lrwxrwxrwx 1 root root 7 2007-08-08 04:56 hda1 -> ../dm-0
lrwxrwxrwx 1 root root 7 2007-08-08 04:56 hda2 -> ../dm-1
lrwxrwxrwx 1 root root 7 2007-08-08 04:56 hda3 -> ../dm-2

devicemapper is mapping a device to all partitions, causing them to be flagged as exclusively opened already. Any attempt to exclusive open one of these mapped-to partitions, of course, will fail with EBUSY.

Mounting /dev/dm-0 instead of /dev/hda1 works.

There is still a problem though:

$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2007-08-08 08:56 00e53ae4-19e4-4d16-acc4-276230ea12c9 -> ../../dm-9
lrwxrwxrwx 1 root root 11 2007-08-08 08:56 0a9c2edd-80ba-4f7c-991d-d184952c486d -> ../../dm-14
lrwxrwxrwx 1 root root 10 2007-08-08 08:56 12b8250a-d031-4ee1-b486-5e67478d06b4 -> ../../hda1
lrwxrwxrwx 1 root root 11 2007-08-08 08:56 361d6c3f-6abf-42eb-aed9-356cdc7a3d8b -> ../../dm-17
lrwxrwxrwx 1 root root 11 2007-08-08 08:56 47762031-03d7-4cff-844b-c69a26855304 -> ../../dm-11
lrwxrwxrwx 1 root root 11 2007-08-08 08:56 7df7bb45-c3ff-47c1-8df6-744e54e4d7b5 -> ../../dm-20
lrwxrwxrwx 1 root root 10 2007-08-08 08:56 810241ed-7ce2-4428-94bf-80a10128c589 -> ../../dm-6
lrwxrwxrwx 1 root root 11 2007-08-08 08:56 adb550b4-5c89-4163-8acc-31c68b7c3e98 -> ../../dm-15
lrwxrwxrwx 1 root root 11 2007-08-08 08:56 db694a16-155d-4a82-b0b3-1c6ed149a7e5 -> ../../dm-19
lrwxrwxrwx 1 root root 11 2007-08-08 08:56 e01a3d48-e59c-46d4-a4d4-99c54cedba4c -> ../../dm-16
lrwxrwxrwx 1 root root 10 2007-08-08 08:56 FFFF-FFFF -> ../../hda2

As you can see (third entry above), the udev "/dev/disk/by-uuid/" code is using the partition device, not the mapped device mapper device. This is why even mounting by UUID:

UUID=12b8250a-d031-4ee1-b486-5e67478d06b4 /boot ext3 defaults 0 2

fails, which was the source of my original problem.

Revision history for this message
revel (revel) wrote :

Same problem here.
Having just upgraded from Feisty to Gutsy, boot process goes to maintenance root console because of fsck 'device busy' error. Swapon fails for the same reason.
As suggested above, I am able to activate swap partition by refering to it as /dev/dm-3. UUID or /dev/sda5 are 'busy'.
Linux 2.6.22-10-generic #1 SMP Wed Aug 22 07:42:05 GMT 2007 x86_64 GNU/Linux

Revision history for this message
Wolfgang Tremmel (launchpad-garf) wrote :

Same problem here after upgrading to gutsy and using 2.6.22 kernel.
The still installed 2.6.20 does not have this problem.

Revision history for this message
Anselmo Graciani (anselmograciani) wrote :

This can be related to bug #115616
I was having the same symptoms described here, and I fix them removing evms.
If you can't remove evms there is also other less drastic solutions, check https://bugs.launchpad.net/ubuntu/+source/evms/+bug/115616.

Revision history for this message
Hervé Fache (rvfh) wrote :

This bug is still present on Gutsy release. I had no entry for the dm disks in /dev/disk/by-uuid.

I tried removing evms, but then the init RAM disk could not be created for some reason, which led to a locked situation (apt-get needs dpkg to finish, but dpkg does not).

Note that RAM disk creation is very stupid: it removes the correct RAM disk before having a replacement ready! Come on guys...

Revision history for this message
Hervé Fache (rvfh) wrote :

In fact, it appears that dpkg was not locked, but udev got mad after I removed evms and was using 100% CPU. I had to restart the service manually...

Revision history for this message
Brian J. Murrell (brian-interlinx) wrote :

This bug is all but solved. The problem and cause is known. Can we close the loop and get some kind of resolution, even if that is just "this is how things are -- not fixing"?

Note that there is a follow up issue I just filed in bug 190995. Perhaps one of these should be a dup of the other, but I tend to think not. Related, yes, duplicate, not really.

Revision history for this message
Launchpad Janitor (janitor) wrote : This bug is now reported against the 'linux' package

Beginning with the Hardy Heron 8.04 development cycle, all open Ubuntu kernel bugs need to be reported against the "linux" kernel package. We are automatically migrating this bug to the new "linux" package. However, development has already began for the upcoming Intrepid Ibex 8.10 release. It would be helpful if you could test the upcoming release and verify if this is still an issue - http://www.ubuntu.com/testing . If the issue still exists, please update this report by changing the Status of the "linux" task from "Incomplete" to "New". We appreciate your patience and understanding as we make this transition. Thanks!

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

The Ubuntu Kernel Team is planning to move to the 2.6.27 kernel for the upcoming Intrepid Ibex 8.10 release. As a result, the kernel team would appreciate it if you could please test this newer 2.6.27 Ubuntu kernel. There are one of two ways you should be able to test:

1) If you are comfortable installing packages on your own, the linux-image-2.6.27-* package is currently available for you to install and test.

--or--

2) The upcoming Alpha5 for Intrepid Ibex 8.10 will contain this newer 2.6.27 Ubuntu kernel. Alpha5 is set to be released Thursday Sept 4. Please watch http://www.ubuntu.com/testing for Alpha5 to be announced. You should then be able to test via a LiveCD.

Please let us know immediately if this newer 2.6.27 kernel resolves the bug reported here or if the issue remains. More importantly, please open a new bug report for each new bug/regression introduced by the 2.6.27 kernel and tag the bug report with 'linux-2.6.27'. Also, please specifically note if the issue does or does not appear in the 2.6.26 kernel. Thanks again, we really appreicate your help and feedback.

Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

*This is an automated response*

This bug report is being closed because we received no response to the previous request for information. Please reopen this if it is still an issue in the actively developed pre-release of Jaunty Jackalope 9.04 - http://cdimage.ubuntu.com/releases/jaunty . To reopen the bug report simply change the Status of the "linux" task back to "New".

Changed in linux:
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.