Skip to content

Disk management

Disk management in Linux

udisks

udisks provides a daemon udisksd, that implements D-Bus interfaces used to query and manipulate storage devices, and a command-line tool udisksctl, used to query and use the daemon.

To see the drive model:

udisksctl status

nvme-cli

nvme-cli is a NVMe management command line interface.

Install

sudo apt install nvme-cli

Usage

To see the drive health:

# change 0 to the drive number
sudo nvme smart-log /dev/nvme0 -H

Forcing disk check on reboot

For ext4 filesystems:

sudo tune2fs -c 1 /dev/sdXN

You can use the following command to list the disk you want to check.

lsblk

and reboot

sudo reboot

After reboot, revert the option

sudo tune2fs -c -1 /dev/sdXN
Last updated on