skip to content
wiki.lkaplan.cz
User Tools
Log In
Site Tools
Search
Tools
Show page
Old revisions
Backlinks
Recent Changes
Media Manager
Sitemap
Log In
>
Recent Changes
Media Manager
Sitemap
Trace:
wiki:os:linux:lvm
====== LVM ====== ===== Physical volume ===== <code bash> pvcreate /dev/md125 </code> <code> [root@fuvs-sn1 ~]# pvdisplay /dev/md125 "/dev/md125" is a new physical volume of "9,10 TiB" --- NEW Physical volume --- PV Name /dev/md125 VG Name PV Size 9,10 TiB Allocatable NO PE Size 0 Total PE 0 Free PE 0 Allocated PE 0 PV UUID 66qrEL-a4C2-5lcG-zVXP-Gltn-fYnx-wJtqVD </code> <code> [root@fuvs-sn1 ~]# pvs PV VG Fmt Attr PSize PFree /dev/md125 lvm2 --- 9,10t 9,10t </code> ===== Volume group ===== <code bash> vgcreate vg1 /dev/md125 </code> <code> [root@fuvs-sn1 ~]# vgdisplay vg1 --- Volume group --- VG Name vg1 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 9,10 TiB PE Size 4,00 MiB Total PE 2384350 Alloc PE / Size 0 / 0 Free PE / Size 2384350 / 9,10 TiB VG UUID 5EtIkG-bnld-ZuXu-LBuk-lSrA-P3j3-hO5kla </code> <code bash> vgs vgscan </code> ===== Logical volume ===== <code bash> lvcreate --name 9T --size 9T vg1 # nebo lvcreate --name 10T -l 100%FREE vg1 </code> <code> [root@fuvs-sn1 ~]# lvdisplay --- Logical volume --- LV Path /dev/vg1/9T LV Name 9T VG Name vg1 LV UUID wHjpoT-uq8x-XOma-6sGP-GcCC-fCUL-flY7Io LV Write Access read/write LV Creation host, time fuvs-sn1.ovirt.dragon.cz, 2017-03-31 10:28:50 +0200 LV Status available # open 0 LV Size 9,00 TiB Current LE 2359296 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 20480 Block device 253:3 </code> <code bash> lvs lvscan </code> <code bash> lvresize -l +100%FREE /dev/vg1/9T lvrename vg1 9T 10T e2fsck -f /dev/vg1/10T resize2fs /dev/vg1/10T </code> ===== Filesystem ===== <code bash> mkfs.ext4 /dev/vg1/9T </code> ===== Mount ===== <code> [root@fuvs-sn1 ~]# blkid ... /dev/mapper/vg1-9T: UUID="25fe3799-c76f-4a3a-93f9-4c9577c3b1b3" TYPE="ext4" ... </code> <code bash> mkdir -p /exports/9T </code> <code> vim /etc/fstab ... # /dev/mapper/vg1-9T: UUID=25fe3799-c76f-4a3a-93f9-4c9577c3b1b3 /exports/9T ext4 defaults 0 2 </code> <code bash> mount -a </code> <code> df -h Souborový systém Velikost Užito Volno Uži% Připojeno do ... /dev/mapper/vg1-9T 9,0T 81M 8,5T 1% /exports/9T </code>
wiki/os/linux/lvm.txt
· Last modified: 2018/01/22 15:14 by
root
Page Tools
Show page
Old revisions
Backlinks
Back to top