{"id":396,"date":"2010-08-12T22:29:09","date_gmt":"2010-08-12T13:29:09","guid":{"rendered":"http:\/\/153.126.194.20\/?p=396"},"modified":"2024-11-17T15:24:25","modified_gmt":"2024-11-17T06:24:25","slug":"ubuntu-lvm","status":"publish","type":"post","link":"https:\/\/funaori.com\/ja\/2010\/08\/12\/ubuntu-lvm\/","title":{"rendered":"ubuntu\/lvm"},"content":{"rendered":"<h2 id=\"content_1_0\">LVM  <a class=\"anchor_super\" id=\"r14c8a05\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Flvm#r14c8a05\" title=\"r14c8a05\">\u2020<\/a><\/h2>\n<p>LVM\u306e\u8a2d\u5b9a\u304c\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u76f4\u63a5\u547c\u3076\u306e\u3067\u306f\u306a\u304f,\u3044\u3061\u3069LVM\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u79fb\u3063\u3066\u304b\u3089\u5b9f\u884c\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u306b\u306a\u3063\u305f\u3088\u3046\u3059.<\/p>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h3 id=\"content_1_1\">OS\u5165\u308c\u66ff\u3048\u6642\u306blvm\u3092\u5fa9\u6d3b\u3055\u305b\u308b  <a class=\"anchor_super\" id=\"jf6172e2\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Flvm#jf6172e2\" title=\"jf6172e2\">\u2020<\/a><\/h3>\n<p>\u30c7\u30a3\u30b9\u30af\u3092\u305d\u306e\u307e\u307e\u6b8b\u3057\u3066\u3044\u308b\u5834\u5408\u306f\uff0clv\u3092active\u306b\u3059\u308c\u3070\u4f7f\u3048\u308b\u306f\u305a.<\/p>\n<pre>$lvn\r\nlvn&gt; lvscan\r\n inactive          '\/dev\/vg01\/lvol0' [931.52 GB] inherit\r\nlvm&gt; lvdisplay vg01\r\n  --- Logical volume ---\r\n  LV Name                \/dev\/vg01\/lvol0\r\n  VG Name                vg01\r\n  LV UUID                8pbyfm-Gu2p-Ztbe-c07W-kloz-dNo1-YTJWWc\r\n  LV Write Access        read\/write\r\n  LV Status              NOT available\r\n  LV Size                931.52 GB\r\n  Current LE             238468\r\n  Segments               2\r\n  Allocation             inherit\r\n  Read ahead sectors     auto<\/pre>\n<ul class=\"list1\" style=\"padding-left:16px;margin-left:16px\">\n<li>Status\u304cNOT available\u306b\u306a\u3063\u3066\u3044\u308b\u306e\u3067\u3001available\u306b\u3059\u308b.\n<pre>lvm&gt; lvchange -ay vg01\r\nlvm&gt; lvdisplay \r\n  --- Logical volume ---\r\n  LV Name                \/dev\/vg01\/lvol0\r\n  VG Name                vg01\r\n  LV UUID                8pbyfm-Gu2p-Ztbe-c07W-kloz-dNo1-YTJWWc\r\n  LV Write Access        read\/write\r\n  LV Status              available\r\n  # open                 0\r\n  LV Size                931.52 GB\r\n  Current LE             238468\r\n  Segments               2\r\n  Allocation             inherit\r\n  Read ahead sectors     auto\r\n  - currently set to     256\r\n  Block device           252:0\r\nlvm&gt; lvscan\r\n  ACTIVE            '\/dev\/vg01\/lvol0' [931.52 GB] inherit<\/pre>\n<\/li>\n<li>\u30de\u30a6\u30f3\u30c8\u3059\u308b\n<pre>$ sudo mount \/dev\/vg01\/lvol0 \/mnt\/hoge<\/pre>\n<\/li>\n<\/ul>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h3 id=\"content_1_2\">\u30c7\u30a3\u30b9\u30af\u3092\u4ea4\u63db\u3059\u308b  <a class=\"anchor_super\" id=\"y6d3ff3b\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Flvm#y6d3ff3b\" title=\"y6d3ff3b\">\u2020<\/a><\/h3>\n<p>PT1\u306b\u79fb\u884c\u3057\u3066\u304b\u3089MPEG-2 TS\u3067\u9332\u753b\u3059\u308b\u3088\u3046\u306b\u306a\u308a\u30c7\u30a3\u30b9\u30af\u306e\u5bb9\u91cf\u304c\u305f\u308a\u306a\u304f\u306a\u308a\u307e\u3057\u305f\u3002HDD\u306e\u4fa1\u683c\u3082\u5b89\u304f\u306a\u3063\u305f\u306e\u3068\u3001\u305d\u308d\u305d\u308d\u6545\u969c\u3057\u305d\u3046\u306a\u4e88\u611f\u304c\u3059\u308b\u306e\u3067500GB\u30682TB\u306e\u30c7\u30a3\u30af\u30b9\u3092\u4ea4\u63db\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n\u53c2\u8003<\/p>\n<ul class=\"list1\" style=\"padding-left:16px;margin-left:16px\">\n<li><a href=\"http:\/\/dar66dar.blog74.fc2.com\/blog-entry-13.html\" rel=\"nofollow\">\u3060\u30fc\u306b\u3063\u304d<\/a><\/li>\n<\/ul>\n<div class=\"jumpmenu\"><a href=\"#navigator\">\u2191<\/a><\/div>\n<h4 id=\"content_1_3\">\u624b\u9806  <a class=\"anchor_super\" id=\"i18656e7\" href=\"http:\/\/192.168.1.4\/www_old\/linux\/index.php?ubuntu%2Flvm#i18656e7\" title=\"i18656e7\">\u2020<\/a><\/h4>\n<ul class=\"list1\" style=\"padding-left:16px;margin-left:16px\">\n<li>\u30c7\u30a3\u30b9\u30af\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8<br \/>\n\u53e4\u3044\u30c7\u30a3\u30b9\u30af(\/dev\/sdb1)\u306f\u307e\u3060\u3064\u3051\u305f\u307e\u307e\u65b0\u3057\u3044\u30c7\u30a3\u30b9\u30af(\/dev\/sdf)\u3092\u7269\u7406\u7684\u306b\u63a5\u7d9a\u3057\u307e\u3059\u3002<br \/>\nfdisk\u3092\u4f7f\u3044\u30c7\u30a3\u30b9\u30af\u3092\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<pre># sudo fdisk \/dev\/sdf<\/pre>\n<p>\u8a73\u7d30\u306f\u308f\u3059\u308c\u307e\u3057\u305f\u304c\u3001\"n\"\u3067\u57fa\u672c\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u4f5c\u308a\u3001\"t\"\u3067\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u5f62\u5f0f\u3092\u5909\u66f4(lvm \"8e\")\u3057\u3001\"w\"\u3067\u4fdd\u5b58\u3057\u305f\u3068\u601d\u3044\u307e\u3059\u3002<\/li>\n<li>lvm\u306e\u7269\u7406\u30dc\u30ea\u30e5\u30fc\u30e0\u306b\u8ffd\u52a0\n<pre># sudo lvm\r\nlvm&gt; pvcreate \/dev\/sdf1<\/pre>\n<p>\u73fe\u72b6\u3092\u78ba\u8a8d\u3059\u308b<\/p>\n<pre>lvm&gt; pvscan<\/pre>\n<p>\/dev\/sdf1\u306f\u3069\u306e\u30dc\u30ea\u30e5\u30fc\u30e0\u306b\u3082\u5c5e\u3057\u3066\u3044\u306a\u3044\u306f\u305a\u3067\u3059\u3002<\/li>\n<li>\u7269\u7406\u30dc\u30ea\u30e5\u30fc\u30e0\u3092\u30dc\u30ea\u30e5\u30fc\u30e0\u30b0\u30eb\u30fc\u30d7\u306b\u8ffd\u52a0\u3059\u308b\n<pre>lvm&gt; vgextend vg01 \/dev\/sdf1<\/pre>\n<\/li>\n<li>\u53d6\u308a\u5916\u3059\u30c7\u30a3\u30b9\u30af\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5909\u66f4\u3059\u308b\n<pre>lvm&gt; pvchange -xn \/dev\/sdb1<\/pre>\n<\/li>\n<li>\u30c7\u30a3\u30b9\u30af\u5185\u5bb9\u3092\u79fb\u52d5\u3059\u308b\n<pre>lvm&gt; pvmove \/dev\/sdb1 \/dev\/sdf1<\/pre>\n<\/li>\n<li>\u30c7\u30a3\u30b9\u30af\u3092\u30dc\u30ea\u30e5\u30fc\u30e0\u30b0\u30eb\u30fc\u30d7\u304b\u3089\u53d6\u308a\u5916\u3059\n<pre>lvm&gt; vgreduce vg01 \/dev\/sdb1<\/pre>\n<\/li>\n<li>\u30dc\u30ea\u30e5\u30fc\u30e0\u30b0\u30eb\u30fc\u30d7\u306e\u5bb9\u91cf\u3092\u5909\u66f4\u3059\u308b<br \/>\n\u30c7\u30a3\u30b9\u30af\u306e\u7a7a\u304d\u5bb9\u91cf\u3092\u78ba\u8a8d\u3059\u308b<\/p>\n<pre>lvm&gt; pvscan<\/pre>\n<p>free\u3068\u306a\u3063\u3066\u3044\u308b\u5bb9\u91cf\u3092\u78ba\u8a8d\u3059\u308b\u3002<\/p>\n<pre>lvm&gt; lvextend -L +400G \/dev\/vg01\/lvol0<\/pre>\n<p>400GB\u62e1\u5f35\u3059\u308b<\/li>\n","protected":false},"excerpt":{"rendered":"<p>LVM \u2020 LVM\u306e\u8a2d\u5b9a\u304c\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u76f4\u63a5\u547c\u3076\u306e\u3067\u306f\u306a\u304f,\u3044\u3061\u3069LVM\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\u306b\u79fb\u3063\u3066\u304b\u3089\u5b9f\u884c\u3059\u308b\u3088\u3046\u306b\u5909\u66f4\u306b\u306a\u3063\u305f\u3088\u3046\u3059. \u2191 OS\u5165\u308c\u66ff\u3048\u6642\u306blvm\u3092\u5fa9\u6d3b\u3055\u305b\u308b \u2020 \u30c7\u30a3\u30b9\u30af\u3092\u305d\u306e\u307e\u307e\u6b8b\u3057\u3066\u3044\u308b\u5834\u5408\u306f\uff0clv\u3092&hellip; <a class=\"more-link\" href=\"https:\/\/funaori.com\/ja\/2010\/08\/12\/ubuntu-lvm\/\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">ubuntu\/lvm<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"ja","_original_post":"396","footnotes":""},"categories":[14],"tags":[],"class_list":["post-396","post","type-post","status-publish","format-standard","hentry","category-ubuntu","ja","entry"],"_links":{"self":[{"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/posts\/396","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/comments?post=396"}],"version-history":[{"count":1,"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/posts\/396\/revisions"}],"predecessor-version":[{"id":397,"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/posts\/396\/revisions\/397"}],"wp:attachment":[{"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/media?parent=396"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/categories?post=396"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/funaori.com\/wp-json\/wp\/v2\/tags?post=396"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}