{"id":9209,"date":"2022-03-31T22:04:05","date_gmt":"2022-03-31T20:04:05","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=9209"},"modified":"2022-03-31T22:04:06","modified_gmt":"2022-03-31T20:04:06","slug":"data-rotting-on-magnetic-hard-drives","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2022\/03\/31\/data-rotting-on-magnetic-hard-drives\/","title":{"rendered":"Data rotting on magnetic hard drives"},"content":{"rendered":"\n<p>According to <a href=\"https:\/\/mastodon.uno\/@octo\/108051239339031165\">https:\/\/mastodon.uno\/@octo\/108051239339031165<\/a> <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>&#8230;it would be good practice to rewrite the data on HDDs every few years because magnetism tends to weaken over time&#8230;<\/p><p>Flash memories (SSD, microSD\u2026), on the other hand, simply need to be powered up from time to time, because they store bits as electrical charges in cells that act more or less as capacitors.<br \/>The data should not be rewritten, indeed rewriting any data on a flash memory consumes the cells.<\/p><cite>Translated with <a href=\"https:\/\/www.deepl.com\/\">deepl.com<\/a><\/cite><\/blockquote>\n\n\n\n<p>While the fading of data on flash media which are not powered for a long time is a issue I know about, knowing that data also fades from magnetic disks is new to me.<\/p>\n\n\n\n<p>So I searched for &#8220;<a href=\"https:\/\/duckduckgo.com\/?t=ffab&amp;q=refresh+hard+disk&amp;ia=web\">refresh hard disk<\/a>&#8220;, soon finding <a href=\"https:\/\/io.bikegremlin.com\/13914\/disk-data-refresh\/\">How to refresh stored data with Linux and Windows<\/a>. The instruction on this page has a potentially dangerous error and it doesn&#8217;t explain how and why data rots on a magnetic hard drive.<\/p>\n\n\n\n<p>Hard Disk Drives use magnetic storage and, over time, lose their magnetic orientation. Long exposure to wet or humid conditions might also affect the hardware and lead to degradation. (See <a href=\"https:\/\/en.wikipedia.org\/wiki\/Data_degradation\">Data degradation &#8211; Wikipedia<\/a> and <a href=\"https:\/\/www.makeuseof.com\/what-is-digital-decay-data-degredation\/\">What Is Digital Decay &amp; Data Degredation?<\/a>) <\/p>\n\n\n\n<p>On <a href=\"https:\/\/www.akcp.com\/blog\/how-temperature-affects-it-data-storage\/\">akcp.com<\/a> there are good, concise suggestions. on <strong>Hard Drive Long-term storage temperatures<\/strong><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>When a hard drive is used as long-term data storage, it will usually fare better than SSD drives (as we will examine in the SSD section). When turned off, a hard drive could be safely stored between -40\u00b0C (-40\u00b0F) and 70\u00b0C (158\u00b0F), but it will vary between models. Western Digital recommends that a standard consumer drive\u2019s storage temperature be between 12\u00b0C (53.6\u00b0F) and 33\u00b0C (91.4\u00b0F). You would also need to choose a storage location that isn\u2019t humid, or in direct sunlight.<\/p><p>After storing a hard drive at a higher or lower temperature, you should allow the drive enough time (at least 2-3 hours but longer if there are bigger differences) to heat up to room temperature before you attempt to use it. If the ambient temperature is not highly fluctuating around the drive (higher or lower than 15-20 degrees), as magnetic storage it will most likely keep your data safe and readable even many years later after it has been turned off.<\/p><p>Other than the environmental conditions around the drive, you would not need to worry about the data retention of a hard drive. It is permanent magnetic storage and no need to be turned on to \u201crefresh the stored data\u201d. Therefore, it is still recommended that you use hard drives for off-site or external data storage of your backups \u2013 they are still more cost-effective and reliable for this application.<\/p><\/blockquote>\n\n\n\n<p>So, as long as you keep your backup hard drive unplugged, safely stored in a dry place with a fairly constant mild temperature you can safely assume that the data will be safe for several years. I have successfully recovered data from my 42Mb SCSI drive of my first Amiga that were stored in a humid garage. Because I was lucky enough to have access to a far more recent machine with Ultra SCSI, plus I had the right cable to plug to actually connect to the drive. Because my old Amiga can&#8217;t be connected to the network, a capability that nowadays we take for granted. <\/p>\n\n\n\n<p>Because after having correctly stored the media, when the time comes to recover data on magnetic hard drives the next main problem is how to read it. More specifically having the hardware to read the media.<\/p>\n\n\n\n<p>Everyone has a <a href=\"https:\/\/en.wikipedia.org\/wiki\/Floppy_disk\">5\u00bc&#8221; floppy drive<\/a>, hasn&#8217;t you? Or a 3\u00bd&#8221; floppy? Commodore 64 and original PC extensively used the first, Amiga, Atari ST and later PC the latter. <\/p>\n\n\n\n<p>A couple of years ago I could easily find an USB 3\u00bd&#8221; floppy reader on <a href=\"https:\/\/www.nexths.it\/products\/getSkuFromLev\/query\/floppy\">my favourite store<\/a>. They don&#8217;t have them anymore. Having working hardware to read the media is as important as conserving uncorrupted media:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>Long-term preservation of magnetic media is affected by two major factors; its intrinsic instability and the likelihood of the hardware obsolescence. The equipment used to access magnetic media today will almost certainly have been superseded in the next decades. For all practical purposes the records will be unusable, even media in good condition. The main prospect for long-term retention of the information held on magnetic media seems to be in regular copying or data migration, thus maintaining a good quality signal that can be read using available equipment. Copying can either be to fresh tape or disk, or to some other machine-readable format. Once copied to an uncompressed digital format the information can be copied without loss of quality.<\/p><cite>from <a href=\"https:\/\/www.naa.gov.au\/information-management\/storing-and-preserving-information\/preserving-information\/preserving-magnetic-media\">Preserving magnetic media<\/a> on National Archive of Australia<\/cite><\/blockquote>\n\n\n\n<p>So the mantra is &#8220;make backups, make backups, make backups&#8221;. On recent hardware and media.<\/p>\n\n\n\n<p>Now let&#8217;s return to the page on bikegremlin. Simply put:<\/p>\n\n\n\n<p class=\"has-text-align-center has-large-font-size\"><strong>Never, ever run badblocks that way<\/strong><\/p>\n\n\n\n<p>You shall not use the &#8220;-f&#8221; switch, which force the program to run even with a mounted drive. Especially on a mounted media. You shall unmount it instead of ejecting, and only after that you can run badblock that way. <\/p>\n\n\n\n<p>The man page (manual) of badblocks clearly states:<\/p>\n\n\n\n<pre class=\"wp-block-code has-small-font-size\"><code class=\"\" data-line=\"\">   -f     Normally, badblocks will refuse to do a read\/write or a non-destructive  test\n          on  a  device  which  is mounted, since either can cause the system to poten\u2010\n          tially crash and\/or damage the file system even if it is  mounted  read-only.\n          This can be overridden using the -f flag, but should almost never be used ---\n          if you think you&#039;re smarter than the badblocks program, you almost  certainly\n          aren&#039;t.   The  only  time  when  this  option  might be safe to use is if the\n          \/etc\/mtab file is incorrect, and the device really isn&#039;t mounted.<\/code><\/pre>\n\n\n\n<p>So unless your name is Theodore T&#8217;so I warmly suggest you not to use the <code class=\"\" data-line=\"\">-f<\/code> flag.<\/p>\n\n\n\n<p>It is way more sane to copy that data elsewhere. Or using the media for a new backup.<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">According to https:\/\/mastodon.uno\/@octo\/108051239339031165 &#8230;it would be good practice to rewrite the data on HDDs every few years because magnetism tends to weaken over time&#8230; Flash memories (SSD, microSD\u2026), on the other hand, simply need to be powered up from time to time, because they store bits as electrical charges in cells that act more or&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2022\/03\/31\/data-rotting-on-magnetic-hard-drives\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":591,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[72],"tags":[],"class_list":["post-9209","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-documentations"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2015\/07\/wd-my-cloud-ex2100.jpg?fit=320%2C320&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-2ox","jetpack-related-posts":[{"id":14300,"url":"https:\/\/monodes.com\/predaelli\/2025\/11\/23\/fried-again\/","url_meta":{"origin":9209,"position":0},"title":"Fried\u2026 again","author":"Paolo Redaelli","date":"2025-11-23","format":false,"excerpt":"So my aging Raspberry 3 fried yet another secure digital card. Luckily this time I was able to power it off when it was still readable but not writable so I haven't lost data. This time I won't buy a cheap secure digital card, I'll go for the Western Digital\u2026","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2025\/11\/wd-purple-64gb.webp?fit=600%2C600&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2025\/11\/wd-purple-64gb.webp?fit=600%2C600&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2025\/11\/wd-purple-64gb.webp?fit=600%2C600&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":13371,"url":"https:\/\/monodes.com\/predaelli\/2025\/05\/16\/saturating-the-name-space\/","url_meta":{"origin":9209,"position":1},"title":"Saturating the name-space","author":"Paolo Redaelli","date":"2025-05-16","format":false,"excerpt":"We are saturating the name space for programming languages. These days I discovered the Odin Programming Language \"\"The Data-Oriented Language for Sane Software Development.\" According to its FAQs there are some things we may learn for Eiffel. Its guiding principles are Simplicity and readability Minimal: there ought to be one\u2026","rel":"","context":"In &quot;Eiffel&quot;","block_context":{"text":"Eiffel","link":"https:\/\/monodes.com\/predaelli\/category\/eiffel\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11345,"url":"https:\/\/monodes.com\/predaelli\/2024\/02\/17\/memory-profiling\/","url_meta":{"origin":9209,"position":2},"title":"Memory Profiling","author":"Paolo Redaelli","date":"2024-02-17","format":"link","excerpt":"Memory Profiling Part 1. Introduction | Easyperf Memory Usage Case Study. Memory Footprint with SDE Memory Footprint Case Study Data Locality and Reuse Distances.","rel":"","context":"In &quot;Documentations&quot;","block_context":{"text":"Documentations","link":"https:\/\/monodes.com\/predaelli\/category\/documentations\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/02\/MemoryUsageAndFootprint.png?fit=791%2C332&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/02\/MemoryUsageAndFootprint.png?fit=791%2C332&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/02\/MemoryUsageAndFootprint.png?fit=791%2C332&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/monodes.com\/predaelli\/wp-content\/uploads\/sites\/4\/2024\/02\/MemoryUsageAndFootprint.png?fit=791%2C332&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":11513,"url":"https:\/\/monodes.com\/predaelli\/2024\/03\/24\/duckdb-as-the-new-jq\/","url_meta":{"origin":9209,"position":3},"title":"DuckDB as the New jq","author":"Paolo Redaelli","date":"2024-03-24","format":"quote","excerpt":"Recently, I\u2019ve been interested in the DuckDB project (like a SQLite geared towards data applications). And one of the amazing features is that it has many data importers included without requiring extra dependencies. This means it can natively read and parse JSON as a database table, among many other formats.\u2026","rel":"","context":"In &quot;Software Libero&quot;","block_context":{"text":"Software Libero","link":"https:\/\/monodes.com\/predaelli\/category\/software\/software-libero\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":13542,"url":"https:\/\/monodes.com\/predaelli\/2025\/06\/08\/futura-agenda\/","url_meta":{"origin":9209,"position":4},"title":"Futura agenda","author":"Paolo Redaelli","date":"2025-06-08","format":false,"excerpt":"5 strutture dati strane (ma utili) nell'informatica (\"5 Strange (but useful) Data Structures in Computer Science\"). Let's look at five weird data structures that will help you when the arrays and hashmaps of this world aren't enough. B-Tree Self-Balancing. We do have AVL-Trees which are self-balancing but are all-in-memory trees.\u2026","rel":"","context":"In &quot;Agenda&quot;","block_context":{"text":"Agenda","link":"https:\/\/monodes.com\/predaelli\/category\/agenda\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":6239,"url":"https:\/\/monodes.com\/predaelli\/2019\/11\/06\/how-to-automatically-delete-your-google-data-and-why-you-should\/","url_meta":{"origin":9209,"position":5},"title":"How to Automatically Delete Your Google Data, and Why You Should","author":"Paolo Redaelli","date":"2019-11-06","format":"link","excerpt":"Google collects lots of data, which is used to curate content recommendations on services like Google Play and YouTube, as well as market ads to you based on your activity. Source: How to Automatically Delete Your Google Data, and Why You Should How to Automatically Delete Your Google Data, and\u2026","rel":"","context":"In &quot;Privacy&quot;","block_context":{"text":"Privacy","link":"https:\/\/monodes.com\/predaelli\/category\/ethics\/privacy\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/9209","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=9209"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/9209\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media\/591"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=9209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=9209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=9209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}