`blkid` 显示两个交换,但我在 `/etc/fstab` 中只有一个

`blkid` 显示两个交换,但我在 `/etc/fstab` 中只有一个

我刚刚加密了我的交换文件,现在重新启动后,运行时我看到两个带有“交换”的设备列出blkid

/dev/loop0: UUID="82a141ee-b1fd-4d52-a1fb-c0690bed732e" TYPE="swap"
/dev/mapper/cryptswap1: UUID="3c73ab32-331e-47e7-8cb9-79f82ab41f5d" TYPE="swap"

这是否意味着我有两个交换文件,一个加密,一个未加密,或者这对于加密交换来说是否正常?

/etc/fstab只列出一个:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/nvme0n1p2 during installation
UUID=6135b409-f997-4289-895e-a0abb0617c2b /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/nvme0n1p1 during installation
UUID=757B-FF35  /boot/efi       vfat    umask=0077      0       1
#/swapfile none            swap    sw              0       0
/dev/mapper/cryptswap1 none swap sw 0 0

我的也一样/etc/crypttab

# <target name> <source device>         <key file>      <options>
cryptswap1 /swapfile /dev/urandom swap,offset=1024,cipher=aes-xts-plain64

并将fdisk -lu它们列为具有4GiB

Disk /dev/loop0: 4 GiB, 4294967296 bytes, 8388608 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/cryptswap1: 4 GiB, 4294443008 bytes, 8387584 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

相关内容