In my previous post https://www.wojcieh.net/my-new-home-lab/ I showed you my new homelab. It was configured having in mind single node vSAN to leverage caching for I/O. Today I will show you how to configure all-flash vSAN from command line.
- To configure single node all-flash vSAN we first must identify the disks we will use.
- Login to ESXi via SSH and execute command vdq -q. This command will list all available disks to be used.
|
|
- In my case I’ve got two disks - 256GB NVME which will be used as flash tier and 2TB SSD as a capacity tier.
- Once we identified our disks we must tag the 2TB disk as a capacity disk
1
esxcli vsan storage tag add -t capacityFlash -d t10.ATA_____Crucial_CT2050MX300SSD1_________________________1651150F2144
- In the next step we will add 256GB NVME disk as a flash device.
1
esxcli vsan storage add -s t10.NVMe____WDC_WDS256G1X0C2D00ENX0__________________B10A46444A441B00 -d t10.ATA_____Crucial_CT2050MX300SSD1_________________________1651150F2144
- In the next step, we will create vSAN Cluster.
1
esxcli vsan cluster new
- Once vSAN Cluster is enabled we must change default vSAN policies to allow us to deploy virtual machines.
1 2 3 4 5
esxcli vsan policy setdefault -c cluster -p "((\"hostFailuresToTolerate\" i0) (\"forceProvisioning\" i1))" esxcli vsan policy setdefault -c vdisk -p "((\"hostFailuresToTolerate\" i0) (\"forceProvisioning\" i1))" esxcli vsan policy setdefault -c vmnamespace -p "((\"hostFailuresToTolerate\" i0) (\"forceProvisioning\" i1))" esxcli vsan policy setdefault -c vmswap -p "((\"hostFailuresToTolerate\" i0) (\"forceProvisioning\" i1))" esxcli vsan policy setdefault -c vmem -p "((\"hostFailuresToTolerate\" i0) (\"forceProvisioning\" i1))"
- Now we can deploy virtual machines.