![硬盘安装在 / 处,使用 MountManager 后重复安装硬盘](https://linux22.com/image/966154/%E7%A1%AC%E7%9B%98%E5%AE%89%E8%A3%85%E5%9C%A8%20%2F%20%E5%A4%84%EF%BC%8C%E4%BD%BF%E7%94%A8%20MountManager%20%E5%90%8E%E9%87%8D%E5%A4%8D%E5%AE%89%E8%A3%85%E7%A1%AC%E7%9B%98.png)
我运行的是 12.04 64 位。我的系统是 Ubuntu 和 Windows7 的双启动系统。两个操作系统都共享名为“Elements”的驱动器。
我的卷名为“Elements”,是一个 1TB SATA NTFS 硬盘,在 nautilus 的侧边栏中出现了两次。其中一个图标是可用的,旁边甚至还有方便的“弹出”图标。下面是 Nautilus 左侧菜单的图片,上面打开了系统监视器->文件系统选项卡。有人能告诉我如何去掉这个多余的图标吗?我认为这个问题比 Nautilus 的 GUI 故障要根深蒂固得多。
另一个图标什么也没做,只是在我单击它时弹出以下错误(下图)。只有在我尝试使用 Mount Manager 在启动时自动安装驱动器后才会发生这种情况。我已经卸载了 Mount Manager 并重新启动,但问题并没有消失。硬盘现在确实会自动安装,所以我想这很酷。但现在,每次我启动并打开 Nautilus 时,都会出现这两个图标,其中一个是虚构的和无用的。
根据上图和其他几个命令的输出,它似乎安装在
/
在这种情况下,无论我在 Nautilus 中的什么位置尝试单击该图标,当然它会告诉我该驱动器正在被另一个程序使用...鹦鹉螺。
我害怕尝试卸载这个硬盘 (sdb6),因为它似乎被挂载在某个位置。我有点菜鸟,我有一种直觉,告诉我尝试卸载 / 处的驱动器会毁掉我的整个文件系统。这篇文章最底部的“$ fsck”输出进一步增强了我的这种恐惧。
在 Nautilus 中单击第二个“Elements”硬盘时立即出现以下错误:
Unable to mount Elements
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.
我觉得很奇怪,上面的错误消息声称它是一个 NTFS 卷,而其他一切都告诉我它是一个 ext4 卷。实际的硬盘“Elements”实际上是一个 NTFS 卷。
以下是一些可能感兴趣的命令和配置文件的输出:
$ fuser-a /
/: 2120r 2159rc 2160rc 2172r 2178rc 2180rc 2188r 2191rc 2200rc 2203rc 2205rc 2206r 2211r 2212r 2214r 2220r 2228r 2234rc 2246rc 2249rc 2254rc 2260rc 2261r 2262r 2277rc 2287rc 2291rc 2311rc 2313rc 2332rc 2334rc 2339rc 2343rc 2344rc 2352rc 2372rc 2389rc 2422r 2490r 2496rc 2501rc 2566r 2573rc 2581rc 2589rc 2592r 2603r 2611rc 2613rc 2615rc 2678rc 2927r 2981r 3104rc 4156rc 4196rc 4206rc 4213rc 4240rc 4297rc 5032rc 7609r 7613r 7648r 9593rc 18829r 18833r 19776r
$ sudo df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb6 496G 366G 106G 78% /
udev 2.0G 4.0K 2.0G 1% /dev
tmpfs 791M 1.5M 790M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 672K 2.0G 1% /run/shm
/dev/sda1 932G 312G 620G 34% /media/Elements
/home/solderblob/.Private 496G 366G 106G 78% /home/solderblob
/dev/sdb2 188G 100G 88G 54% /media/A2B24EACB24E852F
/dev/sdb1 100M 25M 76M 25% /media/System Reserved
$ sudo fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00093cab
Device Boot Start End Blocks Id System
/dev/sda1 2048 1953519615 976758784 7 HPFS/NTFS/exFAT
Disk /dev/sdb: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000e8d9b
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sdb2 206848 392378768 196085960+ 7 HPFS/NTFS/exFAT
/dev/sdb3 392380414 1465147391 536383489 5 Extended
/dev/sdb5 1456762880 1465147391 4192256 82 Linux swap / Solaris
/dev/sdb6 392380416 1448374271 527996928 83 Linux
/dev/sdb7 1448376320 1456758783 4191232 82 Linux swap / Solaris
Partition table entries are not in disk order
$ cat /etc/fstab
# <file system> <mount point> <type> <options> <dump> <pass>
UUID=77039a2a-83d4-47a1-8a8c-a2ec4e4dfd0e / ext4 defaults 0 1
UUID=F6549CC4549C88CF /media/Elements ntfs-3g users 0 0
$ sudo blkid
/dev/sda1: LABEL="Elements" UUID="F6549CC4549C88CF" TYPE="ntfs"
/dev/sdb1: LABEL="System Reserved" UUID="5CDE130FDE12E156" TYPE="ntfs"
/dev/sdb2: UUID="A2B24EACB24E852F" TYPE="ntfs"
/dev/sdb6: UUID="77039a2a-83d4-47a1-8a8c-a2ec4e4dfd0e" TYPE="ext4"
$ sudo blkid -c /dev/null (看起来与上面的完全相同)
/dev/sda1: LABEL="Elements" UUID="F6549CC4549C88CF" TYPE="ntfs"
/dev/sdb1: LABEL="System Reserved" UUID="5CDE130FDE12E156" TYPE="ntfs"
/dev/sdb2: UUID="A2B24EACB24E852F" TYPE="ntfs"
/dev/sdb6: UUID="77039a2a-83d4-47a1-8a8c-a2ec4e4dfd0e" TYPE="ext4"
$ mount
/dev/sdb6 on / type ext4 (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
/dev/sda1 on /media/Elements type fuseblk (rw,noexec,nosuid,nodev,allow_other,blksize=4096)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
/home/solderblob/.Private on /home/solderblob type ecryptfs (ecryptfs_check_dev_ruid,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs,ecryptfs_sig=76a47b0175afa48d,ecryptfs_fnek_sig=391b2d8b155215f7)
gvfs-fuse-daemon on /home/solderblob/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=solderblob)
/dev/sdb2 on /media/A2B24EACB24E852F type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sdb1 on /media/System Reserved type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
$ ls -a
. A2B24EACB24E852F Ubuntu 12.04.1 LTS amd64
.. Elements System Reserved
$ cat /proc/mounts
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev devtmpfs rw,relatime,size=2013000k,nr_inodes=503250,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,relatime,size=809872k,mode=755 0 0
/dev/disk/by-uuid/77039a2a-83d4-47a1-8a8c-a2ec4e4dfd0e / ext4 rw,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
none /sys/fs/fuse/connections fusectl rw,relatime 0 0
none /sys/kernel/debug debugfs rw,relatime 0 0
none /sys/kernel/security securityfs rw,relatime 0 0
none /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
none /run/shm tmpfs rw,nosuid,nodev,relatime 0 0
/dev/sda1 /media/Elements fuseblk rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0
/home/solderblob/.Private /home/solderblob ecryptfs rw,relatime,ecryptfs_fnek_sig=391b2d8b155215f7,ecryptfs_sig=76a47b0175afa48d,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_sigs 0 0
gvfs-fuse-daemon /home/solderblob/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
/dev/sdb2 /media/A2B24EACB24E852F fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
/dev/sdb1 /media/System\040Reserved fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
gvfs-fuse-daemon /root/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=0,group_id=0 0 0
$ fsck
fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
/dev/sdb6 is mounted.
WARNING!!! The filesystem is mounted. If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.
Do you really want to continue<n>? no
check aborted.
答案1
这是解决方案。
而不是读取 /etc/fstab
UUID=F6549CC4549C88CF /media/Elements ntfs-3g users 0 0
将行更改为
/dev/disk/by-uuid/F6549CC4549C88CF /media/Elements ntfs-3g users 0 0
答案2
对我来说没用。users
通过更改选项nouser
就可以了。也就是说,
UUID=F6549CC4549C88CF /media/Elements ntfs-3g users 0 0