0

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

1
  • I think you are confused about the syntax of umount. if given multiple paths umount 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.
    – davolfman
    Commented Jul 29 at 23:48

1 Answer 1

2
[1050345.504717] sd 12:0:0:0: [sdm] tag#24 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=39s

Your drive is failing. Probably it hits a bad block or something and the controller errors out and the drive goes offline and can't be read. By unplugging it from usb and plugging it back in, you are power cycling the drive and resetting the controller, after which it will work again for a while until it errors out again.

Note that removing the mount point directory and recreating it doesn't make any difference, and removing it with rm -rf is very dangerous, as if you get this step in the wrong order or make a typo in the directory name you could irrecoverably destroy something. If the mount point is an empty directory like it should be, rmdir /mnt should work without the danger.

Also note that rm -f suppresses errors, so if there's actually something wrong, you won't find out about it, making this command not just dangerous and useless, but also unhelpful.

2
  • Thanks for the response. So, if the drive has no bad block, mount and umount will work without recreating and removing directory? Commented Jul 30 at 15:23
  • Removing the directory is unnecessary. Creating the directory has to be done at least once. :) /mnt is usually created by default at system install and is frequently used for temporary manual mounts. I would never use /mnt for permanent mounts.
    – user10489
    Commented Jul 31 at 11:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .