ext4·XFS 파일시스템으로 마운트한 뒤, lvs 명령어로 사용 현황을 확인하는 과정을 다룹니다.thin_ext4(10GB), thin_xfs(10GB)를 생성할 수 있음 → 총 20GB 가상 용량이지만 실제 공간은 5GB 내에서 관리됨.lvs 명령어로 Data% / Meta% 사용률을 추적하는 것이 중요합니다.# parted -s /dev/vdd mklabel gpt # parted -s /dev/vdd mkpart vdb 1 100% # parted -s /dev/vdd set 1 lvm on
# pvcreate /dev/vdd1
출력 예시:
Physical volume "/dev/vdd1" successfully created.
# pvdisplay /dev/vdd1
출력 예시:
"/dev/vdd1" is a new physical volume of "<128.00 GiB" --- NEW Physical volume --- PV Name /dev/vdd1 VG Name PV Size <128.00 GiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID bgCCtx-hOvx-aDCS-SR0f-ouD5-ux0R-2KyUy5
# vgextend vgtest /dev/vdd1
출력 예시:
Volume group "vgtest" successfully extended
# vgdisplay vgtest
출력 예시:
--- Volume group --- VG Name vgtest System ID Format lvm2 Metadata Areas 3 Metadata Sequence No 24 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 3 Act PV 3 VG Size <383.99 GiB PE Size 4.00 MiB Total PE 98301 Alloc PE / Size 8960 / 35.00 GiB Free PE / Size 89341 / <348.99 GiB VG UUID 6wo6Q6-VcLA-mBVw-U9AF-nySN-Uu3x-jKHgbh
# lvcreate -T -L 5G -n thinpool vgtest
출력 예시:
Thin pool volume with chunk size 64.00 KiB can address at most <15.88 TiB of data. Logical volume "thinpool" created.
# lvcreate -V 10G -T vgtest/thinpool -n thin_ext4
출력 예시:
WARNING: Sum of all thin volume sizes (10.00 GiB) exceeds the size of thin pool vgtest/thinpool (5.00 GiB). WARNING: You have not turned on protection against thin pools running out of space. WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full. Logical volume "thin_ext4" created.
# lvcreate -V 10G -T vgtest/thinpool -n thin_xfs
출력 예시:
WARNING: Sum of all thin volume sizes (20.00 GiB) exceeds the size of thin pool vgtest/thinpool (5.00 GiB). WARNING: You have not turned on protection against thin pools running out of space. WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full. Logical volume "thin_xfs" created.
# mkfs.ext4 /dev/vgtest/thin_ext4 # mkfs.xfs /dev/vgtest/thin_xfs
# mkdir -p /mnt/thin_ext4 /mnt/thin_xfs # mount -o discard /dev/vgtest/thin_ext4 /mnt/thin_ext4 # mount -o discard /dev/vgtest/thin_xfs /mnt/thin_xfs
# df -Th | grep thin
출력 예시:
/dev/mapper/vgtest-thin_ext4 ext4 9.8G 24K 9.3G 1% /mnt/thin_ext4 /dev/mapper/vgtest-thin_xfs xfs 10G 104M 9.9G 2% /mnt/thin_xfs
# lvs -a -o+segtype,lv_size,data_percent,metadata_percent vgtest
출력 예시:
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Type LSize Data% Meta% lv_ext4 vgtest -wi-ao---- 15.00g linear 15.00g lv_xfs vgtest -wi-ao---- 20.00g linear 20.00g [lvol0_pmspare] vgtest ewi------- 8.00m linear 8.00m thin_ext4 vgtest Vwi-aotz-- 10.00g thinpool 2.24 thin 10.00g 2.24 thin_xfs vgtest Vwi-aotz-- 10.00g thinpool 0.64 thin 10.00g 0.64 thinpool vgtest twi-aotz-- 5.00g 5.75 11.91 thin-pool 5.00g 5.75 11.91 [thinpool_tdata] vgtest Twi-ao---- 5.00g linear 5.00g [thinpool_tmeta] vgtest ewi-ao---- 8.00m linear 8.00m
https://youtu.be/n8-wlkZiqio 1. 개요 NFS(Network File System)를 설치하고, rw/ro 및 root_squash 옵션에 따른 접근 제어와 성능을 테스트하는 방법을 정리한 가이드입니다.…
https://youtu.be/4MVxzmepY3s 1. 개요 리눅스에서 정기적으로 실행되는 작업(백업, 로그 정리, 모니터링 등)은 cron 서비스를 통해 자동화할 수 있습니다.…
https://youtu.be/vPfxWFBE1yc 1. 개요 리눅스 서버를 운영할 때 사용자 계정 생성, 비밀번호 설정, 권한 부여, 계정…
https://youtu.be/Gvp2XwBfoKw 1. 개요 리눅스 서버에서는 시스템 시간(OS 시간) 과 하드웨어 시간(RTC, Real-Time Clock) 을 동기화하는 것이 매우 중요합니다. 클러스터…
https://youtu.be/pt9qhawl8LY 1. 개요 리눅스 서버에서는 시스템 시간(OS 시간) 과 하드웨어 시간(RTC, Real-Time Clock) 을 모두 관리할 수 있습니다. 운영체제의…
https://youtu.be/iPdHGXh7DUg 1. 개요 서버 운영 시 시스템 시간이 올바르게 설정되어 있지 않으면 로그 분석, 모니터링,…