Skip to content

NAS-139069 Wipe disk writes ASCII 0 instead of bytes 0#17898

Open
ryd994 wants to merge 1 commit intotruenas:masterfrom
ryd994:master
Open

NAS-139069 Wipe disk writes ASCII 0 instead of bytes 0#17898
ryd994 wants to merge 1 commit intotruenas:masterfrom
ryd994:master

Conversation

@ryd994
Copy link

@ryd994 ryd994 commented Dec 23, 2025

In TrueNAS Scale, wipe the disk using Storage -> Disks -> Wipe -> Quick or Full with zeros. After that, the disk is expected to be wiped with null bytes (numeric value of 0).

However, the disk is filled by 0x30 instead of 0x0:

root@nas[~]# head -c 16 /dev/sdj | hexdump
0000000 3030 3030 3030 3030 3030 3030 3030 3030
0000010

0x30 is ASCII character '0'.

While ASCII character '0' also serves the purpose of destroying the data on disk, it does not match the description in UI and the typical expectation.

The problem is at


It should use b'\0' instead of b'0'

A similar bug exists when expanding partition:

@ryd994
Copy link
Author

ryd994 commented Dec 23, 2025

Copy link
Contributor

@themylogin themylogin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yocalebo I think we should merge this :)

@ryd994
Copy link
Author

ryd994 commented Feb 8, 2026

@themylogin Sorry for not knowing the right procedure. This is the first time I contributing to truenas. What can I do to help this PR merge?

@ryd994 ryd994 requested a review from themylogin February 8, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants