Topic review - FreeBSD: List disk drives and re-scan after adding hot-add disk (in virtual environments)
Author
Message
admin
Post subject: FreeBSD: List disk drives and re-scan after adding hot-add disk (in virtual environments) | Posted: Fri Sep 15, 2017 2:14 am
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.
When FreeBSD runs as a Guest Operating System in Vmware ESXi or other hypervisor, disks can be hot added (without powering off the system).
[b]List available disk in FreeBSD.[/b] [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)[/code]
After new disk has been added to the virtual machine, [b]rescan FreeBSD for new drives:[/b] [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)[/code]
Now [b]/dev/da2[/b] block device has been added and ready to create a new filesystem or add to ZFS pool.