ㅁLogical Volume으로 구성한 FS을 증설
- 대상 : /web filesystem
[root@song ~]# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda3 20027260 3827684 15175576 21% / tmpfs 1921648 144 1921504 1% /dev/shm /dev/sda2 9948012 60400 9375612 1% /boot /dev/sda1 10229984 288 10229696 1% /boot/efi /dev/sda4 9948012 22784 9413228 1% /home /dev/sda5 9948012 22684 9413328 1% /tmp /dev/sda6 20027260 4079076 14924184 22% /usr /dev/sda7 20027260 10526564 8476696 56% /var /dev/mapper/vg00-lvol0 5029504 10240 4757120 1% /web /dev/sdb4 7801088 3852084 3949004 50% /media/RHEL-6.8 Se |
- 절차 : 1)LV증설
2) filesysm resize
1) LV증설
. lvextend 명령사용 , -L 옵션 +증설할 용량
[root@song ~]# lvextend -L +1G /dev/mapper/vg00-lvol0 Size of logical volume vg00/lvol0 changed from 5.00 GiB (1280 extents) to 6.00 GiB (1536 extents). Logical volume lvol0 successfully resized. |
2) filesystem resize
. LV를 증설해도 mount 되어있는 FS에 반영되지 않는다.
. fiesystem을 reisze 해줘야 mount 되어있는FS에 반영됨
(resize2fs명령을 통해 할것임)
[root@song ~]# resize2fs -p /dev/mapper/vg00-lvol0 resize2fs 1.41.12 (17-May-2010) Filesystem at /dev/mapper/vg00-lvol0 is mounted on /web; on-line resizing required old desc_blocks = 1, new_desc_blocks = 1 Performing an on-line resize of /dev/mapper/vg00-lvol0 to 1572864 (4k) blocks. The filesystem on /dev/mapper/vg00-lvol0 is now 1572864 blocks long. |
3) F/S증설 변화
. (lvextend 실행 후)resize2fs 실행전 (5029504 kb로, 변화하지 않음) |
[root@song ~]# df -k /web Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/vg00-lvol0 5029504 10240 5736832 1% /web |
.(lvextend 실행 후)resize2fs 실행 후 |
[root@song ~]# df -k /web Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/vg00-lvol0 6061632 10240 5736832 1% /web 5029504 -> 606132 KB 로 1G증설된것을 알수 있음 |
'OS > LINUX' 카테고리의 다른 글
vsftp chroot설정 (0) | 2017.04.20 |
---|---|
chroot명령어 이용 가상home dir생성 (0) | 2017.04.20 |
root접속불가 발생, 원인은 securetty (0) | 2017.04.06 |
Yum repository 설정 (0) | 2017.04.02 |
USB mount (0) | 2017.04.02 |