티스토리 뷰
준비물
- hdd 1T /dev/sda
- hdd 1T /dev/sdb
1. fdisk /dev/sda, fdisk /dev/sdb 명령으로 각각 파티션 생성
2. `pvcreate /dev/sda1`, `pvcreate /dev/sdb1` 명령으로 각각 pv 생성
[root@kube4 ~]# pvcreate /dev/sda1 Physical volume "/dev/sda1" successfully created. [root@kube4 ~]# pvcreate /dev/sdb1 Physical volume "/dev/sdb1" successfully created. [root@kube4 ~]# pvscan PV /dev/sdc2 VG centos_cluster-test lvm2 [<446.13 GiB / 4.00 MiB free] PV /dev/sdb1 lvm2 [931.51 GiB] PV /dev/sda1 lvm2 [931.51 GiB] Total: 3 [<2.26 TiB] / in use: 1 [<446.13 GiB] / in no VG: 2 [<1.82 TiB] |
3. `vgcreate centos_kube4-hdd /dev/sda1 /dev/sdb1` 명령으로 vg 생성
[root@kube4 ~]# vgcreate centos_kube4-hdd /dev/sda1 /dev/sdb1 Volume group "centos_kube4-hdd" successfully created [root@kube4 ~]# vgscan Reading volume groups from cache. Found volume group "centos_cluster-test" using metadata type lvm2 Found volume group "centos_kube4-hdd" using metadata type lvm2 |
4. `lvcreate -l 100%FREE -i2 -n home2 centos_kube4-hdd` 명령으로 lv 생성
- `-i2` 옵션은 스트라이프 볼륨을 생성하기 위한 옵션이다.(자세한 내용은 여기 참조)
- `-i2` 옵션의 값은 최대 물리 디스크의 개수를 넘을 수 없다.
[root@kube4 /]# lvcreate -l 100%FREE -i2 -n home2 centos_kube4-hdd [root@kube4 /]# lvdisplay /dev/centos_kube4-hdd/home2 |
5. `mkfs.xfs /dev/centos_kube4-hdd/home2` 명령으로 fs 지정 및 포멧
[root@kube4 /]# mkfs.xfs /dev/centos_kube4-hdd/home2 meta-data=/dev/centos_kube4-hdd/home2 isize=512 agcount=32, agsize=15261808 blks = sectsz=4096 attr=2, projid32bit=1 = crc=1 finobt=0, sparse=0 data = bsize=4096 blocks=488377856, imaxpct=5 = sunit=16 swidth=32 blks naming =version 2 bsize=4096 ascii-ci=0 ftype=1 log =internal log bsize=4096 blocks=238465, version=2 = sectsz=4096 sunit=1 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 |
6. `mount /dev/centos_kube4-hdd/home2 /home2` 명령으로 /home2에 마운트
7. 추가
- lvremove(요기 참조)
[root@kube4 /]# lvremove /dev/centos_kube4-hdd/home2 Do you really want to remove active logical volume centos_kube4-hdd/home2? [y/n]: y Logical volume "home2" successfully removed |
- Total
- Today
- Yesterday
- yum
- vgcreate
- linux
- _stats
- _status
- 센트6
- fielddata
- ld 옵션
- centos7
- virtualbox
- aix compile
- 물리디스크
- 파티션 추가
- CentOS
- Repository
- firewall-cmd service
- update
- CLion
- noipath
- CMAKE_OSX_SYSROOT
- Ignoring CMAKE_OSX_SYSROOT value
- install
- physicaldisk
- aix ld
- lvm 늘리기
- pf.anchors
- postgresql11
- pfctl
- lvremove
- mirrorlist
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |