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/8jrMVfosV6Y 1. 개요 LVM 환경에서 pvmove를 사용해 /dev/vdb1 → /dev/vdc1로 데이터를 무중단(온라인) 이관하는 과정을 다룹니다. 이관 전/후 LV–PV 매핑…
https://youtu.be/QNAq6f2rO-I 1. 개요 본 글은 LVM의 스냅샷(snapshot) 기능으로 복구 지점 생성 → 파일 변경 → 스냅샷 병합(rollback) 과정을 실습합니다.…
https://youtu.be/ZcxB7akkDKs 1. 개요 두 개의 디스크(/dev/vdb, /dev/vdc)로 LVM을 구성하고, ext4·XFS 파일시스템 생성 → 마운트 → VG/LV 확장 → ext4 축소(오프라인)까지 전체…
https://youtu.be/XYBR1ZFrV9s 1. 개요 parted를 사용해 새 디스크에 GPT 라벨 생성 → 파티션 생성(ext4/XFS) → 포맷/마운트 →…
https://youtu.be/yYV8RQKCFzA 1. 개요 이 문서는 fdisk를 사용해 MBR(DOS) 디스크에 파티션을 생성하고, ext4/XFS 파일시스템을 포맷·마운트, /etc/fstab에 등록했다가, 안전하게 해제·삭제하는 전…
1. 개요 Linux에서 디스크 파티션 스타일은 MBR(Master Boot Record) 와 GPT(GUID Partition Table)에 대해 설명합니다. 2. MBR이란? 디스크…