{"id":8507,"date":"2023-01-28T14:20:17","date_gmt":"2023-01-28T05:20:17","guid":{"rendered":"https:\/\/lab4ict.com\/system\/?p=8507"},"modified":"2023-06-27T20:54:35","modified_gmt":"2023-06-27T11:54:35","slug":"rhel%e3%81%ab%e3%83%87%e3%83%bc%e3%82%bf%e7%94%a8%e3%81%aelvm%e3%82%92%e8%bf%bd%e5%8a%a0%e3%81%99%e3%82%8b%ef%bc%81","status":"publish","type":"post","link":"https:\/\/lab4ict.com\/system\/archives\/8507","title":{"rendered":"RHEL\u306b\u30c7\u30fc\u30bf\u7528\u306eLVM\u3092\u8ffd\u52a0\u3059\u308b\uff01"},"content":{"rendered":"<p>RHEL\u306b\u30c7\u30fc\u30bf\u7528\u306eLVM\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\u4f5c\u696d\u306f\u3001\u7ba1\u7406\u8005\u6a29\u9650\uff08root\u6a29\u9650\uff09\u3067\u884c\u3044\u307e\u3059\u3002<br \/>\n<!--more--><\/p>\n<h2>LVM\u8ffd\u52a0\u7528\u306e\u30c7\u30a3\u30b9\u30af\u3092\u78ba\u8a8d\u3059\u308b\uff01<\/h2>\n<p>\u6700\u521d\u306bLVM\u8ffd\u52a0\u7528\u306e\u30c7\u30a3\u30b9\u30af\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001\u672a\u4f7f\u7528\u306e\/dev\/sdb\u3092\u30c7\u30fc\u30bf\u7528\u306eLVM\u3068\u3057\u3066\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# fdisk -l\r\n...\r\nDisk \/dev\/sdb: 300 GiB, 322122547200 bytes, 629145600 sectors\r\nUnits: sectors of 1 * 512 = 512 bytes\r\nSector size (logical\/physical): 512 bytes \/ 512 bytes\r\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\r\n<\/pre>\n<h2>GPT\u3067\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3059\u308b\uff01<\/h2>\n<p>GPT\u3067\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# fdisk \/dev\/sdb\r\n\r\nWelcome to fdisk (util-linux 2.32.1).\r\nChanges will remain in memory only, until you decide to write them.\r\nBe careful before using the write command.\r\n\r\nDevice does not contain a recognized partition table.\r\nCreated a new DOS disklabel with disk identifier 0x54ece88b.\r\n\r\nCommand (m for help): g\r\nCreated a new GPT disklabel (GUID: 0A468AE3-B7A9-B640-8558-C00DFCDF04C8).\r\n\r\nCommand (m for help): n\r\nPartition number (1-128, default 1): \r\nFirst sector (2048-629145566, default 2048): \r\nLast sector, +sectors or +size{K,M,G,T,P} (2048-629145566, default 629145566): \r\n\r\nCreated a new partition 1 of type 'Linux filesystem' and of size 300 GiB.\r\n\r\nCommand (m for help): w\r\nThe partition table has been altered.\r\nCalling ioctl() to re-read partition table.\r\nSyncing disks.\r\n<\/pre>\n<p>\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u300c\/dev\/sdb1\u300d\u304c\u4f5c\u6210\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# fdisk -l | grep \/dev\/sdb\r\nDisk \/dev\/sdb: 300 GiB, 322122547200 bytes, 629145600 sectors\r\n\/dev\/sdb1   2048 629145566 629143519  300G Linux filesystem\r\n<\/pre>\n<h2>PV\u3092\u4f5c\u6210\u3059\u308b\uff01<\/h2>\n<p>\u300c\/dev\/sdb1\u300d\u306bPV\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# pvcreate \/dev\/sdb1\r\n  Physical volume &quot;\/dev\/sdb1&quot; successfully created.\r\n<\/pre>\n<p>PV\u304c\u4f5c\u6210\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# pvdisplay\r\n  --- Physical volume ---\r\n  PV Name               \/dev\/sda2\r\n  VG Name               rhel\r\n  PV Size               &lt;19.00 GiB \/ not usable 3.00 MiB\r\n  Allocatable           yes (but full)\r\n  PE Size               4.00 MiB\r\n  Total PE              4863\r\n  Free PE               0\r\n  Allocated PE          4863\r\n  PV UUID               5QYF0Y-Fybx-g23Z-T7zV-t0nH-0DhM-Ga8SPw\r\n   \r\n  &quot;\/dev\/sdb1&quot; is a new physical volume of &quot;&lt;300.00 GiB&quot;\r\n  --- NEW Physical volume ---\r\n  PV Name               \/dev\/sdb1\r\n  VG Name               \r\n  PV Size               &lt;300.00 GiB\r\n  Allocatable           NO\r\n  PE Size               0   \r\n  Total PE              0\r\n  Free PE               0\r\n  Allocated PE          0\r\n  PV UUID               2haKAa-gR53-fB1N-a2pK-KCjk-dFkC-OSdE9B\r\n <\/pre>\n<h2>VG\u3092\u4f5c\u6210\u3059\u308b\uff01<\/h2>\n<p>VG\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# vgcreate data \/dev\/sdb1\r\n  Volume group &quot;data&quot; successfully created\r\n<\/pre>\n<p>VG\u304c\u4f5c\u6210\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# vgdisplay\r\n  --- Volume group ---\r\n  VG Name               data\r\n  System ID             \r\n  Format                lvm2\r\n  Metadata Areas        1\r\n  Metadata Sequence No  1\r\n  VG Access             read\/write\r\n  VG Status             resizable\r\n  MAX LV                0\r\n  Cur LV                0\r\n  Open LV               0\r\n  Max PV                0\r\n  Cur PV                1\r\n  Act PV                1\r\n  VG Size               &lt;300.00 GiB\r\n  PE Size               4.00 MiB\r\n  Total PE              76799\r\n  Alloc PE \/ Size       0 \/ 0   \r\n  Free  PE \/ Size       76799 \/ &lt;300.00 GiB\r\n  VG UUID               4UFtLr-Rpi3-3LLT-YRny-fqkA-1P4I-qOBZE6\r\n   \r\n  --- Volume group ---\r\n  VG Name               rhel\r\n  System ID             \r\n  Format                lvm2\r\n  Metadata Areas        1\r\n  Metadata Sequence No  3\r\n  VG Access             read\/write\r\n  VG Status             resizable\r\n  MAX LV                0\r\n  Cur LV                2\r\n  Open LV               2\r\n  Max PV                0\r\n  Cur PV                1\r\n  Act PV                1\r\n  VG Size               &lt;19.00 GiB\r\n  PE Size               4.00 MiB\r\n  Total PE              4863\r\n  Alloc PE \/ Size       4863 \/ &lt;19.00 GiB\r\n  Free  PE \/ Size       0 \/ 0   \r\n  VG UUID               YEyT85-mJcF-00DS-OehD-kiUa-7hnb-B7z80Z\r\n <\/pre>\n<h2>LV\u3092\u4f5c\u6210\u3059\u308b\uff01<\/h2>\n<p>LV\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002VG\u3092\u5168\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# lvcreate -l 100%Free -n pulp data\r\n  Logical volume &quot;pulp&quot; created.\r\n <\/pre>\n<p>LV\u304c\u4f5c\u6210\u3055\u308c\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# lvdisplay\r\n  --- Logical volume ---\r\n  LV Path                \/dev\/data\/pulp\r\n  LV Name                pulp\r\n  VG Name                data\r\n  LV UUID                nA1MeL-2rb4-RVfe-0ilU-XhLO-EDYu-Oojlda\r\n  LV Write Access        read\/write\r\n  LV Creation host, time satellite.loc.lab4ict.com, 2023-01-28 14:03:14 +0900\r\n  LV Status              available\r\n  # open                 0\r\n  LV Size                &lt;300.00 GiB\r\n  Current LE             76799\r\n  Segments               1\r\n  Allocation             inherit\r\n  Read ahead sectors     auto\r\n  - currently set to     8192\r\n  Block device           253:2\r\n   \r\n  --- Logical volume ---\r\n  LV Path                \/dev\/rhel\/swap\r\n  LV Name                swap\r\n  VG Name                rhel\r\n  LV UUID                YmJ4Hr-Ncas-MLg8-IWkS-8xsd-2cfw-aI4F78\r\n  LV Write Access        read\/write\r\n  LV Creation host, time localhost, 2022-03-24 14:59:41 +0900\r\n  LV Status              available\r\n  # open                 2\r\n  LV Size                2.00 GiB\r\n  Current LE             512\r\n  Segments               1\r\n  Allocation             inherit\r\n  Read ahead sectors     auto\r\n  - currently set to     8192\r\n  Block device           253:1\r\n   \r\n  --- Logical volume ---\r\n  LV Path                \/dev\/rhel\/root\r\n  LV Name                root\r\n  VG Name                rhel\r\n  LV UUID                1Tl6S2-By2K-jWTn-8QvM-F13e-ILHG-8qOEsE\r\n  LV Write Access        read\/write\r\n  LV Creation host, time localhost, 2022-03-24 14:59:41 +0900\r\n  LV Status              available\r\n  # open                 1\r\n  LV Size                &lt;17.00 GiB\r\n  Current LE             4351\r\n  Segments               1\r\n  Allocation             inherit\r\n  Read ahead sectors     auto\r\n  - currently set to     8192\r\n  Block device           253:0\r\n <\/pre>\n<h2>\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u4f5c\u6210\u3059\u308b\uff01<\/h2>\n<p>xfs\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# mkfs.xfs \/dev\/data\/pulp\r\nmeta-data=\/dev\/data\/pulp         isize=512    agcount=4, agsize=19660544 blks\r\n         =                       sectsz=512   attr=2, projid32bit=1\r\n         =                       crc=1        finobt=1, sparse=1, rmapbt=0\r\n         =                       reflink=1    bigtime=0 inobtcount=0\r\ndata     =                       bsize=4096   blocks=78642176, imaxpct=25\r\n         =                       sunit=0      swidth=0 blks\r\nnaming   =version 2              bsize=4096   ascii-ci=0, ftype=1\r\nlog      =internal log           bsize=4096   blocks=38399, version=2\r\n         =                       sectsz=512   sunit=0 blks, lazy-count=1\r\nrealtime =none                   extsz=4096   blocks=0, rtextents=0\r\n<\/pre>\n<h2>\u4f5c\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u30de\u30a6\u30f3\u30c8\u3059\u308b\uff01<\/h2>\n<p>\u4f5c\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u30de\u30a6\u30f3\u30c8\u3057\u307e\u3059\u3002\u307e\u305a\u3001\u30de\u30a6\u30f3\u30c8\u30dd\u30a4\u30f3\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u30de\u30a6\u30f3\u30c8\u30dd\u30a4\u30f3\u30c8\u304c\u3059\u3067\u306b\u5b58\u5728\u3059\u308b\u5834\u5408\u306f\u3001\u4e0d\u8981\u3067\u3059\u3002<br \/>\nxfs\u306e\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# mkdir -p \/var\/lib\/pulp\r\n<\/pre>\n<p>\u4f5c\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u3092\u30de\u30a6\u30f3\u30c8\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# mount \/dev\/data\/pulp \/var\/lib\/pulp\r\n<\/pre>\n<p>\u30de\u30a6\u30f3\u30c8\u3057\u305f\u3053\u3068\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# mount | grep pulp\r\n\/dev\/mapper\/data-pulp on \/var\/lib\/pulp type xfs (rw,relatime,seclabel,attr2,inode64,logbufs=8,logbsize=32k,noquota)\r\n<\/pre>\n<p>\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u306eUUID\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# blkid | grep pulp\r\n\/dev\/mapper\/data-pulp: UUID=&quot;65e451b1-569b-4af2-b05e-1a0480f95961&quot; BLOCK_SIZE=&quot;512&quot; TYPE=&quot;xfs&quot;\r\n<\/pre>\n<h2>\u518d\u8d77\u52d5\u5f8c\u3082\u30de\u30a6\u30f3\u30c8\u3059\u308b\uff01<\/h2>\n<p>\u518d\u8d77\u52d5\u5f8c\u3082\u30de\u30a6\u30f3\u30c8\u3059\u308b\u3088\u3046\u306b\u3001\/etc\/fstab\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# vi \/etc\/fstab\r\n...\r\nUUID=&quot;65e451b1-569b-4af2-b05e-1a0480f95961&quot; \/var\/lib\/pulp xfs defaults 0 2\r\n<\/pre>\n<p>\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\r\n# umount \/var\/lib\/pulp\r\n# df -h | grep \/var\/local\/data01\r\n# mount \/var\/lib\/pulp\r\n# df -h \/var\/lib\/pulp\r\nFilesystem             Size  Used Avail Use% Mounted on\r\n\/dev\/mapper\/data-pulp  300G  2.2G  298G   1% \/var\/lib\/pulp\r\n\r\n<\/pre>\n<p>\u30b5\u30fc\u30d0\u306e\u518d\u8d77\u52d5\u3082\u884c\u3063\u3066\u3001\u30de\u30a6\u30f3\u30c8\u3055\u308c\u308b\u304b\u78ba\u8a8d\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n<p>LVM\u306e\u4f5c\u6210\u3068\u30de\u30a6\u30f3\u30c8\u306f\u3001\u9577\u3044\u624b\u9806\u306b\u306f\u306a\u308a\u307e\u3059\u304c\u3001\u30d1\u30fc\u30c6\u30a3\u30b7\u30e7\u30f3\u306e\u4f5c\u6210\u2192PV\u4f5c\u6210\u2192VG\u4f5c\u6210\u2192LV\u4f5c\u6210\u2192\u30d5\u30a1\u30a4\u30eb\u30b7\u30b9\u30c6\u30e0\u4f5c\u6210\u3068\u9806\u756a\u306b\u4f5c\u696d\u3057\u3066\u3044\u3051\u3070\u96e3\u3057\u3044\u3068\u3053\u308d\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<h2>\u53c2\u8003\u60c5\u5831<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.redhat.com\/en\/technologies\/linux-platforms\/enterprise-linux\" target=\"_blank\" rel=\"noopener\">Red Hat Enterprise Linux<\/a><\/li>\n<\/ul>\n<h2>\u95a2\u9023\u8a18\u4e8b<\/h2>\n<div class=\"sc_getpost\"><a class=\"clearfix\" href=\"https:\/\/lab4ict.com\/system\/archives\/4965\" ><div class=\"sc_getpost_thumb post-box-thumbnail__wrap\"><img decoding=\"async\" src=\"data:image\/gif;base64,R0lGODdhAQABAPAAAN3d3QAAACwAAAAAAQABAAACAkQBADs=\" width=\"150\" height=\"150\" alt=\"\u3010\u8a18\u4e8b\u4e00\u89a7\u3011RHEL\u7cfb\u306eOS\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01\" loading=\"lazy\" data-src=\"https:\/\/lab4ict.com\/system\/wp-content\/uploads\/2022\/04\/fi_rhel_01-150x150.png\" class=\"lazyload\"><\/div><div class=\"title\">\u3010\u8a18\u4e8b\u4e00\u89a7\u3011RHEL\u7cfb\u306eOS\u3092\u4f7f\u3044\u3053\u306a\u3059\uff01<\/div><div class=\"substr\">RHEL\u7cfb\u306eOS\u3092\u4f7f\u3044\u3053\u306a\u3059\u305f\u3081\u306e\u8a18\u4e8b\u4e00\u89a7\u3092\u63b2\u8f09\u3057\u307e\u3059\u3002...<\/div><\/a><\/div>\n<h2>\u95a2\u9023\u66f8\u7c4d\uff08Amazon\uff09<\/h2>\n<p><a href=\"https:\/\/amzn.to\/3H8WqP7\" rel=\"noopener\" target=\"_blank\"><img decoding=\"async\" class=\"paapi5-pa-product-image-source\" src=\"https:\/\/m.media-amazon.com\/images\/I\/41Hsgz5kRSL._SL160_.jpg\" alt=\"N\/A\"><\/a><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>RHEL\u306b\u30c7\u30fc\u30bf\u7528\u306eLVM\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002\u4f5c\u696d\u306f\u3001\u7ba1\u7406\u8005\u6a29\u9650\uff08root\u6a29\u9650\uff09\u3067\u884c\u3044\u307e\u3059\u3002<\/p>\n","protected":false},"author":1,"featured_media":5291,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[235],"tags":[653,308,654],"class_list":["post-8507","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-rhel-topics","tag-lvm","tag-rhel","tag-654"],"_links":{"self":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/8507","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/comments?post=8507"}],"version-history":[{"count":1,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/8507\/revisions"}],"predecessor-version":[{"id":12647,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/posts\/8507\/revisions\/12647"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media\/5291"}],"wp:attachment":[{"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/media?parent=8507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/categories?post=8507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab4ict.com\/system\/wp-json\/wp\/v2\/tags?post=8507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}