# fdisk /dev/sdb
=> n => p> 1 => 엔터 =>엔터 => t => 8e =>w
# fdisk /dev/sdcc
=> n => p> 1 => 엔터 =>엔터 => t => 8e =>w
<볼륨 만들기 >
[root@localhost ~]# pvcreate /dev/sdb1
Physical volume "/dev/sdb1" successfully created
[root@localhost ~]# vgcreate myVG /dev/sdb1 /dev/sdc1
Physical volume "/dev/sdc1" successfully created.
Volume group "myVG" successfully created
[root@localhost ~]#
<볼륨 리스트>
[root@localhost ~]# vgdisplay
--- Volume group ---
VG Name myVG
System ID
Format lvm2
Metadata Areas 2
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 2
Act PV 2
VG Size 4.99 GiB
PE Size 4.00 MiB
Total PE 1278
Alloc PE / Size 0 / 0
Free PE / Size 1278 / 4.99 GiB
VG UUID awH5dQ-fokj-UXth-pF02-ufKO-qdrA-bYzznO
--- Volume group ---
VG Name cl
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 79.51 GiB
PE Size 4.00 MiB
Total PE 20354
Alloc PE / Size 20354 / 79.51 GiB
Free PE / Size 0 / 0
VG UUID zUScJU-JZnV-lN7O-zXdr-OXPn-PyNj-GXnXHu
[root@localhost ~]#
< 그룹 >
[root@localhost ~]# lvcreate --size 1G --name myLG1 myVG
Logical volume "myLG1" created.
[root@localhost ~]# lvcreate --size 3G --name myLG2 myVG
Logical volume "myLG2" created.
[root@localhost ~]# lvcreate --extents 100%FREE --name myLG3 myVG
Logical volume "myLG3" created.
[root@localhost ~]#
[root@localhost ~]# ls -l /dev/myVG
합계 0
lrwxrwxrwx 1 root root 7 3월 28 21:01 myLG1 -> ../dm-2
lrwxrwxrwx 1 root root 7 3월 28 21:02 myLG2 -> ../dm-3
lrwxrwxrwx 1 root root 7 3월 28 21:04 myLG3 -> ../dm-4
<포멧>
[root@localhost ~]# mkfs.ext4 /dev/myVG/myLG1
[root@localhost ~]# mkfs.ext4 /dev/myVG/myLG2
[root@localhost ~]# mkfs.ext4 /dev/myVG/myLG3
<마운트>
[root@localhost ~]# mkdir /lvm1 /lvm2 /lvm3
[root@localhost ~]# mount /dev/myVG/myLG1 /lvm1
[root@localhost ~]# mount /dev/myVG/myLG2 /lvm2
[root@localhost ~]# mount /dev/myVG/myLG3 /lvm3
[root@localhost ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/cl-root 78088956 4696580 73392376 7% /
devtmpfs 917760 0 917760 0% /dev
tmpfs 933632 144 933488 1% /dev/shm
tmpfs 933632 9060 924572 1% /run
tmpfs 933632 0 933632 0% /sys/fs/cgroup
/dev/sda1 508580 170820 337760 34% /boot
tmpfs 186728 12 186716 1% /run/user/0
/dev/mapper/myVG-myLG1 999320 2564 927944 1% /lvm1
/dev/mapper/myVG-myLG2 3030800 9216 2847916 1% /lvm2
/dev/mapper/myVG-myLG3 1007640 2544 936696 1% /lvm3
<자동 마운팅 설정 >
gedit/etc/fstab
댓글 ( 4)
댓글 남기기