{"id":428,"date":"2020-01-10T22:00:15","date_gmt":"2020-01-10T21:00:15","guid":{"rendered":"http:\/\/linuxboxen2.dk\/?p=428"},"modified":"2020-01-10T22:00:15","modified_gmt":"2020-01-10T21:00:15","slug":"forlaeng-din-ssd-disk-lifetime-i-linux","status":"publish","type":"post","link":"https:\/\/www.linuxboxen.dk\/?p=428","title":{"rendered":"Forl\u00e6ng din ssd disk lifetime i linux."},"content":{"rendered":"<p>N\u00e5 du tilg\u00e5r en fil eller systemet tilg\u00e5r en fil skrives der en dato hvorn\u00e5r filen er \u00e5bnet.<\/p>\n<p>Du kan forl\u00e6nge leve tiden med at bruge <strong>noatime<\/strong> i \/etc\/fstab som vist her.<\/p>\n<pre># \/etc\/fstab: static file system information.\n#\n# Use 'blkid' to print the universally unique identifier for a\n# device; this may be used with UUID= as a more robust way to name devices\n# that works even if disks are added and removed. See fstab(5).\n#\n# &lt;file system&gt; &lt;mount point&gt;   &lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt;\n# \/ was on \/dev\/sda1 during installation\nUUID=adb9fba7-fb7d-47fe-a3d6-59b70774147d \/               ext4    <strong>noatime<\/strong>,errors=remount-ro 0       1\n# swap was on \/dev\/sda5 during installation\nUUID=3eba4207-4c45-48a8-a777-3a1f27a6182f none            swap    sw              0       0\n<\/pre>\n<p>Dette vil forl\u00e6nge leve tiden p\u00e5 disken.<\/p>\n<p>Du kan ogs\u00e5 bruge<\/p>\n<pre>$ sudo fstrim -v \/\n\/: 38.6 GiB (41479200768 bytes) trimmed\n<\/pre>\n<p>som rydder op p\u00e5 din ssd disk.<\/p>\n<h2>man siden skriver.<\/h2>\n<p><a href=\"https:\/\/www.linuxboxen.dk\/fstrim\/\">fstrim<\/a> bruges p\u00e5 en monteret filsystem til at skille sig (eller &#8220;trimme&#8221;), blokke, der ikke er i brug af filsystemet. Dette er nyttigt for solid-state-drev (SSD&#8217;er) og tyndt klargjort opbevaring.<br \/>\nSom standard vil fstrim kassere alle ubrugte blokke i filsystemet. Optioner kan anvendes til at \u00e6ndre denne adf\u00e6rd baseret p\u00e5 r\u00e6kkevidde eller st\u00f8rrelse.<\/p>\n<p>N\u00e5 du tilg\u00e5r en fil eller systemet tilg\u00e5r en fil skrives der en dato hvorn\u00e5r filen er \u00e5bnet.<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_428\" class=\"pvc_stats all  \" data-element-id=\"428\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/www.linuxboxen.dk\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>N\u00e5 du tilg\u00e5r en fil eller systemet tilg\u00e5r en fil skrives der en dato hvorn\u00e5r filen er \u00e5bnet. Du kan forl\u00e6nge leve tiden med at bruge noatime i \/etc\/fstab som vist her. # \/etc\/fstab: static file system information. # # Use &#8216;blkid&#8217; to print the universally unique identifier for a # device; this may be [&hellip;]<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_428\" class=\"pvc_stats all  \" data-element-id=\"428\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/www.linuxboxen.dk\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","footnotes":""},"categories":[2],"tags":[],"class_list":["post-428","post","type-post","status-publish","format-standard","hentry","category-tips"],"a3_pvc":{"activated":true,"total_views":12,"today_views":0},"_links":{"self":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts\/428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=428"}],"version-history":[{"count":0,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=\/wp\/v2\/posts\/428\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=428"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=428"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxboxen.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}