Score:1

Advice? External USB harddrive accidentally unplugged (no activity at time). Re-plugged, but `mountpoint`/`findmnt`/`lsblk` disagree if mounted?

tl flag

[(This really isn't an unbuntu-specific question, but yeah...)]

So I just accidentally bumped and and unplugged the cable on an external USB harddrive.

  • There was no activity at the time.

  • It's btrfs (one big partition the whole drive, about 2TB... (I think it's spinning rust, not an SSD -- I dunno, it's just something I had in my box of random old things I inherited from I dunno where))


I just plugged it back in, and...

  • mountpoint [[path]] #=> "[[path]] is a mountpoint"

  • lsblk doesn't show it as having a mountpoint

  • findmnt #=>

TARGET      SOURCE                              FSTYPE  OPTIONS                                                                                     
/           /dev/sda3[/@/.snapshots/1/snapshot] btrfs   rw,relatime,ssd,discard=async,space_cache=v2,subvolid=266,subvol=/@/.snapshots/1/snapshot   
[...]                                                                                                                                               
[...]                                                                                                                                               
[...]                                                                                                                                               
└─[[path]]  /dev/sdb1                           btrfs   ro,nosuid,nodev,relatime,space_cache,subvolid=5,subvol=/                                    
  • but
    sudo ls [[path]]
    #=>
    ls: reading directory '[[path]]': Input/output error

What should I do/check?

Like, I am aware of fsck, but I don't know anything specific about how/why to use it, or what related/alternative tools I should use...?

Basically, what are my unknown-unknowns here? How are you generally supposed to deal with this kind of situation?

Sam O'Riil avatar
kr flag
Can't you just reboot and mount it again? Unless you want specifically to mount it back under this session to save something unsaved (like those dark times when I had used VM from external USB HDD for my job) it's not worth it to bother with all those glitches. After that just do normal filesystem check and repair.
dwawlyn avatar
tl flag
Sorry, should've said more explicitly like: I assume I can just `umount` it, or at the worst reboot, but I figured I should first check in case someone goes "no! don't reboot yet! first you should [do X] because [arcane cache/journaling details]!" Anyway, [`umount`, un-and-re- plug, remount] seems to have worked perfectly. So I guess should make that the accepted answer to this question...?
Score:0
tl flag

To answer my own question:
I should've made it more explicit that I was pretty sure that I could just do
umount [mountpoint] or at the worst reboot,
but I figured I should first check in case someone went like:

no! don't reboot yet!
first you should [do X]
because [arcane cache/journaling details that are probably beyond you]!

However, no one I asked seemed to know of any potential hidden landmines like that,
so I just did:

  • umount [mountpoint]
  • unplugged and replugged drive
  • remounted

and it seemed to work fine.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.