亲爱的,我正在努力解决 usbmount 问题。我拥有:
- 外部 USB 驱动器,NTFS,在 Windows 下使用。非空
我目前所做的:
- 尝试了 usbmount、udev 和 autofs 的一些方法,主要是:https://linuxconfig.org/automatically-mount-usb-external-drive-with-autofs
现在,当我挂载我的 USB 设备(自动或手动尝试)时,挂载文件夹显示为空:
martin@cmserver:/media/usb0$ ls -l
total 0
根据日志,usbmount 似乎已完成并安装我的设备:
Mar 12 22:54:30 cmserver kernel: [ 5751.681507] scsi 6:0:0:0: Direct-Access Seagate Expansion Desk 0915 PQ: 0 ANSI: 6
Mar 12 22:54:30 cmserver kernel: [ 5751.682778] sd 6:0:0:0: Attached scsi generic sg3 type 0
Mar 12 22:54:30 cmserver mtp-probe: checking bus 5, device 5: "/sys/devices/pci0000:00/0000:00:1c.6/0000:04:00.0/usb5/5-2"
Mar 12 22:54:30 cmserver mtp-probe: bus: 5, device: 5 was not an MTP device
Mar 12 22:54:30 cmserver mtp-probe: checking bus 5, device 5: "/sys/devices/pci0000:00/0000:00:1c.6/0000:04:00.0/usb5/5-2"
Mar 12 22:54:30 cmserver mtp-probe: bus: 5, device: 5 was not an MTP device
Mar 12 22:54:44 cmserver kernel: [ 5765.776961] sd 6:0:0:0: [sdd] 15628053167 512-byte logical blocks: (8.00 TB/7.28 TiB)
Mar 12 22:54:44 cmserver kernel: [ 5765.776964] sd 6:0:0:0: [sdd] 4096-byte physical blocks
Mar 12 22:54:44 cmserver kernel: [ 5765.777122] sd 6:0:0:0: [sdd] Write Protect is off
Mar 12 22:54:44 cmserver kernel: [ 5765.777124] sd 6:0:0:0: [sdd] Mode Sense: 53 00 00 08
Mar 12 22:54:44 cmserver kernel: [ 5765.777421] sd 6:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Mar 12 22:54:44 cmserver kernel: [ 5765.778521] sd 6:0:0:0: [sdd] Optimal transfer size 33553920 bytes not a multiple of physical block size (4096 bytes)
Mar 12 22:54:45 cmserver kernel: [ 5766.164639] sdd: sdd1 sdd2
Mar 12 22:54:45 cmserver kernel: [ 5766.167097] sd 6:0:0:0: [sdd] Attached SCSI disk
Mar 12 22:54:45 cmserver multipath: sdd: can't store path info
Mar 12 22:54:45 cmserver usbmount[42190]: loaded usbmount configurations
Mar 12 22:54:45 cmserver usbmount[42190]: trying to acquire lock /var/run/usbmount/.mount.lock
Mar 12 22:54:45 cmserver usbmount[42190]: acquired lock /var/run/usbmount/.mount.lock
Mar 12 22:54:45 cmserver usbmount[42190]: /dev/sdd does not contain a filesystem or disklabel
Mar 12 22:54:45 cmserver systemd-udevd[42167]: sdd: Process '/usr/share/usbmount/usbmount add' failed with exit code 1.
Mar 12 22:54:45 cmserver multipathd[652]: uevent trigger error
Mar 12 22:54:45 cmserver usbmount[42231]: loaded usbmount configurations
Mar 12 22:54:45 cmserver usbmount[42231]: trying to acquire lock /var/run/usbmount/.mount.lock
Mar 12 22:54:45 cmserver usbmount[42231]: acquired lock /var/run/usbmount/.mount.lock
Mar 12 22:54:45 cmserver usbmount[42231]: /dev/sdd1 does not contain a filesystem or disklabel
Mar 12 22:54:45 cmserver systemd-udevd[42167]: sdd1: Process '/usr/share/usbmount/usbmount add' failed with exit code 1.
Mar 12 22:54:45 cmserver usbmount[42267]: loaded usbmount configurations
Mar 12 22:54:45 cmserver usbmount[42267]: trying to acquire lock /var/run/usbmount/.mount.lock
Mar 12 22:54:45 cmserver usbmount[42267]: acquired lock /var/run/usbmount/.mount.lock
Mar 12 22:54:45 cmserver usbmount[42267]: /dev/sdd2 contains filesystem type ntfs
Mar 12 22:54:45 cmserver usbmount[42267]: mountpoint /media/usb0 is available for /dev/sdd2
Mar 12 22:54:45 cmserver usbmount[42267]: executing command: mount -tntfs -osync,noexec,nodev,noatime,nodiratime /dev/sdd2 /media/usb0
Mar 12 22:54:47 cmserver ntfs-3g[42300]: Version 2017.3.23AR.3 integrated FUSE 28
Mar 12 22:54:47 cmserver ntfs-3g[42300]: Mounted /dev/sdd2 (Read-Write, label "Dagobert", NTFS 3.1)
Mar 12 22:54:47 cmserver ntfs-3g[42300]: Cmdline options: rw,sync,noexec,nodev,noatime,nodiratime
Mar 12 22:54:47 cmserver ntfs-3g[42300]: Mount options: sync,noexec,nodev,nodiratime,allow_other,nonempty,noatime,rw,fsname=/dev/sdd2,blkdev,blksize=4096
Mar 12 22:54:47 cmserver ntfs-3g[42300]: Ownership and permissions disabled, configuration type 7
Mar 12 22:54:47 cmserver usbmount[42267]: executing command: run-parts /etc/usbmount/mount.d
Mar 12 22:54:47 cmserver usbmount[42267]: usbmount execution finished
我觉得这一行看起来不错:
executing command: mount -tntfs -osync,noexec,nodev,noatime,nodiratime /dev/sdd2 /media/usb
/media 中的 ls -l 显示:
lrwxrwxrwx 1 root root 4 Mar 5 21:00 usb -> usb0
drwxr-xr-x 2 root root 4096 Mar 5 21:00 usb0
drwxr-xr-x 2 root root 4096 Mar 5 21:00 usb1
drwxr-xr-x 2 root root 4096 Mar 5 21:00 usb2
drwxr-xr-x 2 root root 4096 Mar 5 21:00 usb3
drwxr-xr-x 2 root root 4096 Mar 5 21:00 usb4
drwxr-xr-x 2 root root 4096 Mar 5 21:00 usb5
drwxr-xr-x 2 root root 4096 Mar 5 21:00 usb6
drwxr-xr-x 2 root root 4096 Mar 5 21:00 usb7
因此,我正在寻找帮助,如何查看 USB 驱动器上的文件和文件夹