Help us understand the problem. What is going on with this article?

Vagrant/CentOS7でのディスク拡張

More than 1 year has 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

Why do not you register as a user and use Qiita more conveniently?
  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
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  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