硬盘已解密

硬盘已解密

我已将系统设置为自动挂载加密的备份硬盘(通过磁盘实用程序设置)。

但是,每当我插入驱动器或启动系统时,我经常会收到这样的消息,说我的驱动器“已在使用中”:

在此处输入图片描述

Unable to mount 6.0 TB Encrypted
Error unlocking /dev/sda1: Command-line `cryptsetup 
luksOpen "/dev/sda1" "luks-backup"' exited with
non-zero exit status 5: Cannot use device /dev/sda1
which is in use (already mapped or mounted).

同样,在(罕见的)APT 操作中,系统会提示我输入其他加密驱动器的密码(同样会自动解密)。我通常只需按 即可跳过此操作,不会出现任何问题ENTER

有什么方法可以抑制这些消息吗?


我的加密驱动器的块树:

NAME                  MAJ:MIN RM  SIZE RO TYPE  MOUNTPOINT
sda                     8:0    0  7.3T  0 disk  
├─sda2                  8:2    0  1.8T  0 part  
│ └─luks-desktopfiles 253:4    0  1.8T  0 crypt /media/kazwolfe/Desktop Files
└─sda1                  8:1    0  5.5T  0 part  
  └─luks-backup       253:3    0  5.5T  0 crypt /media/kazwolfe/Backup

内容/etc/crypttab

nvme0n1p3_crypt UUID=[root uuid] none luks,discard
luks-backup UUID=[backup uuid] /etc/luks-keys/seagate-8tb nofail
luks-desktopfiles UUID=[desktopfiles uuid] /etc/luks-keys/seagate-8tb nofail

输出fdisk -l

Disk /dev/nvme0n1: 953.9 GiB, 1024209543168 bytes, 2000409264 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
Disklabel type: gpt
Disk identifier: 8911B09F-01FC-476C-93F8-B471069763E0

Device           Start        End    Sectors   Size Type
/dev/nvme0n1p1    2048    1050623    1048576   512M EFI System
/dev/nvme0n1p2 1050624    2050047     999424   488M Linux filesystem
/dev/nvme0n1p3 2050048 2000408575 1998358528 952.9G Linux filesystem


Disk /dev/mapper/nvme0n1p3_crypt: 952.9 GiB, 1023157469184 bytes, 1998354432 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 /dev/mapper/ubuntu--vg-root: 915.5 GiB, 983002251264 bytes, 1919926272 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 /dev/mapper/ubuntu--vg-swap_1: 15.8 GiB, 16995319808 bytes, 33193984 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 /dev/sda: 7.3 TiB, 8001563221504 bytes, 15628053167 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 33553920 bytes
Disklabel type: gpt
Disk identifier: 68831114-8BBF-478C-A7F9-1327B9D8733E

Device           Start         End     Sectors  Size Type
/dev/sda1         2048 11721805214 11721803167  5.5T Linux filesystem
/dev/sda2  11721805824 15628053133  3906247310  1.8T Linux filesystem


Disk /dev/mapper/luks-backup: 5.5 TiB, 6001529667584 bytes, 11721737632 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/luks-desktopfiles: 1.8 TiB, 1999965068800 bytes, 3906181775 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

还要注意的是,这些驱动器不一定总是“干净地”卸载,因为它们位于可移动媒体上。这可能是问题的一部分(即使通过重新启动)?

相关内容