My FreeBSD VM was running out of space, so instead of expanding the existing partition, I’ve decided to add a new disk.
NOTE: If you want to add an IDE disk, you’ll have to power off the VM. For SCSI disk, the VM can stay up.
First, right-click the server name and choose Settings.
If you have the console open, you’ll see the port rescan right away. This is what showed up on my console, once I clicked Finish. The name of the disk is da0. The prefix da is reserved for SCSI disks and ad for IDE disks. So, if I added a second IDE disk, it would be ad1, because we already have ad0.
You can also see the drives if you type:
cd /data ls -l
You should see a .snap file. Create a test file.
touch test ls -l
You should be able to see the test file now.
If you reboot at this point and the server comes back, you won’t be able to see the file that you just created. The file is actually not lost, but the server doesn’t automatically mount any new file systems.
Finally, edit /etc/fstab using vi, nano or whatever your editor of choice is and put the following line just above the /cdrom or as a last line if you don’t have a CD-ROM. This will ensure that the new filesystem is mounted after reboots.
/dev/da0s1d /data ufs rw 2 2
If you need more info about the FStype, Options and the other values, type man fstab. I just used the same values as /usr and /var partitions.
Source: FreeBSD Handbook