FreeBSD as VMWare guest / disk resizing

Luke Bakken luke at bowbak.org
Tue Dec 18 01:21:00 UTC 2012


Hello everyone -

I'm looking for a way to get FreeBSD 8 / 9 to detect that an already
existing disk has grown. I have FreeBSD running as a guest within
vSphere ESX 5. Here is the output of camcontrol showing how the disks
are detected within the OS:

[root at QA1HWFBSD83201 ~]# camcontrol inquiry da0
pass0: <VMware Virtual disk 1.0> Fixed Direct Access SCSI-2 device
pass0: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Command
Queueing Enabled

In the VM settings I can increase the disk size but I can't seem to
find the right command within FreeBSD to force it to detect the new,
larger size without a reboot. 'camcontrol rescan all' works great to
detect a new drive but doesn't detect a larger disk. Within a Linux
distribution like Debian, the following command will detect the larger
drive:

echo 1 > /sys/class/scsi_device/0:0:0:0/device/rescan

I apologize if this has been answered in the archives or online but I
just haven't been able to get a definitive answer if this is possible,
and how.

Thanks so much in advance,
Luke


More information about the freebsd-questions mailing list