我有一个 luks 加密磁盘,我想在不使用时卸载并进入睡眠状态。
为此,我使用umount /mnt/4T
,cryptdisks_stop 4t_crypt
最后hdparm -y /dev/disk/by-uuid/dfafea2b-7678-445e-9ba8-b906ad63d01f
使磁盘处于睡眠状态。
然而,几分钟后磁盘再次旋转并重新安装,/mnt/4T
并在系统日志中显示以下内容:
Oct 17 11:56:17 micro systemd[1]: Starting Cryptography Setup for 4t_crypt...
Oct 17 11:56:17 micro systemd[1]: Starting Automatically fetch and run repair assertions...
Oct 17 11:56:17 micro snap-repair[19134]: error: cannot use snap-repair on a classic system
Oct 17 11:56:17 micro systemd[1]: Started Automatically fetch and run repair assertions.
Oct 17 11:56:26 micro systemd-cryptsetup[19129]: Set cipher aes, mode xts-plain64, key size 256 bits for device /dev/disk/by-uuid/dfafea2b-7678-445e-9ba8-b906ad63d01f.
Oct 17 11:56:28 micro systemd[1]: Started Cryptography Setup for 4t_crypt.
Oct 17 11:56:28 micro systemd[1]: Found device /dev/mapper/4t_crypt.
Oct 17 11:56:28 micro systemd[1]: Starting File System Check on /dev/mapper/4t_crypt...
Oct 17 11:56:28 micro systemd[1]: Started File System Check Daemon to report status.
Oct 17 11:56:28 micro systemd-fsck[19162]: /dev/mapper/4t_crypt: clean, 173313/244195328 files, 786566198/976754124 blocks
Oct 17 11:56:28 micro systemd[1]: Started File System Check on /dev/mapper/4t_crypt.
Oct 17 11:56:28 micro systemd[1]: Mounting /mnt/4T...
Oct 17 11:56:29 micro kernel: [2569601.089969] EXT4-fs (dm-3): mounted filesystem with ordered data mode. Opts: (null)
Oct 17 11:56:29 micro systemd[1]: Mounted /mnt/4T.
知道是什么原因造成的吗?似乎与修复断言有关,而修复断言又与 snap-repair 有关,但我没有找到任何解释该行为的信息。
答案1
对于处理相同问题的任何人来说 -noauto
在 fstab 和 crypttab 中添加标志似乎已经解决了这个问题。