{"id":4016,"date":"2024-08-08T04:52:49","date_gmt":"2024-08-07T19:52:49","guid":{"rendered":"https:\/\/www.kinryo.net\/?p=4016"},"modified":"2024-12-09T15:47:20","modified_gmt":"2024-12-09T06:47:20","slug":"%ef%bc%92%ef%bc%9adrbd%e3%81%ae%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab","status":"publish","type":"post","link":"https:\/\/www.kinryo.net\/?p=4016","title":{"rendered":"\uff12\uff1aDRBD\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>\u3053\u308c\u306felrepo\u306b\u3042\u308b\u306e\u3067<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">rpm &#8211;import https:\/\/www.elrepo.org\/RPM-GPG-KEY-elrepo.org<\/span><br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">dnf install https:\/\/www.elrepo.org\/elrepo-release-9.el9.elrepo.noarch.rpm<\/span><br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">dnf install kmod-drbd9x drbd9x-utils<\/span><br \/>\n<span style=\"color: #ff6600;\">\u30a8\u30e9\u30fc: \u30c8\u30e9\u30f3\u30b6\u30af\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u30a8\u30e9\u30fc:<\/span><br \/>\n<span style=\"color: #ff6600;\">\u30d5\u30a1\u30a4\u30eb \/lib\/drbd\/drbdadm-84 (\u30d1\u30c3\u30b1\u30fc\u30b8 drbd9x-utils-9.28.0-1.el9.elrepo.x86_64 \u304b\u3089) \u306f\u3001\u30d1\u30c3\u30b1\u30fc\u30b8 drbd-utils-9.26.0-1.el9.x86_64 \u304b\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u7af6\u5408\u3057\u3066\u3044\u307e\u3059\u3002<\/span><br \/>\n\u306a\u3069\u3068\u30a8\u30e9\u30fc\u304c\u3044\u3063\u3071\u3044\u51fa\u3066\u3044\u308b\uff01<br \/>\n\u4ee5\u524d\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5206\u304c\u6b8b\u3063\u3066\u3044\u308b\u306e\u3067<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">dnf remove drbd-utils-9.26.0-1.el9.x86_64<\/span><br \/>\n\u524a\u9664\u3055\u308c\u305f\u306e\u3067\u518d\u5ea6<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">dnf install kmod-drbd9x drbd9x-utils<\/span><\/p>\n<p>\/etc\/drbd.d\/r0.res \u3068\u3057\u3066\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u5272\u308a\u5f53\u3066\u308b\u30c7\u30a3\u30b9\u30af\u306fsmb6,smb7\u5171 vde\u306b\u3057\u3066\u3044\u308b\u3002\u53c8\u3001\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u306fDRBD\u3088\u3046\u306b192.168.135.0\/24\u3092\u5272\u308a\u5f53\u3066\u3066\u3044\u308b\u304c\u73fe\u5728\u306f\u3053\u306e\u30cd\u30c3\u30c8\u30ef\u30fc\u30af\u304c\u7121\u3044\u306e\u3067<a href=\"https:\/\/www.kinryo.net\/?p=3996\">https:\/\/www.kinryo.net\/?p=3996<\/a>\u3092\u53c2\u8003\u3057\u3066\u4f5c\u3063\u3066\u304a\u304f\u3002br1\u306f\u56fa\u5b9a\u30a2\u30c9\u30ec\u30b9\u3067smb6\u306b\u306f192.168.135.66\u306b\u3057\u3001smb7\u306f192.168.135.67\u306b\u8a2d\u5b9a\u3059\u308b\u3002<br \/>\n<strong>\u3053\u3053\u307e\u3067\u3092\u3082\u3046\u4e00\u65b9\u306e\u30db\u30b9\u30c8\u3067\u3082\u3084\u308b\u3002<\/strong><\/p>\n<p><span style=\"color: #ff6600;\"><span style=\"color: #333333;\">drbd\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u308b<\/span><br \/>\n# <\/span><span style=\"color: #008000;\">gedit \/etc\/drbd.d\/r0.res<\/span><br \/>\n<span style=\"color: #0000ff;\">resource r0 {<\/span><br \/>\n<span style=\"color: #0000ff;\">\u3000\u3000protocol C;<\/span><br \/>\n<span style=\"color: #0000ff;\">\u3000\u3000disk \/dev\/vde;<\/span><br \/>\n<span style=\"color: #0000ff;\">\u3000\u3000device \/dev\/drbd0;<\/span><br \/>\n<span style=\"color: #0000ff;\">\u3000\u3000meta-disk internal;<\/span><br \/>\n<span style=\"color: #0000ff;\">\u3000\u3000on smb6 {<\/span><br \/>\n<span style=\"color: #0000ff;\">\u3000\u3000\u3000\u3000address 192.168.135.66:7789;<\/span><br \/>\n<span style=\"color: #0000ff;\">\u3000\u3000}<\/span><br \/>\n<span style=\"color: #0000ff;\">\u3000\u3000on smb7 {<\/span><br \/>\n<span style=\"color: #0000ff;\">\u3000\u3000\u3000\u3000address 192.168.135.67:7789;<\/span><br \/>\n<span style=\"color: #0000ff;\">\u3000\u3000}<\/span><br \/>\n<span style=\"color: #0000ff;\">}<br \/>\n<\/span>\u6b21\u306b usage-count no \u3092\u8a2d\u5b9a\u3057\u307e\u3059\u304c\u3001\u3053\u306e\u610f\u5473\u306f<a href=\"https:\/\/linbit.com\/drbd-user-guide\/drbd-guide-9_0-ja\/\">https:\/\/linbit.com\/drbd-user-guide\/drbd-guide-9_0-ja\/<\/a>\u306b\u3088\u308b\u3068<br \/>\n<span style=\"color: #993300;\">The DRBD project keeps statistics about the usage of various DRBD versions. This is done by contacting an HTTP server every time a new DRBD version is installed on a system. This can be disabled by setting usage-count no;. The default is usage-count ask; which will prompt you every time you upgrade DRBD.<br \/>\n<span style=\"color: #333333;\">\u3068\u3042\u308b\u306e\u3067\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u8d77\u52d5\u6642\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u304c\u3042\u308b\u304b\u5e38\u306b\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3088\u3046\u3067\u3059\u306e\u3067\u3001\u3053\u308c\u3092\u6b62\u3081\u308b\uff08<strong>\u3082\u3061\u308d\u3093\u4e21\u30db\u30b9\u30c8\u3067<\/strong>\uff09<br \/>\n<span style=\"color: #ff6600;\"># <\/span><span style=\"color: #008000;\">gedit \/etc\/drbd.d\/global_common.conf<\/span><br \/>\n<\/span><\/span><span style=\"color: #0000ff;\">global {<\/span><br \/>\n<span style=\"color: #0000ff;\">\u3000\u3000#usage-count yes;<\/span>\u3000\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057<br \/>\n<span style=\"color: #0000ff;\">\u3000\u3000usage-count no;<\/span>\u3000\u3000\u633f\u5165<br \/>\n\u5f8c\u7565<br \/>\n\u30c7\u30a3\u30b9\u30af\u306e\u521d\u671f\u5316\u3068\u3001\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u307e\u3059\u304c\u3001<strong>\u3053\u308c\u3092\u4e21\u30db\u30b9\u30c8\u3067\u3084\u308a\u307e\u3059\u3002<br \/>\n<\/strong><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">dd if=\/dev\/zero of=\/dev\/vde bs=1M count=1<\/span><br \/>\n\u3053\u308c\u306f\u5148\u982d\u306e\uff11M\u30d0\u30a4\u30c8\u3092\u30bc\u30ed\u3092\u66f8\u304d\u8fbc\u3080<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">drbdadm create-md r0<\/span><br \/>\n<strong><\/strong><strong>\u4e21\u30db\u30b9\u30c8\u3067drbd\u3092\u8d77\u52d5\u3059\u308b<br \/>\n<\/strong>[root@smb6 ~]<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">systemctl start drbd<br \/>\n<span style=\"color: #333333;\">[root@smb6 ~]<\/span><span style=\"color: #ff6600;\"># <\/span>systemctl enable drbd<br \/>\n<\/span><span style=\"color: #008000;\"><\/span>[root@smb6 ~]<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">drbdadm status r0<\/span><br \/>\n<span style=\"color: #ff6600;\">r0 role:Secondary<\/span><br \/>\n<span style=\"color: #ff6600;\">\u00a0 disk:Inconsistent<\/span><br \/>\n<span style=\"color: #ff6600;\">\u00a0 smb7 connection:ga<br \/>\n<\/span><span style=\"color: #ff6600;\"><span style=\"color: #333300;\">\u3082\u3046\u7247\u65b9\u304c\u307e\u3060\u306a\u306e\u3067\u3001Connecting \u306b\u306a\u3063\u3066\u3044\u308b\u3002\u3082\u3046\u7247\u65b9\u306e\u30db\u30b9\u30c8\u3082<br \/>\n<\/span><\/span>[root@smb6 ~]<span style=\"color: #ff6600;\"># <\/span><span><span style=\"color: #008000;\">systemctl start drbd<br \/>\n<span style=\"color: #333333;\">[root@smb7 ~]<\/span><span style=\"color: #ff6600;\">#<\/span> systemctl start drbd<br \/>\n<\/span><\/span><span><span style=\"color: #008000;\"><\/span><\/span><span><\/span>[root@smb6 ~]<span style=\"color: #ff6600;\"># <\/span><span style=\"color: #008000;\">drbdadm status r0<br \/>\n<span style=\"color: #ff6600;\">r0 role:Secondary<\/span><br \/>\n<span style=\"color: #ff6600;\">\u3000disk:Inconsistent<\/span><br \/>\n<span style=\"color: #ff6600;\">\u3000smb6 connection:Connecting<\/span><br \/>\n<span style=\"color: #333333;\">\u4e21\u30db\u30b9\u30c8\u3068\u3082Secondary\u306a\u306e\u3067Connecting \u306b\u306a\u3063\u3066\u3044\u308b\u3002<\/span><br \/>\n<span style=\"color: #333333;\">\u3067\u3001smb6\u3067<br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">drbdadm primary &#8211;force r0<\/span><br \/>\n<span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">drbdadm status r0<\/span><br \/>\n<span style=\"color: #ff6600;\">r0 role:Primary<\/span><br \/>\n<span style=\"color: #ff6600;\">\u3000disk:UpToDate<\/span><br \/>\n<span style=\"color: #ff6600;\">\u3000smb7 role:Secondary<\/span><br \/>\n<span style=\"color: #ff6600;\">\u3000\u3000replication:SyncSource peer-disk:Inconsistent done:0.04<\/span><br \/>\n\u3053\u308c\u3067smb6\u304cprimary\u306b\u306a\u308a\u3001\u540c\u671f\u304c\u59cb\u307e\u3063\u305f\u3002\u79c1\u306e\u5834\u5408\u306f\u30c7\u30a3\u30b9\u30af\u306e\u30b5\u30a4\u30ba\u304c700GiB\u3082\u3042\u308b\u306e\u3067\u540c\u671f\u304c\u7d42\u308f\u308b\u306e\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u3002\u6642\u3005 drbdadm status r0\u3092\u898b\u306a\u304c\u3089\u540c\u671f\u304c\u7d42\u4e86\u3059\u308b\u306e\u3092\u5f85\u3064\u3002\u30b3\u30fc\u30d2\u30fc\u3067\u3082\u98f2\u307f\u306a\u304c\u3089\u5c11\u3057\u4f11\u61a9\u3002\u3053\u306e\u30b9\u30c6\u30a4\u30bf\u30b9\u306e\u6700\u5f8c\u306e Done:10.55 \u304c\u540c\u671f\u304c\u7d42\u4e86\u3057\u305f\u30d1\u30fc\u30bb\u30f3\u30c8\u306a\u306e\u3067\u305d\u308c\u3067\u3069\u308c\u4f4d\u3001\u6642\u9593\u304c\u304b\u304b\u308b\u304b\u898b\u5f53\u304c\u3064\u304f\u3002<\/span><\/span><\/p>\n<p><span style=\"color: #800080;\">\u6ce8\uff1a<\/span><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">drbdadm up r0<\/span><br \/>\n\u3092\u3084\u3063\u305f\u6642\u3001\u904e\u53bb\u306bDRBD\u3092\u4f5c\u6210\u3057\u3066\u3044\u308b\u5834\u5408\u3001\u4e0b\u8a18\u306e\u30a8\u30e9\u30fc\u304c\u8868\u793a\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059<br \/>\n<span style=\"color: #ff6600;\">new-minor r0 0 0: sysfs node &#8216;\/sys\/devices\/virtual\/block\/drbd0&#8217; (already? still?) exists<\/span><br \/>\n<span style=\"color: #ff6600;\">r0: Failure: (161) Minor or volume exists already (delete it first)<\/span><br \/>\n<span style=\"color: #ff6600;\">Command &#8216;drbdsetup new-minor r0 0 0&#8217; terminated with exit code 10<br \/>\n<span style=\"color: #333333;\">\u3053\u306e\u30a8\u30e9\u30fc\u306e\u5bfe\u51e6\u65b9\u6cd5\u306f<a href=\"https:\/\/www.bigbang.mydns.jp\/drbd-x.htm\">https:\/\/www.bigbang.mydns.jp\/drbd-x.htm<\/a>\u306b\u3042\u308a\u307e\u3059\u306e\u3067\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3053\u308c\u306felrepo\u306b\u3042\u308b\u306e\u3067 # rpm &#8211;import https:\/\/www.elrepo.org\/RPM-GPG-KEY-elrepo.org # dnf install https:\/\/www.elr &hellip; <a href=\"https:\/\/www.kinryo.net\/?p=4016\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"vkexunit_cta_each_option":"","footnotes":""},"categories":[29],"tags":[],"class_list":["post-4016","post","type-post","status-publish","format-standard","hentry","category-drbdalmalinux9"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/4016","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4016"}],"version-history":[{"count":29,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/4016\/revisions"}],"predecessor-version":[{"id":4170,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/4016\/revisions\/4170"}],"wp:attachment":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4016"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4016"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4016"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}