{"id":5019,"date":"2025-09-18T21:12:03","date_gmt":"2025-09-18T12:12:03","guid":{"rendered":"https:\/\/eternalsphere.net\/echoes\/?p=5019"},"modified":"2026-06-06T10:09:19","modified_gmt":"2026-06-06T01:09:19","slug":"rm3kwp7jim7jqpe","status":"publish","type":"post","link":"https:\/\/eternalsphere.net\/echoes\/index.php\/2025\/09\/18\/rm3kwp7jim7jqpe\/","title":{"rendered":"Linux \u4e0b\u5f7b\u5e95\u6e05\u9664\u786c\u76d8\u4e0e NVMe SSD \u6570\u636e\u7684\u65b9\u6cd5"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u5728\u65e5\u5e38\u4f7f\u7528\u4e2d\uff0c\u5982\u679c\u6211\u4eec\u9700\u8981\u62a5\u5e9f\u3001\u8f6c\u8ba9\u6216\u91cd\u65b0\u5229\u7528\u4e00\u5757\u786c\u76d8\uff0c<strong>\u5f7b\u5e95\u6e05\u9664\u6570\u636e<\/strong> \u662f\u975e\u5e38\u91cd\u8981\u7684\u4e00\u6b65\u3002\u5355\u7eaf\u7684\u5220\u9664\u6587\u4ef6\u6216\u91cd\u65b0\u5206\u533a\u5e76\u4e0d\u4f1a\u771f\u6b63\u62b9\u6389\u6570\u636e\uff0c\u4ecd\u53ef\u80fd\u88ab\u6062\u590d\u5de5\u5177\u627e\u56de\u3002\u672c\u6587\u8bb0\u5f55\u5728 Linux \u4e0b\u5bf9\u4e00\u5757 <strong>\u673a\u68b0\u786c\u76d8\uff08\/dev\/sda\uff09<\/strong> \u548c\u4e00\u5757 <strong>NVMe SSD\uff08\/dev\/nvme0n1\uff09<\/strong> \u8fdb\u884c\u5f7b\u5e95\u6e05\u7406\u7684\u8fc7\u7a0b\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e3a\u4ec0\u4e48\u8981\u5f7b\u5e95\u6e05\u9664\uff1f<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u9690\u79c1\u4fdd\u62a4<\/strong>\uff1a\u907f\u514d\u4e2a\u4eba\u6587\u4ef6\u3001\u7167\u7247\u3001\u8bc1\u4ef6\u4fe1\u606f\u88ab\u6062\u590d\u3002<\/li>\n\n\n\n<li><strong>\u5b89\u5168\u5408\u89c4<\/strong>\uff1a\u67d0\u4e9b\u516c\u53f8\u6216\u884c\u4e1a\u5bf9\u6570\u636e\u9500\u6bc1\u6709\u5408\u89c4\u8981\u6c42\u3002<\/li>\n\n\n\n<li><strong>\u78c1\u76d8\u91cd\u5229\u7528<\/strong>\uff1a\u628a\u78c1\u76d8\u6062\u590d\u6210\u201c\u5e72\u51c0\u201d\u7684\u88f8\u76d8\uff0c\u65b9\u4fbf\u91cd\u65b0\u5206\u533a\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u6e05\u7406\u673a\u68b0\u786c\u76d8\uff08\/dev\/sda\uff09<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e\u673a\u68b0\u786c\u76d8\uff0c\u6700\u5e38\u89c1\u7684\u65b9\u5f0f\u5c31\u662f\u7528 <code>dd<\/code> \u6216 <code>shred<\/code> \u5c06\u6574\u4e2a\u76d8\u8986\u76d6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u65b9\u6cd5 1\uff1a\u7528 <code>dd<\/code> \u5199\u6ee1 0<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dd if=\/dev\/zero of=\/dev\/sda bs=1M status=progress\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>if=\/dev\/zero<\/code> \u8868\u793a\u8f93\u5165\u6e90\u4e3a\u65e0\u9650\u7684\u96f6\u5b57\u8282\u6d41\u3002<\/li>\n\n\n\n<li><code>of=\/dev\/sda<\/code> \u6307\u5b9a\u76ee\u6807\u76d8\u3002<\/li>\n\n\n\n<li><code>bs=1M<\/code> \u8bbe\u7f6e\u5757\u5927\u5c0f\uff0c\u63d0\u9ad8\u5199\u5165\u6548\u7387\u3002<\/li>\n\n\n\n<li><code>status=progress<\/code> \u5b9e\u65f6\u663e\u793a\u5199\u5165\u8fdb\u5ea6\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u6700\u7ec8\u78c1\u76d8\u4f1a\u88ab\u5b8c\u5168\u5199\u6ee1 0\uff0c\u6240\u6709\u6570\u636e\u88ab\u8986\u76d6\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u65b9\u6cd5 2\uff1a\u7528 <code>shred<\/code> \u591a\u6b21\u8986\u76d6\uff08\u66f4\u5f7b\u5e95\uff09<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo shred -n 3 -z -v \/dev\/sda\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-n 3<\/code> \u8868\u793a\u968f\u673a\u6570\u636e\u8986\u76d6 3 \u904d\u3002<\/li>\n\n\n\n<li><code>-z<\/code> \u8868\u793a\u6700\u540e\u4e00\u904d\u7528 0 \u8986\u76d6\u3002<\/li>\n\n\n\n<li><code>-v<\/code> \u6253\u5370\u6267\u884c\u4fe1\u606f\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u79cd\u65b9\u5f0f\u6bd4\u5355\u6b21\u5199 0 \u66f4\u96be\u6062\u590d\uff0c\u4f46\u8017\u65f6\u4e5f\u66f4\u957f\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u6e05\u7406 NVMe SSD\uff08\/dev\/nvme0n1\uff09<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">SSD \u4e0e\u673a\u68b0\u786c\u76d8\u4e0d\u540c\uff0c\u51fa\u4e8e\u78e8\u635f\u5747\u8861\u548c Flash \u7ba1\u7406\u7684\u539f\u56e0\uff0c\u5355\u7eaf\u7684\u5199\u96f6\u672a\u5fc5\u80fd\u4fdd\u8bc1\u5f7b\u5e95\u8986\u76d6\u3002NVMe \u76d8\u63a8\u8350\u4f7f\u7528\u56fa\u4ef6\u81ea\u5e26\u7684 <strong>\u5b89\u5168\u64e6\u9664\u6307\u4ee4<\/strong>\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f7f\u7528 NVMe Secure Erase<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5 <code>nvme-cli<\/code> \u5de5\u5177\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo pacman -S nvme-cli    # Arch Linux\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6267\u884c\u5b89\u5168\u64e6\u9664\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nvme format \/dev\/nvme0n1 -s1\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>-s1<\/code> \u8868\u793a <strong>Secure Erase<\/strong> \u6a21\u5f0f\u3002<\/li>\n\n\n\n<li>\u547d\u4ee4\u4f1a\u63d0\u793a 10 \u79d2\u5012\u8ba1\u65f6\uff0c\u9632\u6b62\u8bef\u64cd\u4f5c\u3002<\/li>\n\n\n\n<li>\u6267\u884c\u540e\u8f93\u51fa <code>Success formatting namespace:ffffffff<\/code> \u8868\u793a\u6e05\u9664\u5b8c\u6210\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b64\u65b9\u6cd5\u901f\u5ea6\u6781\u5feb\uff08\u901a\u5e38\u51e0\u79d2\u949f\uff09\uff0c\u6548\u679c\u7b49\u540c\u4e8e\u6062\u590d\u51fa\u5382\uff0c<strong>\u6240\u6709\u6570\u636e\u4e0d\u53ef\u6062\u590d<\/strong>\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u6267\u884c\u7ed3\u679c<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6e05\u7406\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u7528\u4ee5\u4e0b\u547d\u4ee4\u786e\u8ba4\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsblk\nsudo fdisk -l\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8f93\u51fa\u4e2d\u5e94\u663e\u793a\u78c1\u76d8\u4e3a\u7a7a\u76d8\u72b6\u6001\uff0c\u65e0\u4efb\u4f55\u5206\u533a\u8868\u3002\u6b64\u65f6\u4f60\u53ef\u4ee5\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4fdd\u6301\u88f8\u76d8\u72b6\u6001\uff0c\u7559\u5f85\u540e\u7528\u3002<\/li>\n\n\n\n<li>\u91cd\u65b0\u521b\u5efa\u5206\u533a\u8868\uff08GPT\/MBR\uff09\uff0c\u683c\u5f0f\u5316\u4e3a ext4\u3001btrfs \u7b49\u6587\u4ef6\u7cfb\u7edf\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u6ce8\u610f\u4e8b\u9879<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u8c28\u614e\u64cd\u4f5c<\/strong>\uff1a\u786e\u8ba4\u78c1\u76d8\u540d\u79f0\uff0c\u907f\u514d\u8bef\u6e05\u7cfb\u7edf\u76d8\u3002<\/li>\n\n\n\n<li><strong>HDD \u4e0e SSD \u7684\u5dee\u5f02<\/strong>\uff1a\n<ul class=\"wp-block-list\">\n<li>HDD \u7528 <code>dd<\/code> \u6216 <code>shred<\/code> \u5c31\u8db3\u591f\u3002<\/li>\n\n\n\n<li>SSD \u5efa\u8bae\u4f7f\u7528 <code>nvme format<\/code> \u6216 <code>hdparm secure-erase<\/code>\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>\u7269\u7406\u9500\u6bc1<\/strong>\uff1a\u5982\u679c\u8981\u8fbe\u5230\u6700\u9ad8\u7ea7\u522b\u7684\u6570\u636e\u4e0d\u53ef\u6062\u590d\uff08\u4f8b\u5982\u6d89\u5bc6\u6570\u636e\uff09\uff0c\u5fc5\u987b\u7269\u7406\u7834\u574f\u76d8\u7247\u6216\u82af\u7247\u3002<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u603b\u7ed3<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>\/dev\/sda<\/code>\uff08HDD\uff09\uff1a<code>dd<\/code> \u6216 <code>shred<\/code> \u5b8c\u5168\u8986\u76d6\u3002<\/li>\n\n\n\n<li><code>\/dev\/nvme0n1<\/code>\uff08NVMe SSD\uff09\uff1a<code>nvme format -s1<\/code> \u4e00\u952e\u5b89\u5168\u64e6\u9664\u3002<\/li>\n\n\n\n<li>\u5b8c\u6210\u540e\u4e24\u5757\u76d8\u90fd\u56de\u5230\u201c\u51fa\u5382\u7a7a\u76d8\u201d\u72b6\u6001\uff0c\u6570\u636e\u65e0\u6cd5\u6062\u590d\u3002<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u8fc7\u8fd9\u5957\u65b9\u6cd5\uff0c\u65e0\u8bba\u662f\u65e7\u786c\u76d8\u8f6c\u5356\u8fd8\u662f SSD \u9000\u5f79\uff0c\u90fd\u80fd\u6700\u5927\u9650\u5ea6\u5730\u4fdd\u969c\u6570\u636e\u5b89\u5168\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u65e5\u5e38\u4f7f\u7528\u4e2d\uff0c\u5982\u679c\u6211\u4eec\u9700\u8981\u62a5\u5e9f\u3001\u8f6c\u8ba9\u6216\u91cd\u65b0\u5229\u7528\u4e00\u5757\u786c\u76d8\uff0c\u5f7b\u5e95\u6e05\u9664\u6570\u636e \u662f\u975e\u5e38\u91cd\u8981\u7684\u4e00\u6b65\u3002\u5355\u7eaf\u7684\u5220\u9664\u6587\u4ef6\u6216\u91cd\u65b0\u5206\u533a\u5e76\u4e0d\u4f1a\u771f\u6b63\u62b9\u6389\u6570\u636e\uff0c\u4ecd\u53ef\u80fd\u88ab\u6062\u590d\u5de5\u5177\u627e\u56de\u3002\u672c\u6587\u8bb0\u5f55\u5728 Linux \u4e0b\u5bf9\u4e00\u5757 \u673a\u68b0\u786c\u76d8\uff08\/dev\/sda\uff09 \u548c\u4e00\u5757 NVMe SSD\uff08\/dev\/nvme0n1\uff09 \u8fdb\u884c\u5f7b\u5e95\u6e05\u7406\u7684\u8fc7\u7a0b\u3002 \u4e3a\u4ec0\u4e48\u8981\u5f7b\u5e95\u6e05\u9664\uff1f \u4e00\u3001\u6e05\u7406\u673a\u68b0\u786c\u76d8\uff08\/dev\/sda\uff09 \u5bf9\u4e8e\u673a\u68b0\u786c\u76d8\uff0c\u6700\u5e38\u89c1\u7684\u65b9\u5f0f\u5c31\u662f\u7528 dd \u6216 shred \u5c06\u6574\u4e2a\u76d8\u8986\u76d6\u3002 \u65b9\u6cd5 1\uff1a\u7528 dd \u5199\u6ee1 0 \u6700\u7ec8\u78c1\u76d8\u4f1a\u88ab\u5b8c\u5168\u5199\u6ee1 0\uff0c\u6240\u6709\u6570\u636e\u88ab\u8986\u76d6\u3002 \u65b9\u6cd5 2\uff1a\u7528 shred \u591a\u6b21\u8986\u76d6\uff08\u66f4\u5f7b\u5e95\uff09 \u8fd9\u79cd\u65b9\u5f0f\u6bd4\u5355\u6b21\u5199 0 \u66f4\u96be\u6062\u590d\uff0c\u4f46\u8017\u65f6\u4e5f\u66f4\u957f\u3002 \u4e8c\u3001\u6e05\u7406 NVMe SSD\uff08\/dev\/nvme0n1\uff09 SSD \u4e0e\u673a\u68b0\u786c\u76d8\u4e0d\u540c\uff0c\u51fa\u4e8e\u78e8\u635f\u5747\u8861\u548c Flash \u7ba1\u7406\u7684\u539f\u56e0\uff0c\u5355\u7eaf\u7684\u5199\u96f6\u672a\u5fc5\u80fd\u4fdd\u8bc1\u5f7b\u5e95\u8986\u76d6\u3002NVMe \u76d8\u63a8\u8350\u4f7f\u7528\u56fa\u4ef6\u81ea\u5e26\u7684 \u5b89\u5168\u64e6\u9664\u6307\u4ee4\u3002 \u4f7f\u7528 NVMe Secure Erase \u5b89\u88c5 nvme-cli \u5de5\u5177\uff1a \u6267\u884c\u5b89\u5168\u64e6\u9664\uff1a \u6b64\u65b9\u6cd5\u901f\u5ea6\u6781\u5feb\uff08\u901a\u5e38\u51e0\u79d2\u949f\uff09\uff0c\u6548\u679c\u7b49\u540c\u4e8e\u6062\u590d\u51fa\u5382\uff0c\u6240\u6709\u6570\u636e\u4e0d\u53ef\u6062\u590d\u3002 \u4e09\u3001\u6267\u884c\u7ed3\u679c \u6e05\u7406\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u7528\u4ee5\u4e0b\u547d\u4ee4\u786e\u8ba4\uff1a &hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[210],"tags":[],"class_list":["post-5019","post","type-post","status-publish","format-standard","hentry","category-5gusupsqy34h9xv"],"_links":{"self":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/5019","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/comments?post=5019"}],"version-history":[{"count":1,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/5019\/revisions"}],"predecessor-version":[{"id":5020,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/posts\/5019\/revisions\/5020"}],"wp:attachment":[{"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/media?parent=5019"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/categories?post=5019"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eternalsphere.net\/echoes\/index.php\/wp-json\/wp\/v2\/tags?post=5019"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}