Problem
- Mount directory. sudo mkdir /mnt
- sudo chmod -R 777 /mnt
- sudo mount /dev/sdm1 /mnt, will work
- Do some work..
- sudo umount /dev/sdm1, will work
- sudo mount /dev/sdm1 /mnt, will not work
Partial/Temp solution. Order probably doesn't matter but unplug and again mounting is solving the problem
- sudo rm -rf /mnt
- unplug the SSD from USB port
- plug the SSD in to the same USB port
- sudo mkdir /mnt
- sudo mount /dev/sdm1 /mnt, will work
Mounted SSD filesystem type is ext4. Able to repro this on 2 different servers easily.
dmesg
[1050337.453395] usb 2-3: reset SuperSpeed USB device number 15 using xhci_hcd
[1050337.474970] scsi host12: uas_eh_device_reset_handler success
[1050345.504717] sd 12:0:0:0: [sdm] tag#24 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=39s
[1050345.504740] sd 12:0:0:0: [sdm] tag#24 Sense Key : Hardware Error [current]
[1050345.504750] sd 12:0:0:0: [sdm] tag#24 ASC=0x44 <<vendor>>ASCQ=0x81
[1050345.504756] sd 12:0:0:0: [sdm] tag#24 CDB: Read(16) 88 00 00 00 00 01 d1 c0 be 00 00 00 00 08 00 00
[1050345.504760] blk_update_request: critical target error, dev sdm, sector 7814036992 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[1050345.507908] sd 12:0:0:0: [sdm] tag#25 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[1050345.507914] sd 12:0:0:0: [sdm] tag#25 Sense Key : Hardware Error [current]
[1050345.507921] sd 12:0:0:0: [sdm] tag#25 ASC=0x44 <<vendor>>ASCQ=0x81
[1050345.507925] sd 12:0:0:0: [sdm] tag#25 CDB: Read(16) 88 00 00 00 00 01 d1 c0 be 00 00 00 00 08 00 00
[1050345.507927] blk_update_request: critical target error, dev sdm, sector 7814036992 op 0x0:(READ) flags 0x0 phys_seg 8 prio class 0
[1050345.510771] Buffer I/O error on dev sdm1, logical block 7814034944, async page read
[1050345.513125] Buffer I/O error on dev sdm1, logical block 7814034945, async page read
[1050345.514523] Buffer I/O error on dev sdm1, logical block 7814034946, async page read
[1050345.515875] Buffer I/O error on dev sdm1, logical block 7814034947, async page read
[1050345.517220] Buffer I/O error on dev sdm1, logical block 7814034948, async page read
[1050345.518671] Buffer I/O error on dev sdm1, logical block 7814034949, async page read
[1050345.519953] Buffer I/O error on dev sdm1, logical block 7814034950, async page read
[1050345.521229] Buffer I/O error on dev sdm1, logical block 7814034951, async page read
[1050345.530707] sd 12:0:0:0: [sdm] tag#26 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
[1050345.530715] sd 12:0:0:0: [sdm] tag#26 Sense Key : Hardware Error [current]
[1050345.530721] sd 12:0:0:0: [sdm] tag#26 ASC=0x44 <<vendor>>ASCQ=0x81
[1050345.530726] sd 12:0:0:0: [sdm] tag#26 CDB: Read(16) 88 00 00 00 00 00 00 00 08 02 00 00 00 02 00 00
[1050345.530728] blk_update_request: critical target error, dev sdm, sector 2050 op 0x0:(READ) flags 0x1000 phys_seg 1 prio class 0
[1050345.533268] EXT4-fs (sdm1): unable to read superblock
If the Filesystem is corrupted? Why I am able to solve this with unplug, mkdir and plug. I am not doing fsck or anything else.
Can someone help me understand what could be the issue? I am looking for solution where I don't need to unplug and plug the USB and probably without running fsck and bunch of other commands. Because I need to this on multiple devices with multiple mount programmatically
umount
. if given multiple pathsumount
will unmount the filesytem mounted to each of those paths in sequence. The source device isn't involved unless maybe it can be found in fstab and converted.