Filesystem(s) on luks on lvm not mounting despite /etc confs
Posted: 2015/02/06 07:44:16
Hiya CentOS board - I've just gotten around to moving to CentOS7, and used the opportunity to reconfigure my disk layout on my home server (think frankenstein desktop - but with known good h/w).
Installed COS7 to a brand new SSD, and am now repurposing the older drives for storage partitions. I have two 75GB HDDs that I figure will be perfect as PVs for encrypted volumes.
So I added both HDDs as PVs, created a VG and added the HDDs, and then created the necessary LVs. On top of one LV, I've created a LUKS device. On the LUKS device, I created a 0x83 partition, then an xfs filesystem. Then I added the necessary values to /etc/crypttab and /etc/fstab to mount the filesystem at boot (given the correct LUKS password).
Problem is that the filesystem does not auto-mount at boot given the correct LUKS password.
Through testing, I've discovered that everything that should happen at boot, happens, but that for whatever reason the xfs filesystem is not seen by the kernel. I observed this by running 'lsblk -f' after boot, and the xfs filesystem is not listed. Then, I run 'partprobe', followed by 'lsblk -f', and the xfs filesystem is visible. And if the xfs filesystem is listed in /etc/fstab, it does in fact auto-mount upon 'partprobe' completing.
Why isn't the OS seeing the xfs partition at boot time to mount it? Why does manually running 'partprobe' after boot "fix" the issue? Is this a timing issue - noting that {b/r}oot are on an SSD and the LUKS drive is on HDD?
TL;DR: It seems like the kernel finishes booting before a LUKS-on-LVM-on-HDDs xfs partition can identify itself to an SDD-based kernel... what to do?
Installed COS7 to a brand new SSD, and am now repurposing the older drives for storage partitions. I have two 75GB HDDs that I figure will be perfect as PVs for encrypted volumes.
So I added both HDDs as PVs, created a VG and added the HDDs, and then created the necessary LVs. On top of one LV, I've created a LUKS device. On the LUKS device, I created a 0x83 partition, then an xfs filesystem. Then I added the necessary values to /etc/crypttab and /etc/fstab to mount the filesystem at boot (given the correct LUKS password).
Problem is that the filesystem does not auto-mount at boot given the correct LUKS password.
Through testing, I've discovered that everything that should happen at boot, happens, but that for whatever reason the xfs filesystem is not seen by the kernel. I observed this by running 'lsblk -f' after boot, and the xfs filesystem is not listed. Then, I run 'partprobe', followed by 'lsblk -f', and the xfs filesystem is visible. And if the xfs filesystem is listed in /etc/fstab, it does in fact auto-mount upon 'partprobe' completing.
Why isn't the OS seeing the xfs partition at boot time to mount it? Why does manually running 'partprobe' after boot "fix" the issue? Is this a timing issue - noting that {b/r}oot are on an SSD and the LUKS drive is on HDD?
TL;DR: It seems like the kernel finishes booting before a LUKS-on-LVM-on-HDDs xfs partition can identify itself to an SDD-based kernel... what to do?