{"id":65,"date":"2023-09-21T23:09:33","date_gmt":"2023-09-21T14:09:33","guid":{"rendered":"http:\/\/blog.takeh.org\/?p=65"},"modified":"2023-09-26T05:29:58","modified_gmt":"2023-09-25T20:29:58","slug":"ceph-fs%e3%82%92%e5%88%a9%e7%94%a8%e3%81%99%e3%82%8blinux-client%e7%b7%a8","status":"publish","type":"post","link":"https:\/\/blog.takeh.org\/?p=65","title":{"rendered":"Ceph FS\u3092\u5229\u7528\u3059\u308b(Linux      Client\u7de8)"},"content":{"rendered":"\n<p><a href=\"http:\/\/blog.takeh.org\/?p=55\">\u524d\u56de\u306e\u8a18\u4e8b<\/a>\u306e\u7d9a\u304d\u3092\u66f8\u3053\u3046\u3068\u3057\u305f\u306e\u3060\u3051\u3069\u3001\u601d\u3063\u305f\u3088\u308a\u96e3\u3057\u305d\u3046\u3067\u6bb5\u968e\u3092\u8e0f\u3080\u5fc5\u8981\u304c\u3042\u3063\u305f\u305f\u3081\u3001Linux Client\u7de8\u3092\u5148\u306b\u66f8\u304f\u3002\u3084\u308a\u305f\u3044\u3053\u3068\u306f\u3001\u81ea\u52d5\u7684\u306b\u30de\u30a6\u30f3\u30c8\u3055\u308c\u308bPVE\u30af\u30e9\u30b9\u30bf\u5916\u306eLinux\u30de\u30b7\u30f3\u304b\u3089CephFS\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3042\u308b\u3002\u624b\u9806\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>CephFS\u306e\u8a2d\u5b9a\u3092\u4f5c\u6210\u3002<\/li>\n\n\n\n<li>CephX\u30e6\u30fc\u30b6\u3092\u4f5c\u6210\u3057\u3001secret\u60c5\u5831\u3092\u751f\u6210<\/li>\n\n\n\n<li>mount<\/li>\n\n\n\n<li>(\u5fc5\u8981\u306a\u3089) fstab\u306b\u8ffd\u52a0<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">CephFS\u306e\u8a2d\u5b9a\u3092\u4f5c\u6210<\/h3>\n\n\n\n<p>Ceph\u306e<a href=\"https:\/\/docs.ceph.com\/\">\u516c\u5f0f\u30de\u30cb\u30e5\u30a2\u30eb<\/a>\u306e<a href=\"https:\/\/docs.ceph.com\/en\/latest\/cephfs\/mount-prerequisites\/\">Mount CephFS: Prerequisites<\/a>\u306b\u66f8\u3044\u3066\u3042\u308b\u901a\u308a\u306a\u306e\u3060\u304c\u3001\u307e\u305a\u306f\u3001\u30e2\u30cb\u30bf\u30fc\u30ce\u30fc\u30c9\u4e0a\u3067\u8a2d\u5b9a\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">tana02$ sudo ceph config generate-minimal-conf\n[global]\n\tfsid = 1c9be8c9-074b-450b-aab0-03814db6932e\n\tmon_host = [v2:192.168.0.202:3300\/0,v1:192.168.0.202:6789\/0] [v2:192.168.0.203:3300\/0,v1:192.168.0.203:6789\/0] [v2:192.168.0.204:3300\/0,v1:192.168.0.204:6789\/0]<\/pre>\n\n\n\n<p>\u3053\u308c\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u5074\u306e\/etc\/ceph\/ceph.conf\u3068\u3057\u3066\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">CephX\u306e\u30e6\u30fc\u30b6\u767b\u9332<\/h3>\n\n\n\n<p>\u3053\u308c\u3082\u30e2\u30cb\u30bf\u30fc\u30ce\u30fc\u30c9\u4e0a\u3067\u884c\u3046\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">takeh-t@tana02:~$ sudo ceph fs authorize cephfs client.fsuser \/samba_fs rw\n[client.fsuser]\n\tkey = AQDCOwx&lt;em>&amp;lt;\u4e2d\u7565&amp;gt;&lt;\/em>==<\/pre>\n\n\n\n<p>fsuser\u3068\u3044\u3046\u306e\u304c\u4eca\u56de\u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u3002\u305d\u306e\u5f8c\u306e\/samba_fs\u306f\u3001CephFS\u4e0a\u306e\u30d1\u30b9\u3067\u3053\u3053\u4ee5\u4e0b\u3092\u30a2\u30af\u30bb\u30b9\u53ef\u80fd(rw)\u3059\u308b\u3068\u3044\u3046\u3082\u306e\u3002\u3053\u306e\u60c5\u5831\u3092\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306e\/etc\/ceph\/ceph.client.fsuser.keyring \u306b\u683c\u7d0d\u3059\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">mount<\/h3>\n\n\n\n<p>cephfs\u3078\u306e\u30a2\u30af\u30bb\u30b9\u81ea\u4f53\u306fLinux Kernel\u5185\u306b\u6a5f\u80fd\u304c\u3042\u308b\u304c\u3001mount\u3059\u308b\u306b\u306f\u3001mount.ceph(8)\u304c\u5fc5\u8981\u3067\u3001\u3053\u308c\u306fceph-common\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ sudo apt install ceph-common<\/pre>\n\n\n\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5f8c\u306f\u30de\u30a6\u30f3\u30c8\u3059\u308b\u3002\u9069\u5f53\u306a\u30de\u30a6\u30f3\u30c8\u30dd\u30a4\u30f3\u30c8\u3092\u4f5c\u3063\u305f\u5f8c\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u53ef\u80fd\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ sudo mount -t ceph fsuser@.cephfs=\/samba_fs\/ \/mnt\/cephfs<\/pre>\n\n\n\n<p>\u8ffd\u8a18: \u3053\u306e\u6307\u5b9a\u306e\u4ed5\u65b9\u306f\u3069\u3046\u3082\u3042\u307e\u308a\u63a8\u5968\u3055\u308c\u306a\u3044\u3089\u3057\u304f\u74b0\u5883\u306b\u3088\u3063\u3066\u52d5\u4f5c\u3057\u306a\u3044\u3002<br>\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u66f8\u5f0f\u304c\u826f\u3044\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ sudo mount -t ceph :\/samba_fs \/mnt\/cephfs -o name=fsuser<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"bash\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">takeh-t@tanan2:~$ df\nFilesystem 1K-blocks Used Available Use% Mounted on\ntmpfs 385264 1484 383780 1% \/run\n\/dev\/mmcblk1p3 11042020 306108 10153208 3% \/\n\/dev\/sda1 31315772 8229312 21470128 28% \/usr\ntmpfs 1926316 112428 1813888 6% \/dev\/shm\ntmpfs 5120 4 5116 1% \/run\/lock\n\/dev\/mmcblk1p1 60479 6182 54298 11% \/boot\/efi\n\/dev\/sda5 31333180 1386236 28329744 5% \/var\n\/dev\/sda7 43833684 2162736 39412108 6% \/home\n\/dev\/sda6 15640948 324976 14499640 3% \/opt\ntmpfs 385260 40 385220 1% \/run\/user\/1000\nfsuser@1c9be8c9-074b-450b-aab0-03814db6932e.cephfs=\/samba_fs\/ 5451227136 122880 5451104256 1% \/mnt\/cephfs<\/pre>\n\n\n\n<p>fsid\u304c\u51fa\u529b\u306b\u542b\u307e\u308c\u308b\u306e\u3067df\u30b3\u30de\u30f3\u30c9\u306f\u3060\u3044\u3076\u898b\u3065\u3089\u3044\u3002\u3002\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u56de\u306e\u8a18\u4e8b\u306e\u7d9a\u304d\u3092\u66f8\u3053\u3046\u3068\u3057\u305f\u306e\u3060\u3051\u3069\u3001\u601d\u3063\u305f\u3088\u308a\u96e3\u3057\u305d\u3046\u3067\u6bb5\u968e\u3092\u8e0f\u3080\u5fc5\u8981\u304c\u3042\u3063\u305f\u305f\u3081\u3001Linux Client\u7de8\u3092\u5148\u306b\u66f8\u304f\u3002\u3084\u308a\u305f\u3044\u3053\u3068\u306f\u3001\u81ea\u52d5\u7684\u306b\u30de\u30a6\u30f3\u30c8\u3055\u308c\u308bPVE\u30af\u30e9\u30b9\u30bf\u5916\u306eLinux\u30de\u30b7\u30f3\u304b\u3089CephFS\u3092\u5229\u7528 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[13,16],"class_list":["post-65","post","type-post","status-publish","format-standard","hentry","category-homelab","tag-ceph","tag-linux"],"_links":{"self":[{"href":"https:\/\/blog.takeh.org\/index.php?rest_route=\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.takeh.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.takeh.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.takeh.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.takeh.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65"}],"version-history":[{"count":7,"href":"https:\/\/blog.takeh.org\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions"}],"predecessor-version":[{"id":94,"href":"https:\/\/blog.takeh.org\/index.php?rest_route=\/wp\/v2\/posts\/65\/revisions\/94"}],"wp:attachment":[{"href":"https:\/\/blog.takeh.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.takeh.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.takeh.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}