USB 外部硬盘驱动器无法在启动时安装

USB 外部硬盘驱动器无法在启动时安装

服务器操作系统:Debian Stretch

fdisk -lhttp://paste.debian.net/932334

文件系统http://paste.debian.net/932336

journalctl -xb paste.debian.net / 932337

zoneminder:wiki.zoneminder.com/使用专用硬盘

我尝试了所有方法,从指定 fstab 中显示的 UUID 到将硬盘定义为 fdisk 中显示的 /dev/sdb1。无论我做什么,结果都是一样的:参见第 877-900 行(journalctl log)。我需要驱动器在启动时自动挂载,以便 zoneminder 服务可以利用它。

日志:

-- The start-up result is done.
May 13 17:00:58 dvr systemd[1]: dev-disk-by\x2duuid-803EA0A4\x2d2592\x2d4258\x2d9820\x2d242ECA6038AA.device: Job dev-disk-by\x2duuid-803EA0A4\x2d2592\x2d4258\x2d9820\x2d242ECA6038AA.device/start timed out.
May 13 17:00:58 dvr systemd[1]: Timed out waiting for device dev-disk-by\x2duuid-803EA0A4\x2d2592\x2d4258\x2d9820\x2d242ECA6038AA.device.
-- Subject: Unit dev-disk-by\x2duuid-803EA0A4\x2d2592\x2d4258\x2d9820\x2d242ECA6038AA.device has failed
-- Defined-By: systemd

-- 
-- Unit dev-disk-by\x2duuid-803EA0A4\x2d2592\x2d4258\x2d9820\x2d242ECA6038AA.device has failed.
-- 
-- The result is timeout.
May 13 17:00:58 dvr systemd[1]: Dependency failed for /media/external.
-- Subject: Unit media-external.mount has failed
-- Defined-By: systemd

-- 
-- Unit media-external.mount has failed.
-- 
-- The result is dependency.
May 13 17:00:58 dvr systemd[1]: Dependency failed for Local File Systems.
-- Subject: Unit local-fs.target has failed
-- Defined-By: systemd

-- 
-- Unit local-fs.target has failed.
-- 
-- The result is dependency.
May 13 17:00:58 dvr systemd[1]: local-fs.target: Job local-fs.target/start failed with result 'dependency'.
May 13 17:00:58 dvr systemd[1]: local-fs.target: Triggering OnFailure= dependencies.
May 13 17:00:58 dvr systemd[1]: media-external.mount: Job media-external.mount/start failed with result 'dependency'.
May 13 17:00:58 dvr systemd[1]: dev-disk-by\x2duuid-803EA0A4\x2d2592\x2d4258\x2d9820\x2d242ECA6038AA.device: Job dev-disk-by\x2duuid-803EA0A4\x2d2592\x2d4258\x2d9820\x2d242ECA6038AA.device/start failed with result 'timeout'.
May 13 17:00:58 dvr systemd[1]: Started ifup for enp1s10.
-- Subject: Unit [email protected] has finished start-up
-- Defined-By: systemd

答案1

看起来您正在使用磁盘标识符(Disk identifier: 803EA0A4-2592-4258-9820-242ECA6038AA来自fdisk -l输出)作为文件系统标识符(UUID=在 fstab 中)。它们并不相同,并且不可互换。

您可以通过以下方式找到文件系统标识符ls -l /dev/disk/by-uuid | grep sdb1。输出将类似于:

lrwxrwxrwx 1 root root 10 Mar 30 17:09 66629b27-c8cc-4919-b9e3-3aa494e4a7f0 -> ../../sdb1

66629b27-c8cc-4919-b9e3-3aa494e4a7f0是文件系统 uuid 以及您UUID=在 中输入的内容/etc/fstab

相关内容