• info@zen.co.id

Add Storage Virtualizor

Berikut adalah langkah add storage di virtualizor dengan LVM Based Storage

LANGKAH 1
———
# fdisk -l
[root@net2isrv4 ~]# fdisk -l
Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 71CEAECD-3665-4597-99B1-AFC6B3AAFBDB

Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1230847 1228800 600M EFI System
/dev/nvme0n1p2 1230848 3327999 2097152 1G Linux filesystem
/dev/nvme0n1p3 3328000 1000214527 996886528 475.4G Linux LVM

Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device Boot Start End Sectors Size Id Type
/dev/sda1 1 4294967295 4294967295 2T ee GPT

Disk /dev/sdd: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/almalinux-root: 70 GiB, 75161927680 bytes, 146800640 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/almalinux-swap: 4 GiB, 4294967296 bytes, 8388608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/almalinux-home: 401.4 GiB, 430947958784 bytes, 841695232 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

LANGKAH 2
———
Creating the Physical Volumes To use disks in a volume group, you label them as LVM physical volumes
Warning :This command destroys any data on /dev/sda /dev/sdb /dev/sdc /dev/sdd

# pvcreate /dev/sda /dev/sdb /dev/sdc /dev/sdd

[root@net2isrv4 ~]# pvcreate /dev/sda /dev/sdb /dev/sdc /dev/sdd
Cannot use /dev/sda: device is partitioned
Physical volume “/dev/sdb” successfully created.
Physical volume “/dev/sdc” successfully created.
Physical volume “/dev/sdd” successfully created.

/dev/sda: device is partitioned … ini ada partisi GPT jadi harus dihapus terlebih dahulu dengan cara
# fdisk /dev/sda
Command (m for help): d
Selected partition 1
Partition 1 is deleted

Command (m for help): p

Disk 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0007c4fe

Device Boot Start End Blocks Id System

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

kemudian :
#pvcreate /dev/sda

WARNING: dos signature detected on /dev/sda at offset 510. Wipe it? [y/n]: y
Wiping dos signature on /dev/sda.
Physical volume “/dev/sda” successfully created.

LANGKAH 3
———
Creating the Volume Group The following command creates the volume group vg1.

#vgcreate vg1 /dev/sda /dev/sdb /dev/sdc /dev/sdd
Volume group “vg1” successfully created

[root@net2isrv4 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
almalinux 1 3 0 wz–n- 475.35g 0
vg1 4 0 0 wz–n- <7.28t <7.28t

Leave a Reply

Your email address will not be published. Required fields are marked *