{"id":3993,"date":"2024-08-12T05:40:04","date_gmt":"2024-08-11T20:40:04","guid":{"rendered":"https:\/\/www.kinryo.net\/?p=3993"},"modified":"2024-08-12T05:40:04","modified_gmt":"2024-08-11T20:40:04","slug":"%e3%83%96%e3%83%bc%e3%83%88%e3%81%abuuid%e3%81%af%e5%ab%8c%e3%81%84%e3%81%a0%e3%83%bc","status":"publish","type":"post","link":"https:\/\/www.kinryo.net\/?p=3993","title":{"rendered":"\u30d6\u30fc\u30c8\u306bUUID\u306f\u5acc\u3044\u3060\u30fc"},"content":{"rendered":"\r\n<p class=\"wp-block-paragraph\">\u3059\u3054\u3044\u30bf\u30a4\u30c8\u30eb\u3060\u3051\u3069\uff01\u7406\u7531\u306f\u3053\u3046\u3060\u3002<br \/>\u4f55\u3092\u3057\u305f\u304b\u3068\u8a00\u3046\u3068\u3001DRBD\u3092\u4f5c\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u4e00\u3064\u306e\u30b5\u30d6\u30db\u30b9\u30c8\u306epacemaker(PCSD)\u4f4d\u307e\u3067(\u3082\u3061\u308d\u3093clamd, firewall, tripwire, samba etc\u3082\u8a2d\u5b9a\u6e08\u307f\uff09\u3092\u4f5c\u308a\u3053\u308c\u3092dd\u3067\u30b3\u30d4\u30fc\u3059\u308b\u3068\u307b\u3068\u3093\u3069\u306e\u8a2d\u5b9a\u3084\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u306f\u5f15\u304d\u7d99\u3052\u308b\u3002<span style=\"color: #800080;\">\u3053\u3053\u3067\u554f\u984c\u306b\u306a\u308b\u306e\u306f\u3001hostname\u3068ip adderss\u3068\u30d6\u30fc\u30c8\u3059\u308b\u30c7\u30a3\u30b9\u30af\u306eUUID\u304c\u30c0\u30d6\u3063\u3066\u3044\u308b\u4e8b\u3060\u3002<\/span>hostname\u3068ip adderss\u306f\u30b3\u30d4\u30fc\u5143\u306e\u30b5\u30d6\u30db\u30b9\u30c8\u3092\u505c\u6b62\u3057\u305f\u307e\u307e\u3001\u30b3\u30d4\u30fc\u5148\u306e\u30b5\u30d6\u30db\u30b9\u30c8\u3092\u7acb\u3061\u4e0a\u3052\u3001NMCLI\u306a\u3069\u3067\u5909\u66f4\u306f\u51fa\u6765\u308b\u304c\u3001UUID\u306f\u305d\u3046\u306f\u3044\u304b\u306a\u3044\u3001root\u9818\u57df\u306a\u306e\u3067umount\u51fa\u6765\u306a\u3044\u306e\u3067\u3001\u505c\u6b62\u3057\u3066UUID\u3092\u5909\u66f4\u3059\u308b\u3068\u5f53\u305f\u308a\u524d\u3060\u304c\u30d6\u30fc\u30c8\u3057\u306a\u3044\u3002\u3053\u308c\u306b\u306f\u968f\u5206\u60a9\u3093\u3060\u3001\u30b5\u30d6\u30db\u30b9\u30c8\u306a\u306e\u3067root\u306b\u306a\u308b\u9818\u57df\u306f\u5fc5\u305a\/dev\/vda1\u306b\u306a\u308b\u306e\u3067\u3001\u3053\u308c\u3092\u6307\u5b9a\u3057\u305f\u3044\u304c\u305d\u306e\u65b9\u6cd5\u304c\u5206\u304b\u3089\u306a\u3044\u3002google\u5148\u751f\u306b\u805e\u3044\u3066\u3082\u6614\u306e\u65b9\u6cd5\u3067\u3042\u308b\/dev\/sda1\u7b49\u306e\u6307\u5b9a\u65b9\u6cd5\u306f\u51fa\u3066\u6765\u306a\u304b\u3063\u305f\u3002\/etc\/grub.d\u306b\u3042\u308b10_linux\u3092\u3044\u3058\u304f\u308c\u3070\u51fa\u304d\u308b\u307e\u3067\u306f\u5206\u304b\u3063\u305f\u304c\u3001\u79c1\u306e\u62d9\u3044\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30ec\u30d9\u30eb\u3067\u306f\u51fa\u6765\u306a\u304b\u3063\u305f\u3002\u305d\u306e\u5f8c\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306b\u30e9\u30d9\u30eb\u3092\u4ed8\u3051\u305d\u308c\u3092\u6307\u5b9a\u3057\u3066root\u9818\u57df\u3092\u6307\u5b9a\u3067\u304d\u308b\u4e8b\u304c\u5206\u304b\u3063\u305f\u3002\u65e9\u901f\u30aa\u30d5\u30e9\u30a4\u30f3\u3067\u30eb\u30fc\u30c8\u9818\u57df\u306b\u30e9\u30d9\u30eb\u3092\u4ed8\u3051\u308b\u3002\u5148\u305a\u306fvda1\u3092\u4f5c\u308b\u305f\u3081\u306b<br \/><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">losetup \/dev\/loop0 \/dev\/Subhost6\/samba<\/span><br \/><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">kpartx -a \/dev\/loop0<\/span><br \/><span style=\"color: #ff6600;\"># <span style=\"color: #008000;\">l<\/span><\/span><span style=\"color: #008000;\">s -la \/dev\/mapper<\/span><br \/>\u3067\u3053\u3053\u306bloop0p1(\u3053\u308c\u304c\u30d6\u30fc\u30c8\u5f8c\u306evda1)\u304c\u3042\u308b\u306e\u3067<br \/><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">xfs_admin -L smb6-root \/dev\/mapper\/loop0p<\/span>1<br \/>\u3067\u30e9\u30d9\u30eb\u3092\u4ed8\u3051\u3066\u3001UUID\u306e\u307e\u307e\u30d6\u30fc\u30c8\u3001\u305d\u306e\u5f8cgrub\u306e\u7de8\u96c6<br \/><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">gedit \/etc\/default\/grub<\/span><br \/><span style=\"color: #0000ff;\">GRUB_TIMEOUT=5<\/span><br \/><span style=\"color: #0000ff;\">GRUB_DISTRIBUTOR=&#8221;$(sed &#8216;s, release .*$,,g&#8217; \/etc\/system-release)&#8221;<\/span><br \/><span style=\"color: #0000ff;\">GRUB_DEFAULT=saved<\/span><br \/><span style=\"color: #0000ff;\">GRUB_DISABLE_SUBMENU=true<\/span><br \/><span style=\"color: #0000ff;\">GRUB_TERMINAL_OUTPUT=&#8221;console&#8221;<\/span><br \/><span style=\"color: #0000ff;\">GRUB_CMDLINE_LINUX=&#8221;rhgb quiet selinux=0&#8243;<\/span><br \/><span style=\"color: #0000ff;\">GRUB_DISABLE_RECOVERY=&#8221;true&#8221;<\/span><br \/><span style=\"color: #0000ff;\">GRUB_ENABLE_BLSCFG=true<\/span><br \/><span style=\"color: #0000ff;\">GRUB_DISABLE_UUID=true\u3000\u3000\u3000<span style=\"color: #000000;\">\u3053\u308c\u3092\u8ffd\u8a18<\/span><\/span><br \/><span style=\"color: #0000ff;\">GRUB_DISABLE_LINUX_UUID=true\u3000\u3000\u3000<span style=\"color: #000000;\">\u3053\u308c\u3092\u8ffd\u8a18<\/span><\/span><br \/><span style=\"color: #0000ff;\">GRUB_DEVICE=\/dev\/disk\/by-label\/smb6-root<\/span>\u3000\u3000\u3000<span style=\"color: #000000;\">\u3053\u308c\u3092\u8ffd\u8a18<\/span><br \/>\u305d\u3093\u3067<br \/><span style=\"color: #ff6600;\">#<\/span> <span style=\"color: #008000;\">grub2_mkconifg -o \/boot\/grub2\/grub.cfg<\/span><br \/>\u3067\u30d6\u30fc\u30c8\u3059\u308broot\u9818\u57df\u3092\u6307\u5b9a\u3059\u308b\u3002<br \/>\/boot\/grub2\/grub.cfg\u306f<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">\u524d\u7565<br \/><span style=\"color: #ff6600;\">### BEGIN \/etc\/grub.d\/10_linux ###<\/span><br \/><span style=\"color: #ff6600;\">insmod part_msdos<\/span><br \/><span style=\"color: #ff6600;\">insmod xfs<\/span><br \/><span style=\"color: #ff6600;\">set root=&#8217;hd0,msdos1&#8242;<\/span><br \/><span style=\"color: #ff6600;\">insmod part_msdos<\/span><br \/><span style=\"color: #ff6600;\">insmod xfs<\/span><br \/><span style=\"color: #ff6600;\">set boot=&#8217;hd0,msdos1&#8242;<\/span><\/p>\r\n<p><span style=\"color: #ff6600;\">\r\n\r\n<\/span><\/p>\r\n<p class=\"wp-block-paragraph\"><span style=\"color: #ff6600;\"># This section was generated by a script. Do not modify the generated file &#8211; all changes<\/span><br \/><span style=\"color: #ff6600;\"># will be lost the next time file is regenerated. Instead edit the BootLoaderSpec files.<\/span><br \/><span style=\"color: #ff6600;\">#<\/span><br \/><span style=\"color: #ff6600;\"># The blscfg command parses the BootLoaderSpec files stored in \/boot\/loader\/entries and<\/span><br \/><span style=\"color: #ff6600;\"># populates the boot menu. Please refer to the Boot Loader Specification documentation<\/span><br \/><span style=\"color: #ff6600;\"># for the files format: https:\/\/systemd.io\/BOOT_LOADER_SPECIFICATION\/.<\/span><\/p>\r\n<p><span style=\"color: #ff6600;\">\r\n\r\n<\/span><\/p>\r\n<p class=\"wp-block-paragraph\"><span style=\"color: #ff6600;\"># The kernelopts variable should be defined in the grubenv file. But to ensure that menu<\/span><br \/><span style=\"color: #ff6600;\"># entries populated from BootLoaderSpec files that use this variable work correctly even<\/span><br \/><span style=\"color: #ff6600;\"># without a grubenv file, define a fallback kernelopts variable if this has not been set.<\/span><br \/><span style=\"color: #ff6600;\">#<\/span><br \/><span style=\"color: #ff6600;\"># The kernelopts variable in the grubenv file can be modified using the grubby tool or by<\/span><br \/><span style=\"color: #ff6600;\"># executing the grub2-mkconfig tool. For the latter, the values of the GRUB_CMDLINE_LINUX<\/span><br \/><span style=\"color: #ff6600;\"># and GRUB_CMDLINE_LINUX_DEFAULT options from \/etc\/default\/grub file are used to set both<\/span><br \/><span style=\"color: #ff6600;\"># the kernelopts variable in the grubenv file and the fallback kernelopts variable.<\/span><br \/><span style=\"color: #ff6600;\">if [ -z &#8220;${kernelopts}&#8221; ]; then<\/span><br \/><span style=\"color: #ff6600;\">set kernelopts=&#8221;root=\/dev\/disk\/by-label\/smb6-root ro rhgb quiet selinux=0 &#8220;<\/span><br \/><span style=\"color: #ff6600;\">fi<\/span><\/p>\r\n<p><span style=\"color: #ff6600;\">\r\n\r\n<\/span><\/p>\r\n<p class=\"wp-block-paragraph\"><span style=\"color: #ff6600;\">insmod blscfg<\/span><br \/><span style=\"color: #ff6600;\">blscfg<\/span><br \/><span style=\"color: #ff6600;\">### END \/etc\/grub.d\/10_linux ###<\/span><br \/>\u5f8c\u7565<br \/>\u3068\u306a\u3063\u3066\u304a\u308a\u3001<span style=\"color: #ff00ff;\">\u305d\u306e\u5f8c\u30aa\u30d5\u30e9\u30a4\u30f3\u3067xfs_admin\u3067loop0p1(vda1)\u306eUUID\u3092\u5909\u66f4\u3057\u3001\u518d\u8d77\u52d5\u3057\u305f\u304c\u3084\u3063\u3071\u308a\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u30d6\u30fc\u30c8\u3057\u306a\u304b\u3063\u305f\u3002<\/span><br \/><span style=\"color: #ff00ff;\">\u672a\u3060\u306b\u3001\u89e3\u6c7a\u3057\u3066\u306a\u3044<\/span>\u3002\u65b9\u6cd5\u304c\u89e3\u308c\u3070\u3053\u3053\u306b\u66f8\u304d\u8db3\u3057\u307e\u3059\u3002<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>\u3059\u3054\u3044\u30bf\u30a4\u30c8\u30eb\u3060\u3051\u3069\uff01\u7406\u7531\u306f\u3053\u3046\u3060\u3002\u4f55\u3092\u3057\u305f\u304b\u3068\u8a00\u3046\u3068\u3001DRBD\u3092\u4f5c\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u4e00\u3064\u306e\u30b5\u30d6\u30db\u30b9\u30c8\u306epacemaker(PCSD)\u4f4d\u307e\u3067(\u3082\u3061\u308d\u3093clamd, firewall, tripwire, samba etc\u3082 &hellip; <a href=\"https:\/\/www.kinryo.net\/?p=3993\">\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,"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"common","vkexunit_cta_each_option":"","footnotes":""},"categories":[10],"tags":[],"class_list":["post-3993","post","type-post","status-publish","format-standard","hentry","category-linux"],"acf":[],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/3993","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=3993"}],"version-history":[{"count":3,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/3993\/revisions"}],"predecessor-version":[{"id":4043,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=\/wp\/v2\/posts\/3993\/revisions\/4043"}],"wp:attachment":[{"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3993"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3993"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kinryo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3993"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}