smq (Stochastic Multiqueue) : 기본값, 자주 쓰이는 데이터를 효율적으로 캐싱.mq : 구 버전 정책, 현재는 잘 쓰이지 않음.# parted -s /dev/vdb mklabel gpt # parted -s /dev/vdb mkpart vdb 1 100% # parted -s /dev/vdb set 1 lvm on
# pvcreate /dev/vdb1
# pvdisplay -s
출력 예시:
Device "/dev/vdb1" has a capacity of <128.00 GiB
# vgcreate vg_test /dev/vdb1
# vgdisplay
출력 예시:
--- Volume group --- VG Name vg_test System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size <128.00 GiB PE Size 4.00 MiB Total PE 32767 Alloc PE / Size 0 / 0 Free PE / Size 32767 / <128.00 GiB VG UUID gmjgrB-CGSb-iUmT-qd3I-QThR-Au2V-fihkA1
# lvcreate -n lv_ext4 -l 32767 vg_test
# lvdisplay
출력 예시:
--- Logical volume --- LV Path /dev/vg_test/lv_ext4 LV Name lv_ext4 VG Name vg_test LV UUID fYd8cT-3u5x-t26c-19Sf-9yxp-llo3-CT54Y9 LV Write Access read/write LV Creation host, time KVM01, 2025-09-06 17:08:09 +0900 LV Status available # open 0 LV Size <128.00 GiB Current LE 32767 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 252:0
# mkfs.ext4 /dev/vg_test/lv_ext4
# mkdir /mnt/ext4
# mount /dev/vg_test/lv_ext4 /mnt/ext4/
# df -Th /mnt/ext4/
출력 예시:
Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/vg_test-lv_ext4 ext4 126G 24K 120G 1% /mnt/ext4
# parted -s /dev/vdc mklabel gpt # parted -s /dev/vdc mkpart vdc 1 100% # parted -s /dev/vdc set 1 lvm on
# pvcreate /dev/vdc1
출력 예시:
Physical volume "/dev/vdc1" successfully created.
# pvdisplay -s
출력 예시:
Device "/dev/vdb1" has a capacity of 0 Device "/dev/vdc1" has a capacity of <128.00 GiB
# vgdisplay -s
출력 예시:
"vg_test" <128.00 GiB [<128.00 GiB used / 0 free]
# vgextend vg_test /dev/vdc1
출력 예시:
Volume group "vg_test" successfully extended
# vgdisplay -s
출력 예시:
"vg_test" 255.99 GiB [<128.00 GiB used / <128.00 GiB free]
# lvcreate --type cache-pool -n cachepool -L 100G vg_test /dev/vdc1
출력 예시:
Using 128.00 KiB chunk size instead of default 64.00 KiB, so cache pool has less than 1000000 chunks. Logical volume "cachepool" created.
# lvdisplay vg_test/cachepool
출력 예시:
--- Logical volume --- LV Path /dev/vg_test/cachepool LV Name cachepool VG Name vg_test LV UUID XU13p3-mOHa-vM0Q-IuQ3-Baon-m9hC-NksTly LV Write Access read/write LV Creation host, time KVM01, 2025-09-06 17:14:06 +0900 LV Pool metadata cachepool_cmeta LV Pool data cachepool_cdata LV Status NOT available LV Size 100.00 GiB Current LE 25600 Segments 1 Allocation inherit Read ahead sectors auto
# lvdisplay -m /dev/vg_test/lv_ext4
출력 예시:
--- Logical volume ---
LV Path /dev/vg_test/lv_ext4
LV Name lv_ext4
VG Name vg_test
LV UUID UlcPen-hyeP-mDfM-pnd1-jGLE-RtdW-Dp2XnI
LV Write Access read/write
LV Creation host, time KVM01, 2025-09-07 12:00:36 +0900
LV Status available
# open 1
LV Size <128.00 GiB
Current LE 32767
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Segments ---
Logical extents 0 to 32766:
Type linear
Physical volume /dev/vdb1
Physical extents 0 to 32766 # lvs -a -o lv_name,segtype,cache_mode,cache_policy,metadata_percent,data_percent,devices vg_test
출력 예시:
LV Type CacheMode CachePolicy Meta% Data% Devices cachepool cache-pool cachepool_cdata(0) [cachepool_cdata] linear /dev/vdc1(20) [cachepool_cmeta] linear /dev/vdc1(10) lv_ext4 linear /dev/vdb1(0) [lvol0_pmspare] linear /dev/vdc1(0)
# lvconvert --type cache --cachepool vg_test/cachepool --cachemode writeback vg_test/lv_ext4
출력 예시:
Do you want wipe existing metadata of cache pool vg_test/cachepool? [y/n]: **y** Logical volume vg_test/lv_ext4 is now cached.
# lvdisplay -m /dev/vg_test/lv_ext4
출력 예시:
--- Logical volume ---
LV Path /dev/vg_test/lv_ext4
LV Name lv_ext4
VG Name vg_test
LV UUID UlcPen-hyeP-mDfM-pnd1-jGLE-RtdW-Dp2XnI
LV Write Access read/write
LV Creation host, time KVM01, 2025-09-07 12:00:36 +0900
LV Cache pool name cachepool_cpool
LV Cache origin name lv_ext4_corig
LV Status available
# open 1
LV Size <128.00 GiB
Cache used blocks 0.01%
Cache metadata blocks 16.14%
Cache dirty blocks 0.00%
Cache read hits/misses 5 / 34
Cache wrt hits/misses 0 / 0
Cache demotions 0
Cache promotions 4
Current LE 32767
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 512
Block device 252:0
--- Segments ---
Logical extents 0 to 32766:
Type cache
Chunk size 128.00 KiB
Metadata format 2
Mode writeback
Policy smq # lvs -a -o lv_name,segtype,cache_mode,cache_policy,metadata_percent,data_percent,devices vg_test
출력 예시:
LV Type CacheMode CachePolicy Meta% Data% Devices [cachepool_cpool] cache-pool writeback smq 16.14 0.01 cachepool_cpool_cdata(0) [cachepool_cpool_cdata] linear /dev/vdc1(20) [cachepool_cpool_cmeta] linear /dev/vdc1(10) lv_ext4 cache writeback smq 16.14 0.01 lv_ext4_corig(0) [lv_ext4_corig] linear /dev/vdb1(0) [lvol0_pmspare] linear /dev/vdc1(0)
# dnf -y install sysstat
# iostat -x /dev/vdb1 /dev/vdc1 1
# dd if=/dev/zero of=/mnt/ext4/test file bs=1024M count=100 oflag=direct
https://youtu.be/xyQ36ZKFsyo 1. 개요 디스크 4개를 RAID 5로 묶어 하나의 큰 볼륨으로 만들고 공유 폴더까지 만드는…
https://youtu.be/6USDMILssg4 1. 개요 OMV는 물리 디스크를 서비스에 노출하기까지 4단계 계층을 거칩니다. 앞 단계를 완료해야 다음…
https://youtu.be/ER-vIKQnXwc 1. 개요 Radxa Penta SATA HAT는 Raspberry Pi 5의 PCIe 인터페이스를 활용해 최대 5개의…
https://youtu.be/aBW_RxoT56U 1. 개요 Raspberry Pi에 설치된 OpenMediaVault(OMV)의 네트워크 인터페이스를 DHCP(자동 IP 할당) 방식에서 고정 IP(Static…
https://youtu.be/3PbaSjpmIgk 1. 개요 OpenMediaVault(OMV) 웹 관리 페이지에서 admin 계정의 비밀번호를 변경하는 방법을 안내합니다. 2. 버전…
https://youtu.be/hlBddMVRL9Q 1. 개요 OpenMediaVault(OMV)는 Debian 기반의 오픈소스 NAS(Network Attached Storage) 운영체제로, 웹 브라우저를 통해 스토리지,…