I have to design an appliance to accept "foreign" disks (sd(4) and wd(4)) and 
massage them into a form/content suitable for deployment (in yet another 
appliance).

My understanding is that the 'd' partition is intended to reference the entire 
medium.  But, a simple test (disklabel -e) indicates that I can create an 
arbitrary (start,size) for that partition.  So, I could potentially encounter a 
foreign disk that happens to *look* like it has a 'd' partition that doesn't 
map to the actual entire physical disk.

How can I get the actual geometry and ensure any bogus label contents are 
obliterated (i.e., overwriting the entire medium regardless of the "protected" 
MBR/label space)?

Related but different question:  is there any support for hot-plugging 
(unplugging) drives (other than USB) on NetBSD?  I know you can kludge this 
with external SCSI drives if the i/f is quiescent and you then rescan the 
appropriate scsibus.  But, how does SATA/SAS cope?

Reply via email to