Skip to content

Commit

Permalink
Add force to mkfs.ext4 in encrypted ephemeral
Browse files Browse the repository at this point in the history
To avoid errors caused by the detection of a partition when formatting ephemeral drive
  • Loading branch information
francesco-giordano authored and lukeseawalker committed Feb 23, 2022
1 parent 3021a6d commit d7b6763
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion files/default/setup-ephemeral-drives.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function setup_ephemeral_drives () {
chmod 0400 /root/keystore/keyfile || RC=1
cryptsetup -q luksFormat /dev/vg.01/lv_ephemeral /root/keystore/keyfile || RC=1
cryptsetup -d /root/keystore/keyfile luksOpen /dev/vg.01/lv_ephemeral ephemeral_luks || RC=1
mkfs.ext4 /dev/mapper/ephemeral_luks || RC=1
mkfs.ext4 -F /dev/mapper/ephemeral_luks || RC=1
mount -v -t ext4 -o noatime,nodiratime /dev/mapper/ephemeral_luks ${cfn_ephemeral_dir} || RC=1
else
mkfs.ext4 /dev/vg.01/lv_ephemeral || RC=1
Expand Down

0 comments on commit d7b6763

Please sign in to comment.