func wipeDevice()

in pkg/raid/raid.go [221:228]


func wipeDevice(device string) error {
	if _, err := os.Stat(device); errors.Is(err, os.ErrNotExist) {
		return fmt.Errorf("Device %s to be wiped does not exist", device)
	}
	_, _ = runMdadm("--zero-superblock", device)
	// There's nothing to recover on errors. If the device was not already an array element, the command will fail.
	return nil
}