Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
5
Help us understand the problem. What is going on with this article?
@kikuta2055

Vagrant/CentOS7でのディスク拡張

More than 3 years have passed since last update.

Vagrant上のCentOS7のディスク容量の際、一手間かかったのでメモ。

参考。
http://qiita.com/koitaro/items/c8bf8eb1e67e78890a5c

Vagrantから起動してログイン、確認。

[root@localhost vagrant]# df -h
ファイルシス            サイズ  使用  残り 使用% マウント位置
/dev/mapper/centos-root   8.3G  2.0G  6.4G   24% /
devtmpfs                  911M     0  911M    0% /dev
tmpfs                     921M     0  921M    0% /dev/shm
tmpfs                     921M  8.3M  912M    1% /run
tmpfs                     921M     0  921M    0% /sys/fs/cgroup
/dev/sda1                 497M  164M  334M   33% /boot
none                      931G  212G  719G   23% /vagrant
tmpfs                     185M     0  185M    0% /run/user/1000
[root@localhost vagrant]# lvextend -l +100%FREE /dev/mapper/centos-root
  Size of logical volume centos/root changed from 8.26 GiB (2114 extents) to 18.53 GiB (4744 extents).
  Logical volume root successfully resized.
[root@localhost vagrant]# xfs_growfs /dev/mapper/centos-root
meta-data=/dev/mapper/centos-root isize=256    agcount=4, agsize=541184 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0
data     =                       bsize=4096   blocks=2164736, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal               bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
data blocks changed from 2164736 to 4857856

無事に拡がりました。

[root@localhost vagrant]# df -h
ファイルシス            サイズ  使用  残り 使用% マウント位置
/dev/mapper/centos-root    19G  2.0G   17G   11% /
devtmpfs                  911M     0  911M    0% /dev
tmpfs                     921M     0  921M    0% /dev/shm
tmpfs                     921M  8.3M  912M    1% /run
tmpfs                     921M     0  921M    0% /sys/fs/cgroup
/dev/sda1                 497M  164M  334M   33% /boot
none                      931G  212G  719G   23% /vagrant
tmpfs                     185M     0  185M    0% /run/user/1000

参考:
http://qiita.com/fetaro/items/d7dc74262633ba474bc8

5
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
kikuta2055
ちょっとずつメモを残していくことにしました。あんまり有用な内容はないかもしれません。意識低くてごめんなさい。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
5
Help us understand the problem. What is going on with this article?