On 05/17/2017 09:19 AM, Ivan Sizov wrote:
> > The drive is not reliable. And I noticed when there is an error and the
> > USB device appears to be dead to the kernel, I am later unable to
> > remount rw the drive. I can mount it read only though.
> > This seems to be a systematic behavior. And it occasionally happens when
> > the computer wake up from sleep and the drive is still attached.
> > Power cycling the disk do not change anything, but restarting the
> > computer "solves" the issue.
>
> (Maybe offtop) Seems like your disk's USB-SATA controller is almost
dead. You shouldn't further use it with USB because this lead to data
corruption. Detach HDD from case and plug directly to a SATA port or
replace the controller.


Thank you Chris, Ivan, for your answers.

I understand the drive appears dead to the kernel and the safest
solution is to mount back the drive read only.

But...

To give you more details about my particular use case, we are
investigating the resilience of various FS to hardware failures. The
disk is (presumably) working but we are using a modified USB cable to
produce bus errors on purpose.

If I understand it well, when we switch the cable to "faulty mode", the
kernels detects usb errors or something, consider the device as dead,
and try to reset the bus. On that event, the drive will remount ro.

However, when we switch back the cable to "Normal mode", we are unable
to forcefully remount the drive rw. Even if we replace our cable by a
genuine one, and/or if we power cycle the drive. BTRFS just refuse to
remount rw that drive. FWIW, BTRFS is the only filesystems we've tested
considering a faulty drive as _definitively_ faulty without any hope for
the administrator to override that.


Here we are in a very special use case. But I think we would see a
similar behavior if some drive case or cable was dying, the
administrator replaced it, but was unable to remount rw the drive after
having fixed the problem. Or did I missed something?


-- 
-- Sylvain Leroux
-- sylv...@chicoree.fr
-- http://www.chicoree.fr


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to