Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides
https://forum.ivorde.com/

FreeBSD: List disk drives and re-scan after adding hot-add disk (in virtual environments)
https://forum.ivorde.com/freebsd-list-disk-drives-and-re-scan-after-adding-hot-add-disk-in-virtual-environments-t20008.html
Page 1 of 1

Author:  admin [ Fri Sep 15, 2017 2:14 am ]
Post subject:  FreeBSD: List disk drives and re-scan after adding hot-add disk (in virtual environments)

When FreeBSD runs as a Guest Operating System in Vmware ESXi or other hypervisor, disks can be hot added (without powering off the system).

List available disk in FreeBSD.
Code:
$ sudo camcontrol devlist
<NECVMWar VMware IDE CDR10 1.00>   at scbus1 target 0 lun 0 (cd0,pass0)
<VMware Virtual disk 1.0>          at scbus2 target 0 lun 0 (da0,pass1)
<VMware Virtual disk 1.0>          at scbus2 target 1 lun 0 (da1,pass2)


After new disk has been added to the virtual machine, rescan FreeBSD for new drives:
Code:
$ sudo camcontrol rescan all
Re-scan of bus 0 was successful
Re-scan of bus 1 was successful
Re-scan of bus 2 was successful
Re-scan of bus 3 was successful
$ sudo camcontrol devlist
<NECVMWar VMware IDE CDR10 1.00>   at scbus1 target 0 lun 0 (cd0,pass0)
<VMware Virtual disk 1.0>          at scbus2 target 0 lun 0 (da0,pass1)
<VMware Virtual disk 1.0>          at scbus2 target 1 lun 0 (da1,pass2)
<VMware Virtual disk 1.0>          at scbus2 target 2 lun 0 (pass3,da2)


Now /dev/da2 block device has been added and ready to create a new filesystem or add to ZFS pool.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/