diff options
authorColin Percival <cperciva@FreeBSD.org>2020-04-27 21:44:02 +0000
committerColin Percival <cperciva@FreeBSD.org>2020-04-27 21:44:02 +0000
commitb9f767ebd2e5859ff158b201ca42bfad3f8170b9 (patch)
parent3eb7c1bf06d8e174be44b21a046caf5eda02de86 (diff)
Set use_nvd=0 in EC2 AMIs.
FreeBSD is in the process of switching from nvd(4) to nda(4) as the disk device front-end to NVMe. Changing the default in the kernel is tricky since existing systems may have /dev/nvd* hard-coded e.g. in /etc/fstab; however, there's no reason to not change the default in HEAD for *new* systems. At present I have no intention of MFCing this to stable branches, since someone might reasonably expect scripts they use for launching and configuring FreeBSD 12.1 instances to work with FreeBSD 12.2 AMIs, for example. Reviewed by: gjb, imp Relnotes: NVMe disks in EC2 instances launched from 13.0 and later now show up as nda(4) devices. Differential Revision: https://reviews.freebsd.org/D24583
Notes: svn path=/head/; revision=360396
1 files changed, 4 insertions, 0 deletions
diff --git a/release/tools/ec2.conf b/release/tools/ec2.conf
index 98bb6694ac77..147ee17a3609 100644
--- a/release/tools/ec2.conf
+++ b/release/tools/ec2.conf
@@ -98,6 +98,10 @@ vm_extra_pre_umount() {
# Load the kernel module for the Amazon "Elastic Network Adapter"
echo 'if_ena_load="YES"' >> ${DESTDIR}/boot/loader.conf
+ # Use the "nda" driver for accessing NVMe disks rather than the
+ # historical "nvd" driver.
+ echo 'hw.nvme.use_nvd="0"' >> ${DESTDIR}/boot/loader.conf
# Disable ChallengeResponseAuthentication according to EC2
# requirements.
sed -i '' -e \