Skip to content

Instantly share code, notes, and snippets.

@joseivanlopez
Last active May 2, 2019 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joseivanlopez/2a8733c0324d68c4122ef87f4d2d0905 to your computer and use it in GitHub Desktop.
Save joseivanlopez/2a8733c0324d68c4122ef87f4d2d0905 to your computer and use it in GitHub Desktop.

MD

  • no dasds, bios raids, mds, strays, encryptions, bcaches, lvs

  • disks, multipaths

    • no partitions
    • not in vg, md, multipath, bcache, cset [+ btrfs]
    • not formatted
    • not mounted
  • partitions

    • not in vg, md, multipath, bcache, cset [+ btrfs]

    • not formatted

    • not mounted

    • not from raid

    • not extended

    • id is linux_system

new check

  • available_devices
    • [dasds, bios raids, mds, strays, encryptions, bcaches, lvs]
    • id != linux_system
    • partition from raid

VG

  • no dasds, strays, encryptions, bcaches, lvs

  • disks, multipaths, bios raid, mds

    • no partitions
    • not in vg, md, multipath, bcache, cset [+ btrfs]
    • not formatted
    • not mounted
  • partitions

    • not in vg, md, multipath, bcache, cset [+ btrfs]
    • not formatted
    • not mounted
    • id is linux_system

new check

  • available_devices
    • [dasds, strays, encryptions, bcaches, lvs]
    • id != linux_system

Bcache

  • no encryptions, bcaches

  • blk devices (disks, multipaths, dasds, strays, partitions, lvs)

    • not in vg, md, multipath, bcache, cset [+ btrfs]

    • not formatted and mounted

    • no partitions

    • no extended partition

    • not part of bcache

new check

  • available_devices
    • [bcaches]
    • partition from bcache

Btrfs

  • available_devices

available_devices

  • blk devices (disks, multipaths, dasds, strays, partitions, lvs)
    • not in vg, md, multipath, bcache, cset [+ btrfs]
    • not formatted and mounted
    • no partitions
    • no extended partition
    • size > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment