I have seen at least 3 different ways to view attached disks in FreeBSD. Is one more likely to succeed in detecting disks than the others? Here are the three that I know about:

camcontrol devlist

geom disk list

sysctl kern.disks

and a 4th seemingly more passive approach that doesn't seem ideal:

  • 3
    Are you actually trying to solve a problem? – Michael Hampton Apr 20 '19 at 3:54

You can cat /var/run/devd.pipe to listen of various device related events. These include creating of disk GEOM's, so you don't have to poll geom disk list command.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.