From b9f767ebd2e5859ff158b201ca42bfad3f8170b9 Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Mon, 27 Apr 2020 21:44:02 +0000 Subject: 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 --- release/tools/ec2.conf | 4 ++++ 1 file changed, 4 insertions(+) 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 \ -- cgit v1.2.3