Some new FreeBSD/EC2 features: EFS automount and ebsnvme-idAs my regular readers will be aware, I've been working on and gradually improving FreeBSD/EC2 for many years. Recently I've added two new features, which are available in the weekly HEAD and 12-STABLE snapshots and will appear in releases starting from 12.2-RELEASE.
The first of these features is automounting Amazon Elastic File System filesystems. For those of you not familiar with it, Amazon EFS is essentially NFS-as-a-service; it provides a POSIX filesystem with scalable performance, replicated across Availability Zones. To use EFS automounting, specify it in the automounter configuration and enable the automounter
# echo '/efs -efs' > /etc/auto_master # sysrc autofs_enable="YES"then either reboot or start the required services
# service automountd start # service autounmountd start # service automount startHaving done this, any access to the path /efs/FSID (e.g., /efs/fs-01234567) will automatically and transparently mount that filesystem.
This feature is long overdue — I had intended to add this three years ago after Rick Macklem and I got FreeBSD's NFS code working with Amazon EFS — and really just comes down to a single script (/etc/autofs/special_efs) which implements the -efs automount map. That said — overdue or not, trivial or not — I think this will be a useful feature.
The second feature is the addition of ebsnvme-id and the new /dev/aws/disk tree. Users of Amazon Linux may be familiar with ebsnvme-id; this is a utility which prints information about the disks attached to EC2 "Nitro" instances (where they are exposed as NVMe devices). In particular, the ebsnvme-id tool allows you to see the EBS volume ID of EBS volumes and the "Linux device name" which was specified when the volume was attached — which is not particularly meaningful on FreeBSD, but theoretically knowing that /dev/nda1 was attached via the EC2 API as "/dev/sdh" might be useful?
The ebsnvme-id which I wrote for FreeBSD is compatible with the version in Amazon Linux but has some additional functionality: You can also ask it about "Instance Store" (aka. "Ephemeral") disks, for which it will identify the disk serial number.
Using the tool and some devd magic, FreeBSD now maintains a tree under /dev/aws/disk containing the symlinks of the forms
I hope these new features prove useful to FreeBSD users! If you'd like to support my continuing work on the FreeBSD/EC2 platform, please consider contributing to my FreeBSD/EC2 Patreon; it's much easier to justify taking time away from my day job when it feels like people appreciate my work!