Here are the steps you can follow to set up your Kingston DataTraveller Max Type-A 256GB USB stick as a datastore for your VMs on Raspberry Pi 4:
Connect the USB stick to the Raspberry Pi 4 and wait for it to be detected.
Open a terminal window on the Raspberry Pi and run the command sudo fdisk -l to list all connected storage devices. Make a note of the device name of the USB stick (e.g. /dev/sda).
Run the command sudo parted /dev/sda to start the partition editor for the USB stick. Replace /dev/sda with the correct device name if it's different.
In the parted command prompt, enter mklabel gpt to create a new GPT partition table on the USB stick.
Next, create a new partition on the USB stick by entering mkpart primary ext4 0% 100%.
Once the partition is created, exit the parted prompt by entering quit.
Format the newly created partition as an ext4 file system by running the command sudo mkfs.ext4 /dev/sda1. Replace /dev/sda1 with the correct partition name if it's different.
Create a new directory to use as a mount point for the USB stick by running the command sudo mkdir /mnt/usb.
Mount the USB stick partition to the new directory by running the command sudo mount /dev/sda1 /mnt/usb. Again, replace /dev/sda1 with the correct partition name if it's different.
To ensure that the USB stick partition is mounted automatically at boot time, edit the /etc/fstab file by running the command sudo nano /etc/fstab and add the following line to the end of the file:
/dev/sda1 /mnt/usb ext4 defaults 0 2
Save and exit the file by pressing Ctrl+X, then Y, then Enter.
11. Finally, restart the Raspberry Pi to make sure the changes take effect by running the command sudo reboot.
Once you have completed these steps, your Kingston DataTraveller Max Type-A 256GB USB stick should be set up as a datastore for your VMs on Raspberry Pi 4. You can test it by creating a new virtual machine and selecting the USB stick as the storage device.
Hello,
I would like to set up a USB stick (Kingston DataTraveller Max Type-A 256GB) on my Raspberry Pi 4 8GB as a datastore for my VMs. Currently I am using an NFS share on my Synology NAS for this. I have also tested other sticks, even the same type stick I boot the Raspberry PI from, but none of the sticks show up in storage management.
Does anyone have a tip for me on how to configure this?