online resizing NVME drives?

Chuck Tuffli chuck at tuffli.net
Tue Apr 2 21:40:38 UTC 2019


On Tue, Apr 2, 2019 at 1:11 PM John Nielsen <lists at jnielsen.net> wrote:
>
> Hi all-
>
> Obviously this wouldn't make sense for physical NVME hardware, but when running on e.g. bhyve or AWS EC2 it's nice to be able to resize volumes and filesystems without needing to reboot the (virtual) system. I'm pretty sure that's do-able with SCSI, AHCI SATA and virtio-block devices but I don't see a way to do it with NVME. Am I missing something or do we need to implement something along the lines of "nvmecontrol rescan"?
>
> I'm experimenting with FreeBSD 12.0-RELEASE on a c5n.large AWS ec2 instance. Like most (all?) of the c5 instance types the disks are all presented as NVME devices even if they are actually backed by EBS. I started one instance with a 10GB root volume but then decided I wanted to make it bigger. I grew the volume on the AWS side no problem. When I did so I got this kernel message:
> nvme0: async event occurred (type 0x2, info 0x00, page 0x00)

FWIW, this is a "Namespace Attribute Changed" event from the NVMe
Controller. Are you using nvd as the disk driver? If so, can you try
nda as that appears to support the XPT_SCAN_* events.

--chuck


More information about the freebsd-hackers mailing list