{
    "mode": "man",
    "parameter": "BLKDEACTIVATE",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/man/BLKDEACTIVATE/json",
    "generated": "2026-10-22T12:34:05Z",
    "synopsis": "blkdeactivate [-d dmoptions] [-e] [-h] [-l lvmoptions] [-m mpathoptions] [-r\nmdraidoptions] [-o vdooptions] [-u] [-v] [device]",
    "sections": {
        "NAME": {
            "content": "blkdeactivate — utility to deactivate block devices\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "blkdeactivate [-d dmoptions] [-e] [-h] [-l lvmoptions] [-m mpathoptions] [-r\nmdraidoptions] [-o vdooptions] [-u] [-v] [device]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The  blkdeactivate  utility deactivates block devices. For mounted block devices, it attempts\nto unmount it automatically before trying to deactivate. The utility currently  supports  de‐\nvice-mapper devices (DM), including LVM volumes and software RAID MD devices. LVM volumes are\nhandled  directly  using the lvm(8) command, the rest of device-mapper based devices are han‐\ndled using the dmsetup(8) command.  MD devices are handled using the mdadm(8) command.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-d --dmoptions _",
                    "content": "Comma separated list of device-mapper specific options.  Accepted  dmsetup(8)  options\nare:\n\nretry  Retry removal several times in case of failure.\n\nforce  Force device removal.\n",
                    "flag": "-d",
                    "long": "--dmoptions"
                },
                {
                    "name": "-e --errors",
                    "content": "Show  errors reported from tools called by blkdeactivate. Without this option, any er‐\nror messages from these external tools are suppressed  and  the  blkdeactivate  itself\nprovides only a summary message to indicate the device was skipped.\n",
                    "flag": "-e",
                    "long": "--errors"
                },
                {
                    "name": "-h --help",
                    "content": "Display the help text.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-l --lvmoptions _",
                    "content": "Comma-separated list of LVM specific options:\n\nretry  Retry removal several times in case of failure.\n\nwholevg\nDeactivate  the whole LVM Volume Group when processing a Logical Volume.  Deac‐\ntivating the Volume Group as a whole is quicker than deactivating each  Logical\nVolume separately.\n",
                    "flag": "-l",
                    "long": "--lvmoptions"
                },
                {
                    "name": "-r --mdraidoptions _",
                    "content": "Comma-separated list of MD RAID specific options:\n\nwait   Wait  MD device's resync, recovery or reshape action to complete before deacti‐\nvation.\n",
                    "flag": "-r",
                    "long": "--mdraidoptions"
                },
                {
                    "name": "-m --mpathoptions _",
                    "content": "Comma-separated list of device-mapper multipath specific options:\n\ndisablequeueing\nDisable queueing on all multipath devices before deactivation.  This  avoids  a\nsituation  where blkdeactivate may end up waiting if all the paths are unavail‐\nable for any underlying device-mapper multipath device.\n",
                    "flag": "-m",
                    "long": "--mpathoptions"
                },
                {
                    "name": "-o --vdooptions _",
                    "content": "Comma-separated list of VDO specific options:\n\nconfigfile=file\nUse specified VDO configuration file.\n",
                    "flag": "-o",
                    "long": "--vdooptions"
                },
                {
                    "name": "-u --umount",
                    "content": "Unmount a mounted device before trying to deactivate it.  Without this option used,  a\ndevice that is mounted is not deactivated.\n",
                    "flag": "-u",
                    "long": "--umount"
                },
                {
                    "name": "-v --verbose",
                    "content": "Run in verbose mode. Use -vv for even more verbose mode.\n",
                    "flag": "-v",
                    "long": "--verbose"
                }
            ]
        },
        "EXAMPLES": {
            "content": "Deactivate all supported block devices found in the system, skipping mounted devices.\n# blkdeactivate\n\nDeactivate  all  supported  block devices found in the system, unmounting any mounted devices\nfirst, if possible.\n# blkdeactivate -u\n\nDeactivate the device /dev/vg/lvol0 together with all its holders, unmounting any mounted de‐\nvices first, if possible.\n# blkdeactivate -u /dev/vg/lvol0\n\nDeactivate all supported block devices found in the system. If the deactivation of a  device-\nmapper  device  fails, retry it. Deactivate the whole Volume Group at once when processing an\nLVM Logical Volume.\n# blkdeactivate -u -d retry -l wholevg\n\nDeactivate all supported block devices found in the system. If the deactivation of a  device-\nmapper device fails, retry it and force removal.\n# blkdeactivate -d force,retry\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "dmsetup(8), lsblk(8), lvm(8), mdadm(8), multipathd(8), vdo(8), umount(8)\n\nRed Hat, Inc                      LVM TOOLS 2.03.16(2) (2022-05-18)                 BLKDEACTIVATE(8)",
            "subsections": []
        }
    },
    "summary": "blkdeactivate — utility to deactivate block devices",
    "flags": [
        {
            "flag": "-d",
            "long": "--dmoptions",
            "arg": null,
            "description": "Comma separated list of device-mapper specific options. Accepted dmsetup(8) options are: retry Retry removal several times in case of failure. force Force device removal."
        },
        {
            "flag": "-e",
            "long": "--errors",
            "arg": null,
            "description": "Show errors reported from tools called by blkdeactivate. Without this option, any er‐ ror messages from these external tools are suppressed and the blkdeactivate itself provides only a summary message to indicate the device was skipped."
        },
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Display the help text."
        },
        {
            "flag": "-l",
            "long": "--lvmoptions",
            "arg": null,
            "description": "Comma-separated list of LVM specific options: retry Retry removal several times in case of failure. wholevg Deactivate the whole LVM Volume Group when processing a Logical Volume. Deac‐ tivating the Volume Group as a whole is quicker than deactivating each Logical Volume separately."
        },
        {
            "flag": "-r",
            "long": "--mdraidoptions",
            "arg": null,
            "description": "Comma-separated list of MD RAID specific options: wait Wait MD device's resync, recovery or reshape action to complete before deacti‐ vation."
        },
        {
            "flag": "-m",
            "long": "--mpathoptions",
            "arg": null,
            "description": "Comma-separated list of device-mapper multipath specific options: disablequeueing Disable queueing on all multipath devices before deactivation. This avoids a situation where blkdeactivate may end up waiting if all the paths are unavail‐ able for any underlying device-mapper multipath device."
        },
        {
            "flag": "-o",
            "long": "--vdooptions",
            "arg": null,
            "description": "Comma-separated list of VDO specific options: configfile=file Use specified VDO configuration file."
        },
        {
            "flag": "-u",
            "long": "--umount",
            "arg": null,
            "description": "Unmount a mounted device before trying to deactivate it. Without this option used, a device that is mounted is not deactivated."
        },
        {
            "flag": "-v",
            "long": "--verbose",
            "arg": null,
            "description": "Run in verbose mode. Use -vv for even more verbose mode."
        }
    ],
    "examples": [
        "Deactivate all supported block devices found in the system, skipping mounted devices.",
        "# blkdeactivate",
        "Deactivate  all  supported  block devices found in the system, unmounting any mounted devices",
        "first, if possible.",
        "# blkdeactivate -u",
        "Deactivate the device /dev/vg/lvol0 together with all its holders, unmounting any mounted de‐",
        "vices first, if possible.",
        "# blkdeactivate -u /dev/vg/lvol0",
        "Deactivate all supported block devices found in the system. If the deactivation of a  device-",
        "mapper  device  fails, retry it. Deactivate the whole Volume Group at once when processing an",
        "LVM Logical Volume.",
        "# blkdeactivate -u -d retry -l wholevg",
        "Deactivate all supported block devices found in the system. If the deactivation of a  device-",
        "mapper device fails, retry it and force removal.",
        "# blkdeactivate -d force,retry"
    ],
    "see_also": [
        {
            "name": "dmsetup",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/dmsetup/8/json"
        },
        {
            "name": "lsblk",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/lsblk/8/json"
        },
        {
            "name": "lvm",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/lvm/8/json"
        },
        {
            "name": "mdadm",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/mdadm/8/json"
        },
        {
            "name": "multipathd",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/multipathd/8/json"
        },
        {
            "name": "vdo",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/vdo/8/json"
        },
        {
            "name": "umount",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/umount/8/json"
        }
    ]
}