株式会社ヴァンデミックシステム

Blog

<スポンサーリンク>

ルートファイルシステムが15GBしか割あたっていないので拡張したい。
これは、たぶんインストールの内容を見ずにポチポチやっていると15GBになったのだと思われる。

# df -h | grep root
/dev/mapper/fedora_fedora-root   15G   13G  2.3G  85% /

125GBある

# vgdisplay
  --- Volume group ---
  VG Name               fedora_fedora
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               125.41 GiB
  PE Size               4.00 MiB
  Total PE              32105
  Alloc PE / Size       3840 / 15.00 GiB
  Free  PE / Size       28265 / 110.41 GiB
  VG UUID               eLfpAo-MP14-hFk0-1dSl-f5co-R3dp-yDDYxR

15GBのみが割あたっている

lvdisplay
  --- Logical volume ---
  LV Path                /dev/fedora_fedora/root
  LV Name                root
  VG Name                fedora_fedora
  LV UUID                JFTidq-enOn-JqTQ-xLto-42MC-xQCZ-JogCF4
  LV Write Access        read/write
  LV Creation host, time fedora, 2022-09-19 04:51:46 +0900
  LV Status              available
  # open                 1
  LV Size                15.00 GiB
  Current LE             3840
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

空き容量をすべてルートに割り当てる。

# lvextend -l +100%FREE /dev/fedora_fedora/root
  Size of logical volume fedora_fedora/root changed from 15.00 GiB (3840 extents) to 125.41 GiB (32105 extents).
  Logical volume fedora_fedora/root successfully resized.

ファイルシステムを拡張する

# xfs_growfs /dev/fedora_fedora/root
meta-data=/dev/mapper/fedora_fedora-root isize=512    agcount=4, agsize=983040 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1    bigtime=0 inobtcount=0
data     =                       bsize=4096   blocks=3932160, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 3932160 to 32875520

拡張された

# df -h | grep root
/dev/mapper/fedora_fedora-root  126G   14G  112G  11% /

参考
https://qiita.com/neustrashimy/items/f12df97b98cd1d1a3e9b

<スポンサーリンク>

コメントを残す

Allowed tags:  you may use these HTML tags and attributes: <a href="">, <strong>, <em>, <h1>, <h2>, <h3>
Please note:  all comments go through moderation.

*

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)