Allow remounting of uncleanly unmounted XFS drive

Bug #130398 reported by Martin Rehn
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Ubuntu
Confirmed
Undecided
Unassigned

Bug Description

When a USB drive containing an XFS partition is disconnected without proper unmounting, due to power failure or yanking of the USB cable, it will not automatically remount when reconnected. For the naive user, this requires a reboot to resolve.

** Here is what currently happens:

1) The filesystem is forced to be shut down. This does not clear out the UUID.

usb 5-5: USB disconnect, address 3
xfs_force_shutdown(sdb1,0x1) called from line 424 of file fs/xfs/xfs_rw.c. Return address = 0xf9002bfc
Filesystem "sdb1": I/O Error Detected. Shutting down filesystem: sdb1
Please umount the filesystem, and rectify the problem(s)
xfs_force_shutdown(sdb1,0x1) called from line 424 of file fs/xfs/xfs_rw.c. Return address = 0xf9002bfc

2) When plugging the drive back in, it refuses to mount:

XFS: Filesystem sdc1 has duplicate UUID - can't mount

** What should happen:

Offer the user to (or maybe automatically) clear out the old UUID from the system when the drive is plugged back in (or maybe already when it is yanked). I don't know how to do that, but it seems to be the right thing to do. Or mount the newly plugged in drive with the "nouuid" option (though that does not seem to be as clean a solution).

Revision history for this message
Matt Price (matt-price) wrote :

just want to put in here, for those who stumble across this page via google, that the way to fix the uuid problem is

sudo xfs_admin -U generate /dev/sdxx
where sdxx is the device name assigned to the partition with the corrupted uuid.

matt

Revision history for this message
Patrick Kilgore (patrick-kilgore) wrote :

Is this still an issue in the most recent release (hardy) ?

Revision history for this message
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!.

Revision history for this message
Martin Rehn (minpost) wrote :

Confirmed in Hardy. (There was no reason to believe that this would have been magically fixed in Hardy, was there?)

Revision history for this message
Zubin (zparihar) wrote :

Running Ubuntu 12.04 64-bit

I plugged in my External Hard Drive vs. USB last night. I had 1.5 TB of data that I wanted to Rsync to my Desktop Hard Drive.

This morning I went to check the status of the transfer. I noticed that it didn't finish, rsync showed me a lot of Input/Output Errors:

rsync: send_files failed to open "/media/d8117361-193e-4571-afb0-50c4a461ba1e/zubin/Downloads/Paulo Coelho-Eleven Minutes/CD 2/01.mp3": Input/output error (5)

I was wondering what happened here and realized that the USB External Hard Drive was no longer mounted for some reason.

I unplugged and replugged the HD back in. The drive would be recognized but would not mount.

I then tried to mount it via the command line, but got the following output:

zubin@zubin-main ~ $ sudo mount /dev/sdd1 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

so I ran a tail on syslog and found that this system now has a duplicate UUID and can not mount:

zubin@zubin-main ~ $ sudo mount /dev/sdd1 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail or so

I ended up mounting with the nouuid option, but this is not a solution for most end users.

zubin@zubin-main ~ $ sudo mount -o nouuid /dev/sdd1 /mnt

I haven't rebooted my machine... not actually sure if that would help clearing up this problem, but this should be fixed.

Revision history for this message
Behrooz Amoozad (behrooz0az) wrote :

10 years later, bug still there.
anyone fxinig it yet or asking upstream to fix it? maybe talk to upstream devs and let them know?

Revision history for this message
lynysys (lynysys-j) wrote :

I have to add my voice to this as well. I have a large amount of data, all stored on XFS partitions that I frequently hot swap between.

This bug totally invalidates all the great work that others have put into the automount subsystems in kernel/userspace.

Behrooz, who are upstream maintainers do you know?

Let's resolve to at least make someone aware, because if the bug has been present all this time, it has to be because upstream are not aware of it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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