{"id":43958,"date":"2024-10-06T11:47:13","date_gmt":"2024-10-06T03:47:13","guid":{"rendered":"https:\/\/server.hk\/cnblog\/43958\/"},"modified":"2024-10-06T11:47:13","modified_gmt":"2024-10-06T03:47:13","slug":"centos-8-%e4%b8%ad%e9%80%9a%e9%81%8e-stratis-%e7%ae%a1%e7%90%86%e6%9c%ac%e5%9c%b0%e5%ad%98%e5%84%b2","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/43958\/","title":{"rendered":"CentOS 8 \u4e2d\u901a\u904e Stratis \u7ba1\u7406\u672c\u5730\u5b58\u5132"},"content":{"rendered":"<h1 id=\"centos-8-%e4%b8%ad%e9%80%9a%e9%81%8e-stratis-%e7%ae%a1%e7%90%86%e6%9c%ac%e5%9c%b0%e5%ad%98%e5%84%b2-yzihrdonGl\">CentOS 8 \u4e2d\u901a\u904e Stratis \u7ba1\u7406\u672c\u5730\u5b58\u5132<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u4f3a\u670d\u5668\u7ba1\u7406\u4e2d\uff0c\u5b58\u5132\u7684\u7ba1\u7406\u8b8a\u5f97\u8d8a\u4f86\u8d8a\u91cd\u8981\u3002CentOS 8 \u5f15\u5165\u4e86 Stratis\uff0c\u9019\u662f\u4e00\u500b\u7528\u65bc\u7c21\u5316\u672c\u5730\u5b58\u5132\u7ba1\u7406\u7684\u5de5\u5177\u3002Stratis \u63d0\u4f9b\u4e86\u4e00\u500b\u9ad8\u5c64\u6b21\u7684\u62bd\u8c61\uff0c\u8b93\u7528\u6236\u80fd\u5920\u66f4\u8f15\u9b06\u5730\u7ba1\u7406\u5b58\u5132\u6c60\u3001\u908f\u8f2f\u5377\u548c\u6587\u4ef6\u7cfb\u7d71\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e\u5982\u4f55\u5728 CentOS 8 \u4e2d\u4f7f\u7528 Stratis \u4f86\u7ba1\u7406\u672c\u5730\u5b58\u5132\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%af-stratis%ef%bc%9f-yzihrdonGl\">\u4ec0\u9ebc\u662f Stratis\uff1f<\/h2>\n<p>Stratis \u662f\u4e00\u500b\u958b\u6e90\u7684\u5b58\u5132\u7ba1\u7406\u5de5\u5177\uff0c\u65e8\u5728\u7c21\u5316 Linux \u7cfb\u7d71\u4e2d\u7684\u5b58\u5132\u7ba1\u7406\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u500b\u7528\u65bc\u5275\u5efa\u548c\u7ba1\u7406\u5b58\u5132\u6c60\u7684\u754c\u9762\uff0c\u4e26\u652f\u6301\u5feb\u7167\u3001\u58d3\u7e2e\u548c\u52a0\u5bc6\u7b49\u529f\u80fd\u3002Stratis \u7684\u8a2d\u8a08\u7406\u5ff5\u662f\u4f7f\u5b58\u5132\u7ba1\u7406\u8b8a\u5f97\u66f4\u76f4\u89c0\uff0c\u7279\u5225\u662f\u5c0d\u65bc\u90a3\u4e9b\u4e0d\u719f\u6089\u50b3\u7d71 LVM\uff08\u908f\u8f2f\u5377\u7ba1\u7406\uff09\u548c\u6587\u4ef6\u7cfb\u7d71\u7684\u7528\u6236\u3002<\/p>\n<h2 id=\"%e5%ae%89%e8%a3%9d-stratis-yzihrdonGl\">\u5b89\u88dd Stratis<\/h2>\n<p>\u5728 CentOS 8 \u4e2d\u5b89\u88dd Stratis \u975e\u5e38\u7c21\u55ae\u3002\u9996\u5148\uff0c\u60a8\u9700\u8981\u78ba\u4fdd\u7cfb\u7d71\u5df2\u7d93\u66f4\u65b0\u5230\u6700\u65b0\u7248\u672c\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u9032\u884c\u66f4\u65b0\uff1a<\/p>\n<pre><code>sudo dnf update<\/code><\/pre>\n<p>\u63a5\u4e0b\u4f86\uff0c\u5b89\u88dd Stratis \u5305\uff1a<\/p>\n<pre><code>sudo dnf install stratisd stratis-cli<\/code><\/pre>\n<p>\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u555f\u52d5 Stratis \u670d\u52d9\u4e26\u8a2d\u7f6e\u70ba\u958b\u6a5f\u81ea\u555f\uff1a<\/p>\n<pre><code>sudo systemctl start stratisd\nsudo systemctl enable stratisd<\/code><\/pre>\n<h2 id=\"%e5%89%b5%e5%bb%ba%e5%ad%98%e5%84%b2%e6%b1%a0-yzihrdonGl\">\u5275\u5efa\u5b58\u5132\u6c60<\/h2>\n<p>\u5b89\u88dd\u5b8c\u6210\u5f8c\uff0c\u60a8\u53ef\u4ee5\u958b\u59cb\u5275\u5efa\u5b58\u5132\u6c60\u3002\u9996\u5148\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u53ef\u7528\u7684\u78c1\u789f\uff1a<\/p>\n<pre><code>lsblk<\/code><\/pre>\n<p>\u5047\u8a2d\u60a8\u6709\u4e00\u500b\u672a\u5206\u914d\u7684\u78c1\u789f \/dev\/sdb\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5275\u5efa\u4e00\u500b\u540d\u70ba mypool \u7684\u5b58\u5132\u6c60\uff1a<\/p>\n<pre><code>sudo stratis pool create mypool \/dev\/sdb<\/code><\/pre>\n<h2 id=\"%e7%ae%a1%e7%90%86%e9%82%8f%e8%bc%af%e5%8d%b7-yzihrdonGl\">\u7ba1\u7406\u908f\u8f2f\u5377<\/h2>\n<p>\u5275\u5efa\u5b58\u5132\u6c60\u5f8c\uff0c\u60a8\u53ef\u4ee5\u5728\u8a72\u6c60\u4e2d\u5275\u5efa\u908f\u8f2f\u5377\u3002\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5275\u5efa\u4e00\u500b\u540d\u70ba myvolume \u7684\u908f\u8f2f\u5377\uff1a<\/p>\n<pre><code>sudo stratis volume create mypool myvolume<\/code><\/pre>\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u5b58\u5132\u6c60\u548c\u908f\u8f2f\u5377\u7684\u72c0\u614b\uff1a<\/p>\n<pre><code>sudo stratis pool list\nsudo stratis volume list mypool<\/code><\/pre>\n<h2 id=\"%e5%bf%ab%e7%85%a7%e5%92%8c%e5%85%b6%e4%bb%96%e5%8a%9f%e8%83%bd-yzihrdonGl\">\u5feb\u7167\u548c\u5176\u4ed6\u529f\u80fd<\/h2>\n<p>Stratis \u9084\u652f\u6301\u5feb\u7167\u529f\u80fd\uff0c\u9019\u5c0d\u65bc\u6578\u64da\u4fdd\u8b77\u975e\u5e38\u91cd\u8981\u3002\u8981\u5275\u5efa\u5feb\u7167\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre><code>sudo stratis snapshot create mypool\/myvolume mysnapshot<\/code><\/pre>\n<p>\u6b64\u5916\uff0cStratis \u9084\u652f\u6301\u58d3\u7e2e\u548c\u52a0\u5bc6\u529f\u80fd\u3002\u9019\u4e9b\u529f\u80fd\u53ef\u4ee5\u901a\u904e\u5728\u5275\u5efa\u5b58\u5132\u6c60\u6216\u908f\u8f2f\u5377\u6642\u6307\u5b9a\u76f8\u61c9\u7684\u9078\u9805\u4f86\u555f\u7528\u3002<\/p>\n<h2 id=\"%e7%b8%bd%e7%b5%90-yzihrdonGl\">\u7e3d\u7d50<\/h2>\n<p>Stratis \u662f\u4e00\u500b\u5f37\u5927\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u7c21\u5316 CentOS 8 \u4e2d\u7684\u672c\u5730\u5b58\u5132\u7ba1\u7406\u3002\u901a\u904e\u5176\u76f4\u89c0\u7684\u547d\u4ee4\u884c\u754c\u9762\uff0c\u7528\u6236\u53ef\u4ee5\u8f15\u9b06\u5275\u5efa\u548c\u7ba1\u7406\u5b58\u5132\u6c60\u53ca\u908f\u8f2f\u5377\uff0c\u4e26\u5229\u7528\u5feb\u7167\u3001\u58d3\u7e2e\u548c\u52a0\u5bc6\u7b49\u529f\u80fd\u4f86\u4fdd\u8b77\u6578\u64da\u3002\u5c0d\u65bc\u9700\u8981\u9ad8\u6548\u7ba1\u7406\u5b58\u5132\u7684\u7528\u6236\u4f86\u8aaa\uff0cStratis \u63d0\u4f9b\u4e86\u4e00\u500b\u7406\u60f3\u7684\u89e3\u6c7a\u65b9\u6848\u3002<\/p>\n<p>\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u53ef\u9760\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2f VPS<\/a> \u89e3\u6c7a\u65b9\u6848\uff0cServer.HK \u63d0\u4f9b\u591a\u7a2e\u9078\u64c7\uff0c\u6eff\u8db3\u4e0d\u540c\u9700\u6c42\u7684\u7528\u6236\u3002\u7121\u8ad6\u662f\u4f01\u696d\u9084\u662f\u500b\u4eba\u7528\u6236\uff0c\u6211\u5011\u7684 <a href=\"https:\/\/server.hk\">\u4f3a\u670d\u5668<\/a> \u90fd\u80fd\u70ba\u60a8\u63d0\u4f9b\u7a69\u5b9a\u7684\u6027\u80fd\u548c\u5b89\u5168\u7684\u74b0\u5883\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u63a2\u7d22\u5982\u4f55\u5728 CentOS 8 \u4e2d\u4f7f\u7528 Stratis \u9ad8\u6548\u7ba1\u7406\u672c\u5730\u5b58\u5132\uff0c\u7c21\u5316\u5b58\u5132\u914d\u7f6e\u8207\u7ba1\u7406\u6d41\u7a0b\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4924],"tags":[],"class_list":["post-43958","post","type-post","status-publish","format-standard","hentry","category-setup-tutorials"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/43958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=43958"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/43958\/revisions"}],"predecessor-version":[{"id":43959,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/43958\/revisions\/43959"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=43958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=43958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=43958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}