Skip to content

07 Extra disks ​

A VM with a bigger root disk, a virtio data disk and an NVMe disk, formatted and mounted by cloud-init.

What you practice ​

  • Disk buses: virtio (/dev/vdX) and nvme (/dev/nvmeXn1)
  • size on an overlay (a bigger root disk) and on a new .asif file
  • cloud-init fs_setup and mounts

Topology ​

NodeImageCPUs / memoryAddressesRole
storedebian-131 / 1GiBmgmt 10.107.0.11Root 32GiB, /data 8GiB, /fast 4GiB

Before you start ​

bash
vz image pull disk debian-13

Run it ​

bash
cd examples/07-extra-disks
vz validate
vz up
vz node ls
ssh lab@10.107.0.11        # password: lab

Try it ​

bash
ssh lab@10.107.0.11 'lsblk; df -h / /data /fast'
ssh lab@10.107.0.11 'sudo dd if=/dev/zero of=/fast/test bs=1M count=512 oflag=direct status=progress'
ls -lh data.asif fast.asif     # ASIF files only grow as the guest writes

Clean up ​

bash
vz down
vz destroy --yes   # deletes the overlays and state of this lab