Bug 118573 - Partitioned firewire harddisks fail to mount properly
Summary: Partitioned firewire harddisks fail to mount properly
Status: RESOLVED WONTFIX
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Hotplug (show other bugs)
Version: RC 1
Hardware: i686 All
: P5 - None : Normal
Target Milestone: ---
Assignee: Danny Kukawka
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-23 13:15 UTC by Maxim Zaitsev
Modified: 2006-07-18 14:43 UTC (History)
0 users

See Also:
Found By: Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
lshul output, usb cable (76.47 KB, text/plain)
2005-09-26 07:06 UTC, Maxim Zaitsev
Details
lshal output, firewire connection (74.26 KB, text/plain)
2005-09-26 07:06 UTC, Maxim Zaitsev
Details
tail -f /var/log/messages > messages (19.51 KB, text/plain)
2005-10-26 12:22 UTC, Maxim Zaitsev
Details
cat /proc/mounts > mounts (1.29 KB, text/plain)
2005-10-26 12:23 UTC, Maxim Zaitsev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maxim Zaitsev 2005-09-23 13:15:32 UTC
Hi! 
 
I have a firewire/usb combi drive with 3 partitions (FAT32, FAT32, Reiser). 
When connected via USB the drive gets correctly recognised and automounted 
to /media/usbdisk, /media/usbdisk1 and /media/usbdisk2. But, the same disk is 
hardly usable with Firewire because of the incorrect mounts. First of all, 
only two mount points are created (/media/ieee1394disk 
and /media/ieee1394disk_1). Secondly, the two partitions get mounted to the 
first mount point. The third one is not mounted at all.  
 
I also have a combi drive with a single partition, and that one is mounted 
correctly. 
 
By the way, safe removal of the drive does not work neither for USB nor for 
Firewire (with a message like: the device is not in fstab and you are not 
root). 
 
Let me know if more diagnostic information is needed. 
 
Regards, 
Max
Comment 1 Danny Al-Gaaf 2005-09-23 14:10:18 UTC
> By the way, safe removal of the drive does not work neither for USB nor for 
> Firewire (with a message like: the device is not in fstab and you are not 
> root)

--> see bug #117945

For the rest: attach the output of lshal as attachment to the bug if the drive 
is connected via USB and if as Firewire 
Comment 2 Maxim Zaitsev 2005-09-26 07:06:10 UTC
Created attachment 50800 [details]
lshul output, usb cable
Comment 3 Maxim Zaitsev 2005-09-26 07:06:53 UTC
Created attachment 50801 [details]
lshal output, firewire connection
Comment 4 Maxim Zaitsev 2005-09-26 07:08:20 UTC
(In reply to comment #1) 
> --> see bug #117945 
> 
I've seen that one straight after I've committed the report. It's indeed the 
same problem 
 
> For the rest: attach the output of lshal as attachment to the bug if  
> the drive is connected via USB and if as Firewire  
> 
I've attached the output of ls hul for the both cases. By the way, I did 
forgot to mention that in both cases in "media" list in Konqueror I see all 3 
partitions (with a wrong icon in case of firewire, it's a known bug). And, 
only one partition gets automounted. The other one gets mounted on top of the 
first one if I click one of the unmounted icons... But' as I've said before, 
only two mount points are created and the second one is anyways unused. 
 
Comment 5 Danny Al-Gaaf 2005-10-20 17:19:03 UTC
Looks like a really ugly race. Please change the following line in /etc/init.d/haldaemon:

from:
HALDAEMON_PARA="--daemon=yes --retain-privileges";
to
HALDAEMON_PARA="--daemon=yes --retain-privileges --verbose=yes";

Then remove the device from firewire, restart hal (rchal restart), wait until the partitions mounted and attach this infos to the bug:

- cat /proc/mounts
- the part of /var/log/messages since the restart of HAL.
Comment 6 Danny Al-Gaaf 2005-10-26 11:33:09 UTC
Any news? Need the requested information to fix this.
Comment 7 Maxim Zaitsev 2005-10-26 12:21:43 UTC
Sorry for the delay. It indeed seems to be a race. The thing is that I can only reliably reproduce it at home. When I pluged the drive into the office PC (where it belongs :) I got all the drives mounted properly. That is why I though I'll have to take the drive home again... However, after your reminder I gave it another try and this time one of the partitions was not mounted. I'll attach the related logs. 

Regards,
Max

P.S.: I've actually upgraded to the released 10.0 now
Comment 8 Maxim Zaitsev 2005-10-26 12:22:46 UTC
Created attachment 55520 [details]
tail -f /var/log/messages > messages
Comment 9 Maxim Zaitsev 2005-10-26 12:23:32 UTC
Created attachment 55521 [details]
cat /proc/mounts > mounts
Comment 10 Danny Al-Gaaf 2005-11-02 13:44:29 UTC
This is strange because one of the partitions in the files above was already mounted to /media/usbdisk_1. Was this on SUSE 10.0 ? 

Could you please reproduce this problem with 10.0 after fresh reboot, without any changes in /etc/fstab and only with plugin to firewire (and never in usb)? Please reproduce this with instructions from comment #5.
Comment 11 Maxim Zaitsev 2005-11-07 14:52:35 UTC
Hi again,

yesterday I have tried many times to reproduce the problem on my notebook at home (running suse 10.0) and came to the conclusion that we are dealing with a very nasty race condition. Why? Because! Am I sure? Yes, absolutely! :-)) Now, what I've seen in more detail:

1. once I enable verbose debugging for hald I always get all my partitions mounted. Reproduced multiple times, including fresh reboots and so on.

2. once I disable verbose mode I only get 1 or 2 of 3 partitions mounted. This I also reproduced several times and I NEVER had the correct behaviour. I did not observe though multiple mounting of partitons (which I've reported initially for RC1)

3. what I've noticed while having verbose=on is that the order in which partitions get mounted is somehat random. That is sometimes /dev/sda1 is mounted to /media/ieee1394, /dev/sda2 to ieee1394_1 and so on. But often /dev/sda3 gets mounted to /media/ieee1394 and the other two partitions randomly to /media/ieee1394_1 and /media/ieee1394_2. Isn't it strange?

Actually, when I use the drive in USB mode the order of partitions is not trivial, but at least it is 100% reproducable. sda3->usbdisk, sda1->usbdisk_1, sda2->usbdisk_2.

I know that races are the most nasty things to debug, but looks like it is that what we'll have to do. Let me know, what should I try next.

Regards,
Max

Comment 12 Danny Al-Gaaf 2006-07-18 14:43:43 UTC
Sorry, but I have no idea how we can fix this atm. This looks as already said like a really ugly race in HAL or in some other place in the system. I can't reproduce this here with any machine.

The only things I can advise atm are: 
* run hal in verbose mode ... or
* avoid mount the related devices by hal and use udev or automount to mount them ... or
* update to SL 10.1 (and try to reproduce and problem is present, reopen the bug)

Sorry, but I can't do more atm. I close the bug as WONTFIX