This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 202316 - two file systems mounted on same mount point
two file systems mounted on same mount point
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: hal (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Zeuthen
:
Depends On:
Blocks: FC6Target
  Show dependency treegraph
 
Reported: 2006-08-12 14:44 EDT by Tom London
Modified: 2013-03-05 22:46 EST (History)
3 users (show)

See Also:
Fixed In Version: 0.5.8.1-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-27 16:13:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Output of lshal (118.98 KB, text/plain)
2006-08-14 23:04 EDT, Tom London
no flags Details

  None (edit)
Description Tom London 2006-08-12 14:44:49 EDT
Description of problem:
Running latest Rawhide.

I have a USB hard drive with 3 partitions (NTFS, ext3, ext3).

When I 'plug it in', the automagic mounting seems to mount both ext3 partition
on the same mount point:
[root@localhost ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sdb3 on /media/disk type ext3 (rw,noexec,nosuid,nodev)
/dev/sdb2 on /media/disk type ext3 (rw,noexec,nosuid,nodev)
[root@localhost ~]# 

In fact, I get a 'nautilus-type' window for /dev/sdb2 (and 'ls /media/disk'
shows contents of /dev/sdb2).

'ls /media' shows only one directory (media).


Version-Release number of selected component (if applicable):
autofs-5.0.1-0.rc1.14

How reproducible:
every time (believe 'really mounted' partition varies).

Steps to Reproduce:
1. plug in USB hard drive
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Tom London 2006-08-12 14:49:23 EDT
'ls -l /dev/disk/by-label':
[root@localhost disk]# ls -l by-label
total 0
lrwxrwxrwx 1 root root 10 Aug 12 09:44 boot -> ../../sda1
lrwxrwxrwx 1 root root 10 Aug 12 11:43 IBM_PRELOAD -> ../../sdb1
lrwxrwxrwx 1 root root 10 Aug 12 11:43 mediadisk -> ../../sdb2
lrwxrwxrwx 1 root root 10 Aug 12 11:43 mediadisk-1 -> ../../sdb3
lrwxrwxrwx 1 root root 10 Aug 12 09:44 SWAP-sda3 -> ../../sda3
[root@localhost disk]# 

'ls -l /dev/disk/by-uuid':
[root@localhost disk]# ls -l by-uu*
total 0
lrwxrwxrwx 1 root root 10 Aug 12 09:44 24bf6174-6814-42e4-a553-252fc3362193 ->
../../sda1
lrwxrwxrwx 1 root root 10 Aug 12 09:44 4450-DD50 -> ../../sda2
lrwxrwxrwx 1 root root 10 Aug 12 11:43 A04C80A94C807C32 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Aug 12 11:43 c3f47aed-808f-4a66-9f1a-087be4b0540e ->
../../sdb3
lrwxrwxrwx 1 root root 10 Aug 12 11:43 e55d6e07-1b94-4498-b29b-1634b9a99ad0 ->
../../sdb2
lrwxrwxrwx 1 root root 10 Aug 12 09:44 fcdfb4dd-f5ff-49ea-bf13-2d58e6b8fbf8 ->
../../dm-0
[root@localhost disk]# 

[root@localhost disk]# ls -l by-id
total 0
lrwxrwxrwx 1 root root  9 Aug 12 09:44 scsi-SATA_HTC426060G9AT00_EK7Y79 -> ../../sda
lrwxrwxrwx 1 root root 10 Aug 12 09:44 scsi-SATA_HTC426060G9AT00_EK7Y79-part1 ->
../../sda1
lrwxrwxrwx 1 root root 10 Aug 12 09:44 scsi-SATA_HTC426060G9AT00_EK7Y79-part2 ->
../../sda2
lrwxrwxrwx 1 root root 10 Aug 12 09:44 scsi-SATA_HTC426060G9AT00_EK7Y79-part3 ->
../../sda3
lrwxrwxrwx 1 root root 10 Aug 12 09:44 scsi-SATA_HTC426060G9AT00_EK7Y79-part4 ->
../../sda4
lrwxrwxrwx 1 root root 10 Aug 12 09:44 scsi-SATA_HTC426060G9AT00_EK7Y79-part5 ->
../../sda5
lrwxrwxrwx 1 root root  9 Aug 12 11:43 usb-TOSHIBA_MK8026GAX -> ../../sdb
lrwxrwxrwx 1 root root 10 Aug 12 11:43 usb-TOSHIBA_MK8026GAX-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Aug 12 11:43 usb-TOSHIBA_MK8026GAX-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Aug 12 11:43 usb-TOSHIBA_MK8026GAX-part3 -> ../../sdb3
[root@localhost disk]# 
Comment 2 Tom London 2006-08-12 15:22:05 EDT
Unmounting the 'phantom' fs (/dev/sdb3 in this case), causes both /dev/sdb2 and
/dev/sdb3 to be unmounted, and apparently causes /dev/sdb3 to be remounted:

[root@localhost ~]# umount /dev/sdb3
[root@localhost ~]# 
[root@localhost ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sdb3 on /media/disk type ext3 (rw,noexec,nosuid,nodev)
[root@localhost ~]# 

/media/disk now 'points' to the actual content of /dev/sdb3.

No messages in /var/log/messages.
Comment 3 Ian Kent 2006-08-13 08:53:18 EDT
(In reply to comment #2)
> Unmounting the 'phantom' fs (/dev/sdb3 in this case), causes both /dev/sdb2 and
> /dev/sdb3 to be unmounted, and apparently causes /dev/sdb3 to be remounted:
> 
> [root@localhost ~]# umount /dev/sdb3
> [root@localhost ~]# 
> [root@localhost ~]# mount
> /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
> proc on /proc type proc (rw)
> sysfs on /sys type sysfs (rw)
> devpts on /dev/pts type devpts (rw,gid=5,mode=620)
> /dev/sda1 on /boot type ext3 (rw)
> tmpfs on /dev/shm type tmpfs (rw)
> none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
> sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
> /dev/sdb3 on /media/disk type ext3 (rw,noexec,nosuid,nodev)
> [root@localhost ~]# 
> 
> /media/disk now 'points' to the actual content of /dev/sdb3.
> 
> No messages in /var/log/messages.

So where does autofs come into this problem?
Comment 4 Tom London 2006-08-13 12:19:45 EDT
Sorry to 'mis-zilla'; hal?  udev?
Comment 5 Tom London 2006-08-13 12:45:28 EDT
Suspend/resume reproduces the original '2 on the same mount point',
but the disk is now sdc, not sdb:

[tbl@localhost ~]$ mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sdc2 on /media/disk type ext3 (rw,noexec,nosuid,nodev)
/dev/sdc3 on /media/disk type ext3 (rw,noexec,nosuid,nodev)
[tbl@localhost ~]$

This time, the third partition is really mounted and the second one
(sd[bc]2) is hidden.
Comment 6 Ian Kent 2006-08-13 21:08:06 EDT
(In reply to comment #4)
> Sorry to 'mis-zilla'; hal?  udev?

Good question.
I think probably hal.

Comment 7 Tom London 2006-08-14 10:18:51 EDT
Interesting.... This is bugzilla'ed at least two other times besides here:

against gnome-mount (https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=189253
which seems to implicate hal), 

against gnome-volume-manager
(http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=198317).

189253 and 198317 tag this against FC5, but this seems to be live in devel.
Comment 8 John (J5) Palmieri 2006-08-14 11:03:31 EDT
can you attach the output of lshal.  Thanks.
Comment 9 Tom London 2006-08-14 23:04:16 EDT
Created attachment 134182 [details]
Output of lshal

Freshly booted system; plugged in USB harddrive.

Output of mount:
[root@localhost ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
/dev/sdb3 on /media/disk type ext3 (rw,noexec,nosuid,nodev)
/dev/sdb2 on /media/disk type ext3 (rw,noexec,nosuid,nodev)
[root@localhost ~]# 

/media/disk actually points to /dev/sdb2
Comment 10 Tom London 2006-08-14 23:05:37 EDT
Hope this is what you want....
Comment 11 John (J5) Palmieri 2006-08-15 13:38:58 EDT
Interesting.  Looks like a bug in the new HAL since it correctly puts a -1 after
the second disk for its label (I think it does this when the disk doesn't have a
label) but it doesn't do this for the mountpoint.
Comment 12 Tom London 2006-08-15 13:54:00 EDT
Hmmm... I think I set the labels in a previous effort to work around this issue:

[root@localhost ~]# e2label /dev/sdb2
/media/disk
[root@localhost ~]# e2label /dev/sdb3
/media/disk-1
[root@localhost ~]# 

Shouldn't cause a problem, should it?
Comment 13 David Zeuthen 2006-09-26 13:53:27 EDT
Hi, please try with hal-0.5.8 and gnome-mount 0.5 available from here

 http://people.freedesktop.org/~david/hal-0.5.8.1-fc6/

Thanks.
Comment 14 Tom London 2006-09-26 15:17:12 EDT
Downloaded all i386 packages (hal-gnome-0.5.8.1-0davidz1.i386.rpm, 
hal-devel-0.5.8.1-0davidz1.i386.rpm, hal-0.5.8.1-0davidz1.i386.rpm,
gnome-mount-nautilus-properties-0.5-0davidz1.i386.rpm and
gnome-mount-0.5-0davidz1.i386.rpm

'rpm -Uvh hal* gnome-mount*' reports:

[root@localhost Downloads]# rpm -Uvh hal* gnome-mount*
error: Failed dependencies:
        libvolume_id.so.0 is needed by hal-0.5.8.1-0davidz1.i386
[root@localhost Downloads]# 

Where to download?

tom
Comment 15 Tom London 2006-09-26 15:20:13 EDT
Ah.... libvolume_id.i386 from development.

Got it.
Comment 16 Tom London 2006-09-27 09:40:46 EDT
OK.  Results of testing:

Insert of drive seems to work.  Both file systems mount.

Running 'umount /dev/sdb[23]; eject /dev/sdb' unmounts /media/disk and
/media/disk-1, and then automagically remounts them. Ran that sequences about 10
times with no problems.

I ran 'unmount /dev/sdb2' followed by unplugging drive, then replugging drive.
Waited about 3-5 seconds and replugged. Nothing happened. Unplugged, waited
about 5-10 seconds and replugged.  Worked.

I see a message in /var/log/messages that I don't recall seeing before:
/var/log/messages:Sep 27 06:17:54 localhost hald: mounted /dev/sdb2 on behalf of
uid 500
/var/log/messages:Sep 27 06:17:54 localhost hald: mounted /dev/sdb3 on behalf of
uid 500

That new?

I then ran the following script:
     while :
     do
     umount /dev/sdb[23]
     eject /dev/sdb
     sleep 20
     done

and closed the nautilus windows (and the 'can't mount NTFS' popup) each time.

This ran for about 10 cycles with no errors.

I'm curious, what got 'fixed'?

I'll continue to test today, and close if no problems.....

tom
Comment 17 David Zeuthen 2006-09-27 10:15:54 EDT
> /var/log/messages:Sep 27 06:17:54 localhost hald: mounted /dev/sdb2 on behalf
of uid 500
> /var/log/messages:Sep 27 06:17:54 localhost hald: mounted /dev/sdb3 on behalf of
uid 500
>
> That new?

Yep.

> I'm curious, what got 'fixed'?

We needed locking around mounting a file system to avoid race conditions.

Thanks for testing this. Will either be part of FC6 final or available as an update.
Comment 18 David Zeuthen 2006-09-27 16:13:09 EDT
Should be fixed in 0.5.8.1-2 otherwise please reopen.

Note You need to log in before you can comment on or make changes to this bug.