2012. 10. 27.

Linux가 설치된 Virtual Machine에 디스크 용량 늘이기

ESXi에서 Virtual Machine의 용량을 늘이는건 어렵지 않다.

설정편집 -> Hard Disk -> 용량 증가.

하지만 아쉽게도 Linux에서 자동으로 용량을 늘여주진 않는다.

(그랬으면 참 좋을텐데)

인터넷 열심히 찾았는데 쓸만한 자료가 없다가 자료를 하나 겨우 찾았다.

혹시나 또 필요할지 모르니 기록해둔다.












1. PV(Physical Volume) 생성

현재 파티션이 없는 경로를 선택하여 아래를 실행한다.




$ mknod /dev/sda3 b 8 3

$ chown root:disk /dev/sda3




2. fdisk를 이용하여 파티션을 생성한다.

$ fdisk /dev/sda









- 완료후 재부팅




3. 재부팅 후 /dev/sda3에 PV(Physical Volume)을 생성

$ pvcreate /dev/sda3









4. VG(Volume Group) 확장

VG(Volume Group) 이름을 알기 위해서는 아래를 실행한다.

$ vgdisplay

(VG Name 항목에 적혀있는 것이 VG 이름이다)




$ vgextend vg_name /dev/sda3

(vg_name은 위에서 확인한 VG 이름이다.)

(pvscan 명령을 이용하여 /dev/sda3이 vg_name에 제대로 추가 됐는지 확인)









5. LV(Logical Volume) 늘이기

LV(Logical Volume) 이름 확인하기.

$ ls -l /dev/vg_name/




- 기존 LV에 추가된 용량의 PV를 확장. (예는 gigabyte 단위)

$ lvextend -L +용량g /dev/vg_name/lv_root




6. 파일 시스템 크기 조정

$ resize2fs /dev/vg_name/lv_root

댓글 1개:

  1. However, casinos ought to thoughts that|remember that|understand that} playing is primarily a type of leisure and not a method to strike it wealthy. With this perspective, want to} make each effort possible to make sure their customers 카지노 have enjoyable no matter whether or not they win or lose the sport. Ultimately, tax concessions for casinos should be examined. These incentives are unequal and often result in decrease government revenue.

    답글삭제