brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: wipefs lists the signatures on a disk before you erase any of them

Disk
~/tips/tip-disk-wipefs-list-before-erase

sudo wipefs /dev/sdb

Lists and removes old filesystem and RAID signatures from a disk, with a dry-run option.

A disk that was part of an old RAID or LVM setup can confuse installers. wipefs shows what is on it before it removes anything.

sudo wipefs /dev/sdb
sudo wipefs --all --no-act /dev/sdb
sudo wipefs --all /dev/sdb

Without options it only lists the filesystem, RAID and partition-table signatures with their offsets. --no-act does a dry run of the erase. --all removes only the signatures, but the disk is no longer recognised and recovery is hard. Unmount all partitions first, and run it on a partition if you want to keep the partition table.

Further reading: wipefs manual page

More Disk tips sudo e2freefrag /dev/sdb1 sudo smartctl -a --json /dev/sda | jq '.smart_status.passed' lsscsi -s udisksctl power-off -b /dev/sdX du -sh — .[!.]* * 2>/dev/null | sort -h All Disk tips (44) All topics

Link