Storage and Disks

Help and Info~4 minView script

Curated reference for storage inspection on Proxmox hosts: block devices, partitions, mounts, LVM volumes, Proxmox storage configuration, and a few VM disk operations (importdisk, qemu-img convert).

Quick disk inventory

lsblk is the fastest way to see all block devices and their partitions in a tree view. For persistent identifiers (which survive between boots and hardware changes) use ls -lh /dev/disk/by-id/.

Disk Information

CommandDescriptionAction
lsblkList block devices and partitions
fdisk -lList disks with detailed info
blkidShow UUID and filesystem type of block devices
ls -lh /dev/disk/by-id/List disk persistent identifiers
parted -lDetailed partition layout with GPT info

Storage Usage

CommandDescriptionAction
df -hShow disk usage by mount point
du -sh /pathShow size of a directory
mount | grep ^/devShow mounted storage devices
cat /proc/mountsShow all active mounts from the kernel

LVM Management

CommandDescriptionAction
pvdisplayDisplay physical volumes (LVM)
vgdisplayDisplay volume groups (LVM)
lvdisplayDisplay logical volumes (LVM)
pvsConcise output of physical volumes
vgsConcise output of volume groups
lvsConcise output of logical volumes

Proxmox Storage

CommandDescriptionAction
cat /etc/pve/storage.cfgShow Proxmox storage configuration
pvesm statusShow status of all storage pools
pvesm listList all available storage
pvesm list <storage>List content of specific storage
pvesm scan <storage>Scan storage for new content

Disk Actions

CommandDescriptionAction
qm importdisk <vmid> <image_path> <storage>Attach disk image to VM
qm set <vmid> -<bus><index> <disk_path>Assign physical disk to VM (passthrough mode)
qemu-img convert -O <format> <input> <output>Convert disk image format

SMART Disk Health

CommandDescriptionAction
smartctl --scanList SMART-capable devices on the host
smartctl -i /dev/<disk>Basic device info (model, firmware, serial)
smartctl -H /dev/<disk>Quick health check — overall PASSED / FAILED
smartctl -A /dev/<disk>SMART attributes only (raw values, thresholds)
smartctl -a /dev/<disk>Full SMART info — info + attributes + self-test log
smartctl -t short /dev/<disk>Start short self-test (~2 minutes, runs in background)
smartctl -t long /dev/<disk>Start long self-test (hours, runs in background)
smartctl -l selftest /dev/<disk>View self-test log (results of past tests)
smartctl -X /dev/<disk>Abort the running self-test

NVMe Disk Health

CommandDescriptionAction
nvme listList NVMe devices visible to the kernel
nvme smart-log /dev/<nvme>NVMe-specific SMART log (temperature, wear, errors)
nvme id-ctrl /dev/<nvme>Controller info (model, firmware, capabilities)
nvme error-log /dev/<nvme>Recent NVMe error log entries

LVM short vs long commands

Both forms exist for compatibility. pvs / vgs / lvs give a clean single-line-per-volume table; pvdisplay / vgdisplay / lvdisplay give a verbose multi-line dump per volume. For day-to-day use prefer the short versions.

SMART for spinning disks vs NVMe

Spinning / SATA / SAS disks use the smartctl family from smartmontools (installed by default on Proxmox). Pass the device as /dev/sda, /dev/sdb, etc. NVMe disks have their own native protocol — smartctl works against them (passes most data through), but the nvme tool from nvme-cli reports more NVMe-specific fields (wear levelling, media errors, namespace info). Install with apt install nvme-cli if not present.

Self-tests run in the background

smartctl -t short and -t long return immediately — the disk runs the test on its own. Check progress with smartctl -a /dev/&lt;disk&gt; (look for the "Self-test routine in progress" line) or wait for completion and read smartctl -l selftest /dev/&lt;disk&gt;. Short tests take ~2 min; long tests can take hours on large spinners. The disk stays usable during the test, but I/O performance drops.

Related