1. lsblk
Untuk melihat 'disks' yang ada dalam linux dan anak-anaknya. Contoh output
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
├─sda1 8:1 0 600M 0 part /boot/efi
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 198.4G 0 part
├─almalinux-root 253:0 0 70G 0 lvm /
├─almalinux-swap 253:1 0 7.9G 0 lvm [SWAP]
└─almalinux-home 253:2 0 120.5G 0 lvm /home
sdb 8:16 0 200G 0 disk
2. pvs - nak tengok semua physical volume yang ada. tak semestinya disk ada tapi volume dah ada. Output
PV VG Fmt Attr PSize PFree
/dev/sda3 almalinux lvm2 a-- 198.41g 0
Command yang sama macam pvs adalah pvdisplay. Ni lagi banyak maklumat. Tak macam pvs. Output
--- Physical volume ---
PV Name /dev/sda3
VG Name almalinux
PV Size 198.41 GiB / not usable 2.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 50793
Free PE 0
Allocated PE 50793
PV UUID GbcRQx-RQOJ-egqT-fuRc-DkI6-q0Ip-oLEnY5
3. vgs - Volume group scan. Untuk tengok volume group yang ada.
Arahan yang serupa adalah vgdisplay. Output
--- Volume group ---
VG Name almalinux
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 198.41 GiB
PE Size 4.00 MiB
Total PE 50793
Alloc PE / Size 50793 / 198.41 GiB
Free PE / Size 0 / 0
VG UUID F6zi4v-3uVP-kWdm-jZOm-WJeI-6s46-bFJTAF
4. lvs - Logical volume scan. Untuk melihat segala logical volume yang ada
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
home almalinux -wi-ao---- 120.52g
root almalinux -wi-ao---- 70.00g
swap almalinux -wi-ao---- <7.89g
Arahan yang hampir serupa adalah lvdisplay. Output
--- Logical volume ---
LV Path /dev/almalinux/swap
LV Name swap
VG Name almalinux
LV UUID Yqta7D-DWFC-OsAf-kaP8-Xsog-xgid-SGVyYg
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2023-01-31 21:54:30 +0800
LV Status available
# open 2
LV Size <7.89 GiB
Current LE 2019
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:1
--- Logical volume ---
LV Path /dev/almalinux/home
LV Name home
VG Name almalinux
LV UUID i8zaxO-79nV-7EKH-KCZp-7eDJ-P9ah-BI1SpY
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2023-01-31 21:54:30 +0800
LV Status available
# open 1
LV Size 120.52 GiB
Current LE 30854
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:2
--- Logical volume ---
LV Path /dev/almalinux/root
LV Name root
VG Name almalinux
LV UUID 9mC2Dc-94CU-pFgO-cqlQ-L93v-7R2X-QDiCjU
LV Write Access read/write
LV Creation host, time localhost.localdomain, 2023-01-31 21:54:30 +0800
LV Status available
# open 1
LV Size 70.00 GiB
Current LE 17920
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 8192
Block device 253:0