Zero filling (vs one-filling) drives: convention or practical reason?
Many tutorials suggest zero-filling a drive to fully erase it for further use, but I have never seen anyone suggest one-filling a drive for any reason. Is this an arbitrary convention, or is there a reason why zero-filling is better than one-filling?
Is one harder on the device physically than the other? Other than security (for which I understand a random fill is better), are there any other possible considerations?
hard-drive ssd format overwrite physical-wear
add a comment |
Many tutorials suggest zero-filling a drive to fully erase it for further use, but I have never seen anyone suggest one-filling a drive for any reason. Is this an arbitrary convention, or is there a reason why zero-filling is better than one-filling?
Is one harder on the device physically than the other? Other than security (for which I understand a random fill is better), are there any other possible considerations?
hard-drive ssd format overwrite physical-wear
Some discussion over here....security.stackexchange.com/questions/10464/…
– Moab
Feb 8 at 4:32
Thanks, I did find that but it is a slightly different question and is focused on data security. Regarding that question, I would ask whether multiple writes of all ones are functionally identical to multiple writes of all zeros.
– Thoughtcraft
Feb 8 at 4:41
1
Yeah but there was some useful information on how a magnetic drive stores a 1 or a 0
– Moab
Feb 8 at 13:57
add a comment |
Many tutorials suggest zero-filling a drive to fully erase it for further use, but I have never seen anyone suggest one-filling a drive for any reason. Is this an arbitrary convention, or is there a reason why zero-filling is better than one-filling?
Is one harder on the device physically than the other? Other than security (for which I understand a random fill is better), are there any other possible considerations?
hard-drive ssd format overwrite physical-wear
Many tutorials suggest zero-filling a drive to fully erase it for further use, but I have never seen anyone suggest one-filling a drive for any reason. Is this an arbitrary convention, or is there a reason why zero-filling is better than one-filling?
Is one harder on the device physically than the other? Other than security (for which I understand a random fill is better), are there any other possible considerations?
hard-drive ssd format overwrite physical-wear
hard-drive ssd format overwrite physical-wear
asked Feb 8 at 3:54
ThoughtcraftThoughtcraft
15115
15115
Some discussion over here....security.stackexchange.com/questions/10464/…
– Moab
Feb 8 at 4:32
Thanks, I did find that but it is a slightly different question and is focused on data security. Regarding that question, I would ask whether multiple writes of all ones are functionally identical to multiple writes of all zeros.
– Thoughtcraft
Feb 8 at 4:41
1
Yeah but there was some useful information on how a magnetic drive stores a 1 or a 0
– Moab
Feb 8 at 13:57
add a comment |
Some discussion over here....security.stackexchange.com/questions/10464/…
– Moab
Feb 8 at 4:32
Thanks, I did find that but it is a slightly different question and is focused on data security. Regarding that question, I would ask whether multiple writes of all ones are functionally identical to multiple writes of all zeros.
– Thoughtcraft
Feb 8 at 4:41
1
Yeah but there was some useful information on how a magnetic drive stores a 1 or a 0
– Moab
Feb 8 at 13:57
Some discussion over here....security.stackexchange.com/questions/10464/…
– Moab
Feb 8 at 4:32
Some discussion over here....security.stackexchange.com/questions/10464/…
– Moab
Feb 8 at 4:32
Thanks, I did find that but it is a slightly different question and is focused on data security. Regarding that question, I would ask whether multiple writes of all ones are functionally identical to multiple writes of all zeros.
– Thoughtcraft
Feb 8 at 4:41
Thanks, I did find that but it is a slightly different question and is focused on data security. Regarding that question, I would ask whether multiple writes of all ones are functionally identical to multiple writes of all zeros.
– Thoughtcraft
Feb 8 at 4:41
1
1
Yeah but there was some useful information on how a magnetic drive stores a 1 or a 0
– Moab
Feb 8 at 13:57
Yeah but there was some useful information on how a magnetic drive stores a 1 or a 0
– Moab
Feb 8 at 13:57
add a comment |
1 Answer
1
active
oldest
votes
Is one harder on the device physically than the other?
Nowadays many drives internally encrypt data, so all zeros (or all ones) are stored internally as "mixed" values anyway. Therefore it shouldn't matter.
are there any other possible considerations?
I'm a Linux user. From my point of view zeros are extremely easy to get because there is /dev/zero
in the OS. Getting all ones is not that easy. It's the only reason to prefer zeros I can think of. And since the easiest way to fill a drive with anything is to use dd
, cat
or cp
(rather than writing your own program), filling with zeros from /dev/zero
seems natural.
Zero-filling is easy:
cp /dev/zero /dev/sdX
while one-filling requires some additional work:
</dev/zero tr '' '377' >/dev/sdX
Note the latter can be used to fill the device with any fixed byte value. In this sense all ones are as "hard" to get as any other byte except all zeros.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403394%2fzero-filling-vs-one-filling-drives-convention-or-practical-reason%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is one harder on the device physically than the other?
Nowadays many drives internally encrypt data, so all zeros (or all ones) are stored internally as "mixed" values anyway. Therefore it shouldn't matter.
are there any other possible considerations?
I'm a Linux user. From my point of view zeros are extremely easy to get because there is /dev/zero
in the OS. Getting all ones is not that easy. It's the only reason to prefer zeros I can think of. And since the easiest way to fill a drive with anything is to use dd
, cat
or cp
(rather than writing your own program), filling with zeros from /dev/zero
seems natural.
Zero-filling is easy:
cp /dev/zero /dev/sdX
while one-filling requires some additional work:
</dev/zero tr '' '377' >/dev/sdX
Note the latter can be used to fill the device with any fixed byte value. In this sense all ones are as "hard" to get as any other byte except all zeros.
add a comment |
Is one harder on the device physically than the other?
Nowadays many drives internally encrypt data, so all zeros (or all ones) are stored internally as "mixed" values anyway. Therefore it shouldn't matter.
are there any other possible considerations?
I'm a Linux user. From my point of view zeros are extremely easy to get because there is /dev/zero
in the OS. Getting all ones is not that easy. It's the only reason to prefer zeros I can think of. And since the easiest way to fill a drive with anything is to use dd
, cat
or cp
(rather than writing your own program), filling with zeros from /dev/zero
seems natural.
Zero-filling is easy:
cp /dev/zero /dev/sdX
while one-filling requires some additional work:
</dev/zero tr '' '377' >/dev/sdX
Note the latter can be used to fill the device with any fixed byte value. In this sense all ones are as "hard" to get as any other byte except all zeros.
add a comment |
Is one harder on the device physically than the other?
Nowadays many drives internally encrypt data, so all zeros (or all ones) are stored internally as "mixed" values anyway. Therefore it shouldn't matter.
are there any other possible considerations?
I'm a Linux user. From my point of view zeros are extremely easy to get because there is /dev/zero
in the OS. Getting all ones is not that easy. It's the only reason to prefer zeros I can think of. And since the easiest way to fill a drive with anything is to use dd
, cat
or cp
(rather than writing your own program), filling with zeros from /dev/zero
seems natural.
Zero-filling is easy:
cp /dev/zero /dev/sdX
while one-filling requires some additional work:
</dev/zero tr '' '377' >/dev/sdX
Note the latter can be used to fill the device with any fixed byte value. In this sense all ones are as "hard" to get as any other byte except all zeros.
Is one harder on the device physically than the other?
Nowadays many drives internally encrypt data, so all zeros (or all ones) are stored internally as "mixed" values anyway. Therefore it shouldn't matter.
are there any other possible considerations?
I'm a Linux user. From my point of view zeros are extremely easy to get because there is /dev/zero
in the OS. Getting all ones is not that easy. It's the only reason to prefer zeros I can think of. And since the easiest way to fill a drive with anything is to use dd
, cat
or cp
(rather than writing your own program), filling with zeros from /dev/zero
seems natural.
Zero-filling is easy:
cp /dev/zero /dev/sdX
while one-filling requires some additional work:
</dev/zero tr '' '377' >/dev/sdX
Note the latter can be used to fill the device with any fixed byte value. In this sense all ones are as "hard" to get as any other byte except all zeros.
edited Feb 8 at 6:21
answered Feb 8 at 5:42
Kamil MaciorowskiKamil Maciorowski
28.5k156187
28.5k156187
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1403394%2fzero-filling-vs-one-filling-drives-convention-or-practical-reason%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Some discussion over here....security.stackexchange.com/questions/10464/…
– Moab
Feb 8 at 4:32
Thanks, I did find that but it is a slightly different question and is focused on data security. Regarding that question, I would ask whether multiple writes of all ones are functionally identical to multiple writes of all zeros.
– Thoughtcraft
Feb 8 at 4:41
1
Yeah but there was some useful information on how a magnetic drive stores a 1 or a 0
– Moab
Feb 8 at 13:57