14 Discovery of block devices

    Item key

    The item key to use in the is

    You may create discovery rules using this discovery item and:

    • filter: {#DEVNAME} matches - to discover devices named “sd0”, “sd1”, “sd2”, …
    • filter: {#DEVTYPE} matches disk AND {#DEVNAME} does not match ^loop.* - to discover disk type devices whose name does not start with “loop”

    Supported macros

    1. [
    2. {
    3. "{#DEVNAME}":"loop1",
    4. {
    5. "{#DEVNAME}":"dm-0",
    6. "{#DEVTYPE}":"disk"
    7. },
    8. {
    9. "{#DEVNAME}":"sda",
    10. },
    11. {
    12. "{#DEVNAME}":"sda1",
    13. "{#DEVTYPE}":"partition"
    14. }
    15. ]

    Block device discovery allows to use and vfs.dev.write[] items to create item prototypes using the {#DEVNAME} macro, for example:

    • “vfs.dev.read[{#DEVNAME},sps]“