I have a coreos machine that, as part of its boot process, mounts an encrypted external hard drive. In the past few days, the mount of the external drive has started failing. I'm specifically seeing that os can't create the decrypted mount point because the UUID isn't being found.
$ systemctl status systemd-cryptsetup@secure.service
● systemd-cryptsetup@secure.service - Cryptography Setup for secure
Loaded: loaded (/etc/crypttab; generated)
Active: inactive (dead)
Docs: man:crypttab(5)
man:systemd-cryptsetup-generator(8)
man:systemd-cryptsetup@.service(8)
Oct 21 19:55:49 coreosbox systemd[1]: Dependency failed for Cryptography Setup for secure.
Oct 21 19:55:49 coreosbox systemd[1]: systemd-cryptsetup@secure.service: Job systemd-cryptsetup@secure.service/start failed with result 'dependency'.
$ systemctl cat systemd-cryptsetup@secure.service
...
ExecStart=/usr/lib/systemd/systemd-cryptsetup attach 'secure' '/dev/disk/by-uuid/<uuid>' '/path/to/.secure-passphrase' 'nofail'
...
After some plugging and unplugging I eventualy get fdisk to recognize that there is a disk there, but there is no indication of a uuid for the drive.
core@coreosbox /dev $ sudo fdisk -l sdc
Disk sdc: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Disk model: 000-1HJ166
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: <long-short-short-short-long>
Device Start End Sectors Size Type
sdc1 2048 5860533134 5860531087 2.7T Linux RAID
And if I wait a couple of minutes, I get that the partition does not start on a physical sector boundary.
core@coreosbox /dev $ sudo fdisk -l sdc
Disk sdc: 2.7 TiB, 3000592982016 bytes, 5860533168 sectors
Disk model: 000-1HJ166
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
sdc1 1 4294967295 4294967295 2T ee GPT
Partition 1 does not start on physical sector boundary.
I'm having trouble interpreting what this could mean or how to fix the problem. Does this mean that the drive has been corrupted somehow? Is there some way to force the os to think that the drive has the previous, known uuid?
User contributions licensed under CC BY-SA 3.0