0

On Ubuntu 22.04, when I try to mount my USB Stick on my file explorer (right-click on it in the side bar, then 'Mount'). A window appears with "Failed to mount USB Stick, an operation is already pending". I can't figure out what is this operation. This behavior is new. The file system on the stick is ext4.

Thank you for your help

Edit:

$ sudo lsblk -e7 -f
NAME   FSTYPE FSVER LABEL        UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                  
└─sda1 ext4   1.0   MediaRange   592b312e-cc07-47ae-860b-ff394c90df22                
sdb                                                                                  
nvme0n1
│                                                                                    
├─nvme0n1p1
│      ntfs         Wiederherstellung
│                                BA44D34044D2FDD7                                    
├─nvme0n1p2
│      vfat   FAT32              06D3-FE6F                              52.7M    45% /boot/efi
├─nvme0n1p3
│                                                                                    
├─nvme0n1p4
│      ntfs                      9CF0D584F0D564D4                                    
├─nvme0n1p5
│      ntfs                      B0F8812AF880F040                                    
├─nvme0n1p6
│      ext4   1.0                d1e12f70-1d43-4777-8eac-7d66e2905a93                
├─nvme0n1p7
│      ext4   1.0                67b85685-b45b-41bd-93ee-3e046062aec4   26.1G    44% /var/snap/firefox/common/host-hunspell
│                                                                                    /
├─nvme0n1p8
│      swap   1                  0e3aa3fe-0c2f-4393-841e-09572ea43d30                [SWAP]
└─nvme0n1p9
       ext4   1.0                0bd2c977-65e0-4e7f-b4ad-54914aac258a   33.8G    63% /home
$ cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p7 during installation
UUID=67b85685-b45b-41bd-93ee-3e046062aec4 /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=06D3-FE6F  /boot/efi       vfat    umask=0077      0       1
# /home was on /dev/nvme0n1p9 during installation
UUID=0bd2c977-65e0-4e7f-b4ad-54914aac258a /home           ext4    defaults        0       2
# swap was on /dev/nvme0n1p8 during installation
UUID=0e3aa3fe-0c2f-4393-841e-09572ea43d30 none            swap    sw              0       0
UUID=592b312e-cc07-47ae-860b-ff394c90df22 /mnt/usbdata  ext4  noatime,noauto 0  0
$ ls -ld /mnt/usbdata/
drwxr-xr-x 2 root root 4096 Sep  7 13:26 /mnt/usbdata/
$ mount | grep ext4
/dev/nvme0n1p7 on / type ext4 (rw,relatime,errors=remount-ro)
/dev/nvme0n1p7 on /var/snap/firefox/common/host-hunspell type ext4 (ro,noexec,noatime,errors=remount-ro)
/dev/nvme0n1p9 on /home type ext4 (rw,relatime)

EDIT: I still have not found a solution for this. With GParted, I can see that the data are still there on the stick, but when I try to mount it to a directory, it keeps trying forever, without finding anything.

Maxclac
  • 13
  • 5

1 Answers1

0

I suggest that you create the mount point

sudo mkdir /mnt/usbdata

and find the UUID with lsblk

lsblk -e7 -o name,fstype,uuid

and edit your file /etc/fstab according to the advice in the manual page

man fstab

and add the following line (use your own file system's UUID):

UUID=4c518694-d97c-4910-bb7b-eeb6a6b73874  /mnt/usbdata  ext4  noatime 0  0

If you do not always keep the drive (USB stick with the ext4 file system) connected, you should add the boot option noauto (so noatime,noauto in field #4).

With the noauto option, you should mount the drive by the following command in a terminal window,

sudo mount /mnt/usbdata

This should start working after reboot.


The following links may help explaining/describing what to do.

Answers at AskUbuntu:

Adding new SATA SSD hard drive, not showing up in file manager

Unable to access external storage

Formatting a USB flash drive as ext4

How to create partition for data?

An Ubuntu help page:

https://help.ubuntu.com/community/Installation/UEFI-and-BIOS#Final_system_tweaks

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • Thank you @sudodus for the comment. I did what you suggested but sudo mount /mnt/usbdata is hanging in the terminal. Isn't there any log I can find in order to see what's going on? – Maxclac Sep 11 '23 at 06:21
  • You can run lsblk -e7 -f and cat /etc/fstab and paste the output of both commands into your original question. Please indent each line 4 spaces in order to render it as code to make it easy to read. Then write a comment to me (@sudodus) so that I will get an alert about it. - By the way, did you enter the sudo password correctly? – sudodus Sep 11 '23 at 07:49
  • Done! The password was right. @sudodus – Maxclac Sep 11 '23 at 08:17
  • I don't see anything wring in that output; 1. Please write also the output of ls -ld /mnt/usbdata (as code) and of mount | grep ext4 into your original question; 2. Did you reboot the computer after editing /etc/fstab? – sudodus Sep 11 '23 at 09:20
  • Done @sudodus
  • Yes, I rebooted the computer after having edited /etc/fstab
  • – Maxclac Sep 11 '23 at 09:47
  • @Maxclac, Thanks for the added details. I cannot see anything wrong, and I have no advice right now. Maybe I can suggest something later on. Maybe someone else can suggest something that solves your problem ... – sudodus Sep 11 '23 at 10:05
  • Did you ever try running fsck on the unmounted partition? Might be a filesystem error. – ubfan1 Oct 01 '23 at 16:01