{"id":263,"date":"2016-05-24T17:35:17","date_gmt":"2016-05-24T17:35:17","guid":{"rendered":"http:\/\/home.terra-india.de\/?p=263"},"modified":"2021-10-17T08:36:04","modified_gmt":"2021-10-17T08:36:04","slug":"zfs","status":"publish","type":"post","link":"http:\/\/www.denzrhf.de\/?p=263","title":{"rendered":"zfs"},"content":{"rendered":"<p>ZFS ist eine coole Sache :- )<\/p>\n<p>Neuen Pool anlegen<\/p>\n<pre>zpool create mypool \/dev\/sdb<\/pre>\n<p>aktueller Status anzeigen<\/p>\n<pre>zpool status<\/pre>\n<p>&#8230; das dazugeh\u00f6rende dev finden &#8230;<\/p>\n<pre>glabel status<\/pre>\n<p>&#8230; und die s\/n zum dev finden &#8230;<\/p>\n<pre>smartctl -q noserial -a \/dev\/ada0\u00a0 | sed -n 3,20p<\/pre>\n<p>\u00dcbliche Kompression einstellen<\/p>\n<pre>zfs set compression=lz4 zfspool<\/pre>\n<p>Standard Snapshot einstellen:<\/p>\n<p>(install zfs-auto-snapshot)<\/p>\n<pre>zfs set com.sun:auto-snapshot=true zfspool\/snapped<\/pre>\n<p>By default script saves: &#8211; frequent snapshots every 15 mins, keeping 4 snapshots &#8211; hourly snapshots every hour, keeping 24 snapshots &#8211; daily snapshots every day, keeping 31 snapshots &#8211; weekly snapshots every week, keeping 7 snapshots &#8211; monthly snapshots every month, keeping 12 snapshots<\/p>\n<p>oder manuell konfigurieren<\/p>\n<pre>sudo zfs set com.sun:auto-snapshot=true zfspool\/snapped\nsudo zfs set com.sun:auto-snapshot:monthly=false zfspool\/snapped\nsudo zfs set com.sun:auto-snapshot:weekly=false zfspool\/snapped\nsudo zfs set com.sun:auto-snapshot:daily=true zfspool\/snapped\nsudo zfs set com.sun:auto-snapshot:hourly=false zfspool\/snapped\nsudo zfs set com.sun:auto-snapshot:frequent=false zfspool\/snapped<\/pre>\n<p>Snapshots anzeigen<\/p>\n<pre class=\"notranslate\">zfs list -t snapshot<\/pre>\n<p>Neuen Speicherplatz hinzuf\u00fcgen (nicht redundant)<\/p>\n<pre class=\"notranslate\">zpool add -f zfspool\/dev\/sdc<\/pre>\n<p>Redundanten Speicher hinzuf\u00fcgen (~RAID)<\/p>\n<pre class=\"notranslate\">zpool attach -f zfspool\/dev\/sdc\n\n<\/pre>\n<p>zpool status anzeigen<\/p>\n<p>zpool status -x<\/p>\n<p>Snapshot l\u00f6schen<br \/>\n<!--StartFragment --><\/p>\n<pre>Vol1RaidZ\/SnapMonthly@auto-20200801.0900-13m<!--EndFragment --><!--StartFragment --><\/pre>\n<p>zpool Datenintegrit\u00e4t pr\u00fcfen<\/p>\n<pre>Vol1RaidZ\/SnapMonthly@auto-20200801.0900-13m<\/pre>\n<p><!--EndFragment --><\/p>\n<p>&#8230; und noch Samba konfigurieren<\/p>\n<pre>apt-get install samba-vfs-modules<\/pre>\n<p>Then configure <code>smb.conf<\/code> by configuring your shares:<\/p>\n<pre>[global]\n    shadow: snapdir = .zfs\/snapshot\n    shadow: sort = desc\n    shadow: format = zfs-auto-snap_%Y-%m-%d-%H%M\n\n[myshare]\n    path = \/my\/tank\/data\n    read only = No\n    comment = ZFS dataset with Previous Versions enabled\n    vfs objects = shadow_copy2<\/pre>\n<p>teilweise kopiert von:<\/p>\n<p>https:\/\/github.com\/zfsonlinux\/zfs-auto-snapshot\/wiki\/Samba<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ZFS ist eine coole Sache :- ) Neuen Pool anlegen zpool create mypool \/dev\/sdb aktueller Status anzeigen zpool status &#8230; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,3],"tags":[],"_links":{"self":[{"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=\/wp\/v2\/posts\/263"}],"collection":[{"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=263"}],"version-history":[{"count":17,"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=\/wp\/v2\/posts\/263\/revisions"}],"predecessor-version":[{"id":354,"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=\/wp\/v2\/posts\/263\/revisions\/354"}],"wp:attachment":[{"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=263"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=263"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.denzrhf.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}