[Bug 35269] No notification when mounting corrupted file systems

Lukas Sabota punkrockguy318 at comcast.net
Fri Mar 17 01:32:50 UTC 2006


Public bug reported:
https://launchpad.net/malone/bugs/35269

Affects: hal (Ubuntu)
       Severity: Normal
       Priority: (none set)
         Status: Unconfirmed

Description:
When a filesystem is damaged, the kernel will attempt to mount it read-
only.  This is a very good thing, but it seems odd when you cannot write
files to a filesystem when you've received no message of error.

Scenario:
My girlfriend's ipod nano was having some problems, so I took a look at it to fix it.  I plugged it into my computer, and first backed up all of her music files.  It complained about a couple files couldn't be read properly, so I figured it was because the filesystem was damaged.  Apparently, she had taken the device out of the computer while it was still mounted and caused some problems.
As I attempted to fix the problems, I tried to adjust some files.  It said my permission was denied.  I went in as root, remounted it as rw, and the same problems.  Quite confusing.
Later, I got the idea to check out dmesg.  Here is the output that seems to be particularly interesting:

[4310589.222000] usb 5-2: new high speed USB device using ehci_hcd and address 10
[4310589.341000] usb 5-2: configuration #1 chosen from 2 choices
[4310589.342000] scsi5 : SCSI emulation for USB Mass Storage devices
[4310589.342000] usb-storage: device found at 10
[4310589.342000] usb-storage: waiting for device to settle before scanning
[4310594.344000]   Vendor: Apple     Model: iPod              Rev: 1.62
[4310594.345000]   Type:   Direct-Access                      ANSI SCSI revision: 00
[4310594.346000] SCSI device sda: 3999743 512-byte hdwr sectors (2048 MB)
[4310594.348000] sda: Write Protect is off
[4310594.348000] sda: Mode Sense: 68 00 00 08
[4310594.348000] sda: assuming drive cache: write through
[4310594.352000] SCSI device sda: 3999743 512-byte hdwr sectors (2048 MB)
[4310594.353000] sda: Write Protect is off
[4310594.353000] sda: Mode Sense: 68 00 00 08
[4310594.353000] sda: assuming drive cache: write through
[4310594.353000]  sda: sda1 sda2
[4310594.359000] sd 5:0:0:0: Attached scsi removable disk sda
[4310594.359000] sd 5:0:0:0: Attached scsi generic sg0 type 0
[4310594.367000] usb-storage: device scan complete
[4310595.683000] FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[4310596.007000] FAT: Filesystem panic (dev sda2)
[4310596.007000]     fat_get_cluster: invalid cluster chain (i_pos 120167)
(etc, etc)

This output was extremely useful, as it led me to believe the filesystem
was corrupted, and that's why it was being mounted read-only, and I need
to back up the files I can and reformat.

Here's the problem:  No matter what way a media is mounted, none of these errors were presented to my attention.  Here is my expected behavior:
I plug in the ipod, it is automatilly mounted.  A popup is displayed on my screen that tells me "The filesystem on the removable media has been corrupted.  You will not be able to write to this device.  You may experiance some problems accessing some files.  Details follow", in which the dmesg output has been displayed.

Then I would try mounting it by hand with my own options with "mount".
Mount should tell me "Filesystem damaged, mounting read only.  See dmesg
for details"


This would have to be adjusted in mount, hal, and nautilus.




More information about the desktop-bugs mailing list