We have a relatively large disk on our Linux machine, 2.5TB in size.
We want to completely format (zero-out) this disk; say the disk is /dev/sdX
.
We would like to achieve this with dd
, for example:
dd if=/dev/zero of=/dev/sdX bs=1M count=1
My question is: Does dd
also support such a formatting (cleaning) of disks with large sizes?
Additionally, what could be the verification method after such dd
operation, in order to see if the disk has really been zeroed?
newfs
creates a new (empty) filesystem. – Kusalananda Jan 27 '18 at 18:51mkfs.ext4
(or whatever fs you want to use) on it – ivanivan Jan 27 '18 at 18:52count=1
you only wipe the partition table, in that case perhaps you wantwipefs
instead ( https://unix.stackexchange.com/a/394999/30851 ). Otherwise get rid ofcount=1
. Verify afterwards withcmp /dev/zero /dev/sdb
(should say EOF on /dev/sdb assuming sdb is fully zero). – frostschutz Jan 27 '18 at 19:44cat /dev/zero >/dev/sdb
faster thandd
. Really. – Chris Davies Jan 27 '18 at 22:09