从 Ubuntu 14.04 升级到 16.04 后无法挂载 /dev/sda6

从 Ubuntu 14.04 升级到 16.04 后无法挂载 /dev/sda6

我意外地将系统从 Ubuntu 14.04 升级到了 16.04。一切运行正常,但最近我无法再挂载 /dev/sda6 分区 (exFAT)。运行后:

sudo mount /dev/sda6 /media/zorz/Data/

我收到以下错误:

mount: according to mtab, `/dev/sda6` is already mounted on /media/zorz/Data

如果我尝试通过单击来执行此操作,则会出现更详细的错误:

Error mounting /dev/sda6 at /media/zorz/Data: Command-line `mount -t "exfat" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000,iocharset=utf8,namecase=0,errors=remount-ro,umask=0077" "/dev/sda6" "/media/zorz/Data"' exited with non-zero exit status 1:
stdout: `FUSE exfat 1.2.3
'
stderr: `mount: according to mtab, /dev/sda6 is already mounted on /media/zorz/Data

'

基本上,我在例如下创建的任何目录/media/zorz/test3都会出现类似的错误,但这次它以以下内容结尾test3

mount: according to mtab, /dev/sda6 is already mounted on /media/zorz/test3

此分区用于执行文件和运行脚本,Ubuntu 和 Windows 10 都可以访问它,因为到目前为止我已经运行了双启动几年了。我不确定这个错误是否是升级的结果,但我记得升级后,系统重新启动时没有卸载它。通常如果发生这种情况,我只会收到sda6未干净卸载的警告。我已经尝试了其他类似问题的解决方案,但没有成功。还有其他建议我可以检查什么才能使它起作用吗?作为最后的手段,我会进行全新安装。

(针对评论中提出的解决方案进行了更新)文件夹/media/zorz/Data/是一个空文件夹。如果我按照建议单击 Nautilus 中的分区,我再次收到相同的错误。exfat 支持在发布此信息之前已更新,但仍然没有任何改进,错误仍然存​​在。

umount

zorz@zorz-LIFEBOOK-E554:~$ sudo umount /media/zorz/Data
umount: /media/zorz/Data: not mounted

zorz@zorz-LIFEBOOK-E554:~$ sudo umount /dev/sda6
umount: /dev/sda6: not mounted

fstab和中mtab,没有对 sda6 的引用。该命令没有输出。 、和mount -a的输出包含以下内容:mountudisks --dumplsblk

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/sda8 during installation
UUID=527ea26f-c915-47a9-af81-248d56f41b9d /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda2 during installation
UUID=4CF8-0068  /boot/efi       vfat    defaults        0       1
# swap was on /dev/sda9 during installation
UUID=4c6dc5ae-7633-4913-bfce-c0c4cb724c0c none            swap    sw              0       0

mtab

/dev/sda2 /boot/efi vfat rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0
systemd /sys/fs/cgroup/systemd cgroup rw,noexec,nosuid,nodev,none,name=systemd 0 0

mount

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=6082360k,nr_inodes=1520590,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=1219396k,mode=755)
/dev/sda8 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
none on /sys/fs/cgroup type tmpfs (rw,relatime,size=4k,mode=755)
none on /sys/fs/fuse/connections type fusectl (rw,relatime)
none on /sys/kernel/debug type debugfs (rw,relatime)
none on /sys/kernel/security type securityfs (rw,relatime)
none on /sys/firmware/efi/efivars type efivarfs (rw,relatime)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
none on /run/shm type tmpfs (rw,nosuid,nodev,relatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,relatime,size=102400k,mode=755)
none on /sys/fs/pstore type pstore (rw,relatime)
/dev/sda2 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

udisks --dump

========================================================================
Showing information for /org/freedesktop/UDisks/devices/sda6
  native-path:                 /sys/devices/pci0000:00/0000:00:1f.2/ata5/host4/target4:0:0/4:0:0:0/block/sda/sda6
  device:                      8:6
  device-file:                 /dev/sda6
    presentation:              /dev/sda6
    by-id:                     /dev/disk/by-id/ata-TOSHIBA_MQ01ABF050_85TKC1GHT-part6
    by-id:                     /dev/disk/by-id/wwn-0x5000039673c8afb8-part6
    by-id:                     /dev/disk/by-uuid/5A82-0E81
    by-path:                   /dev/disk/by-path/pci-0000:00:1f.2-ata-5-part6
  detected at:                 Fri 31 Jan 2020 01:14:53 AM CET
  system internal:             1
  removable:                   0
  has media:                   1 (detected at Fri 31 Jan 2020 01:14:53 AM CET)
    detects change:            0
    detection by polling:      0
    detection inhibitable:     0
    detection inhibited:       0
  is read only:                0
  is mounted:                  0
  mount paths:             
  mounted by uid:              0
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  automount hint:              
  size:                        107374182400
  block size:                  512
  job underway:                no
  usage:                       filesystem
  type:                        exfat
  version:                     1.0
  uuid:                        5A82-0E81
  label:                       Data
  partition:
    part of:                   /org/freedesktop/UDisks/devices/sda
    scheme:                    gpt
    number:                    6
    type:                      EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
    flags:                    
    offset:                    149622358016
    alignment offset:          0
    size:                      107374182400
    label:                     Basic data partition
    uuid:                      0636A8B6-8189-400C-B410-4EA200FC4B70

========================================================================

lsblk

zorz@zorz-LIFEBOOK-E554:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk 
├─sda1   8:1    0     1G  0 part 
├─sda2   8:2    0     1G  0 part /boot/efi
├─sda3   8:3    0   128M  0 part 
├─sda4   8:4    0  57.2G  0 part 
├─sda5   8:5    0    80G  0 part 
├─sda6   8:6    0   100G  0 part 
├─sda7   8:7    0    15G  0 part 
├─sda8   8:8    0 205.5G  0 part /
└─sda9   8:9    0   5.9G  0 part [SWAP]
sr0     11:0    1  1024M  0 rom

答案1

您的 mtab 文件看起来不完整。从 14.04 升级到 16.04 的人提交了一些错误,看起来使用 14.04 设置可能无法正确更新 mtab。

比较14.04 的安装手册页16.04 的安装手册页表明文件发生了变化/etc/mtab

14.04 使用“真正的 mtab 文件”,而 16.04 使用符号链接/proc/mounts/proc/self/mounts

mtab首先,通过运行以下命令备份现有文件:

sudo cp /etc/mtab /etc/mtabbackup

然后,通过运行以下命令创建符号链接/proc/self/mounts(确保复制并粘贴此命令或确保不要在这里颠倒顺序,因为这很重要!):

sudo ln -fs /proc/self/mounts /etc/mtab

现在,您可以查看是否可以挂载或卸载该分区,或者重新启动并重试。

相关内容