WeGO 소개
Zevenet 어플라이언스는 모든 플랫폼에서 쉽게 배포 및 설치할 수 있도록 경량 형식으로 제공되지만 로깅 시스템 또는 사용자 지정 응용 프로그램 통합을 위해 더 많은 스토리지가 필요한 경우 파일 시스템 크기 조정이 필요합니다.
이러한 이유로 다음 문서에서는 Zevenet 가상 장비의 루트 파일 시스템 크기를 늘리는 절차에 대해 설명합니다. 이 절차는 다음을 사용하는 기기에 적용 할 수 있습니다. LVM (Linux Volume Manager), 다음 명령으로 루트 파티션 (/)을 늘릴 수 있는지 확인하십시오 :
root@zva#> lvdisplay | grep "LV Path" | grep root LV Path /dev/zva64/root
참고 : 값과 함께 LV 경로가 나타나지 않으면 / dev / zva64 / root 루트 파티션을 늘릴 수 없습니다.
순서
가상 Load Balancer ZVA 어플라이언스에 원하는 크기의 새 가상 디스크를 연결하십시오. 이 예에서는 5 추가 GB로 루트 파티션 (/)을 늘립니다. 시작하기 전 / 전에 크기를 기록하십시오 (사용 가능한 864Mb 만).
root@zva#> df -h
Filesystem Size Used Avail Use% Mounted on
/dev/dm-0 1.9G 912M 864M 52% /
이제 HyperVisor Client에서 가상로드 밸런서에 5GB가 포함 된 새 가상 디스크를 연결합니다.
위의 예에서 장치 이름이있는 가상로드 균형 조정 장치에서 새 장치가 감지됩니다 / dev / xvdb.
root@zva#> fdisk -l
Disk /dev/xvda: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x08115355
Device Boot Start End Sectors Size Id Type
/dev/xvda1 * 2048 999423 997376 487M 83 Linux
/dev/xvda2 999424 13694975 12695552 6.1G 8e Linux LVM
/dev/xvda3 13694976 16775167 3080192 1.5G 82 Linux swap / Solaris
Disk /dev/mapper/zva64-root: 1.9 GiB, 2046820352 bytes, 3997696 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/zva64-config: 488 MiB, 511705088 bytes, 999424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/zva64-log: 3.7 GiB, 3938451456 bytes, 7692288 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/xvdb: 5 GiB, 5368709120 bytes, 10485760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
이제 장비를 준비하십시오. / dev / xvdb LVM에 포함됨 :
root@zva#> fdisk /dev/xvdb
그리고 다음 작업을 실행하십시오.
이름이 새 기기 / dev / xvdb1 이 생성되었습니다.
root@zva#> fdisk -l /dev/xvdb
Disk /dev/xvdb: 5 GiB, 5368709120 bytes, 10485760 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xa3e1a858
Device Boot Start End Sectors Size Id Type
/dev/xvdb1 2048 10485759 10483712 5G 8e Linux LVM
이제 이미 생성 된 새 장치를 포함하십시오. / dev / xvdb1 LVM에서.
root@zva#> pvcreate /dev/xvdb1 Physical volume "/dev/xvdb1" successfully created
ZVA 어플라이언스는 하나의 볼륨 그룹 만 포함합니다. zva64이 볼륨 그룹에는 3 논리 볼륨이 있고 그 중 하나는 루트 파티션을 관리합니다.
다음 명령은 볼륨 그룹 크기 및 이름을 표시합니다.
root@zva#> vgdisplay --- Volume group --- VG Name zva64 System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 4 VG Access read/write VG Status resizable MAX LV 0 Cur LV 3 Open LV 3 Max PV 0 Cur PV 1 Act PV 1 VG Size 6.05 GiB PE Size 4.00 MiB Total PE 1549 Alloc PE / Size 1549 / 6.05 GiB Free PE / Size 0 / 0 VG UUID EmgT1X-gPw3-f16M-kBC6-0x4s-LdS8-ymeyB6
이제 장치를 포함 시키십시오. / dev / xvdb1 (5Gb) 이름이있는 볼륨 그룹 zva64,이 볼륨 그룹이 자동으로 증가합니다.
root@zva#> vgextend zva64 /dev/xvdb1 Volume group "zva64" successfully extended
볼륨 그룹에서 최신 명령 다음의 전체 크기를 확인하십시오.
root@zva#> vgdisplay --- Volume group --- VG Name zva64 System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 5 VG Access read/write VG Status resizable MAX LV 0 Cur LV 3 Open LV 3 Max PV 0 Cur PV 2 Act PV 2 VG Size 11.05 GiB PE Size 4.00 MiB Total PE 2828 Alloc PE / Size 1549 / 6.05 GiB Free PE / Size 1279 / 5.00 GiB VG UUID EmgT1X-gPw3-f16M-kBC6-0x4s-LdS8-ymeyB6
이제 새로운 여유 공간을 이름이있는 논리 볼륨의 루트 (/) 파티션에 추가해야합니다. 뿌리. 여기에 볼륨 그룹 내에 생성 된 논리 볼륨 zva64.
root@zva#> lvdisplay --- Logical volume --- LV Path /dev/zva64/root LV Name root VG Name zva64 LV UUID EKZu18-rtrq-Fii5-3hCq-JIQh-OGG3-TQhbzU LV Write Access read/write LV Creation host, time zva64ee40, 2015-07-28 09:25:23 -0400 LV Status available # open 1 LV Size 1.91 GiB Current LE 488 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:0 --- Logical volume --- LV Path /dev/zva64/config LV Name config VG Name zva64 LV UUID tHSNAl-BAhc-4WeJ-7c24-23lW-91pD-xwATuq LV Write Access read/write LV Creation host, time zva64ee40, 2015-07-28 09:26:39 -0400 LV Status available # open 1 LV Size 488.00 MiB Current LE 122 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:1 --- Logical volume --- LV Path /dev/zva64/log LV Name log VG Name zva64 LV UUID vjduEj-zLnx-tTEh-FJN6-SrOJ-iwdp-TGi3Sn LV Write Access read/write LV Creation host, time zva64ee40, 2015-07-28 09:26:49 -0400 LV Status available # open 1 LV Size 3.67 GiB Current LE 939 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:2
이름이 지정된 논리 볼륨 확장 뿌리 다음과 같이 시스템에 추가 여유 공간 (5 추가 GB)이 있어야합니다.
root@zva#> lvextend -l +100%FREE /dev/zva64/root Size of logical volume zva64/root changed from 1.91 GiB (488 extents) to 6.90 GiB (1767 extents). Logical volume root successfully resized
지금 주목하자. lvdisplay 논리 볼륨의 새 크기를 이름과 함께 표시합니다. 뿌리.
root@zva#> lvdisplay --- Logical volume --- LV Path /dev/zva64/root LV Name root VG Name zva64 LV UUID EKZu18-rtrq-Fii5-3hCq-JIQh-OGG3-TQhbzU LV Write Access read/write LV Creation host, time zva64ee40, 2015-07-28 09:25:23 -0400 LV Status available # open 1 LV Size 6.90 GiB Current LE 1767 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 254:0 . . .
마지막으로 새로운 사용 가능한 크기로 루트 파일 시스템 (/)의 크기를 조정하십시오.
root@zva#> resize2fs /dev/zva64/root resize2fs 1.42.12 (29-Aug-2014) Filesystem at /dev/zva64/root is mounted on /; on-line resizing required old_desc_blocks = 1, new_desc_blocks = 1 The filesystem on /dev/zva64/root is now 1809408 (4k) blocks long.
다음 명령 (Available 5.6Gb)을 사용하여 새 여유 공간을 확인하십시오.
root@zva#> df -h
Filesystem Size Used Avail Use% Mounted on
/dev/dm-0 6.8G 914M 5.6G 14% /
udev 10M 0 10M 0% /dev
tmpfs 98M 4.4M 94M 5% /run
tmpfs 245M 0 245M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 245M 0 245M 0% /sys/fs/cgroup
/dev/mapper/zva64-config 465M 2.3M 434M 1% /usr/local/zenloadbalancer/config
/dev/mapper/zva64-log 3.6G 7.6M 3.4G 1% /var/log
/dev/xvda1 464M 33M 403M 8% /boot
이 시점에서로드 밸런서의 크기가 조정되고 서비스를 확장 할 준비가됩니다.