In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to parse iSCSI disk array for LVM shared storage of Proxmox VE. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.
ISCSI disk array used as LVM shared storage for Proxmox VE
As an open source virtualization management platform, proxmox supports cluster management and HA. In general, small and medium-sized virtualization applications can completely replace VMware. As important functions of virtualized applications, such as VM hot migration and HA high availability, shared storage must be used. According to its official information and some online materials, proxmox not only supports commonly used lvm,nfs,iscsi, but also supports cluster storage such as glusterfs and ceph.
The author uses Proxmox VE 4.4 to build a cluster of two nodes (pve-01 and pve-02) on two DELL R730 servers. It is proposed to delimit a 2T volume on an iSCSI DELL PS6000E disk array as shared storage.
Similar applications have been made in VMware's vCenter before. VCenter storage can be directly mounted on iSCSI volumes, and VMFS file system can be directly used as shared storage. Its performance (such as thin disk, snapshot, etc.) is exactly the same as local storage.
So, first try Proxmox VE to mount the iSCSI volume directly, and find that VM can also be created on that volume, but the disk of VM will take up the space of the entire volume. The Open-iSCSI initiator section of querying Proxmox VE's help file Proxmox VE Storage mentions:
If you want to use LVM on top of iSCSI, it make sense to setcontent none. That way it is not possible to create VMs using iSCSI LUNs directly.
That is, it is not possible to directly use iSCSI LUN to create VM, you need to use LVM on top of iSCSI. That is, to establish a LVM on iSCSI LUN. According to this hint, the author has done the following experiments, successfully created shared storage, and realized the hot migration of VM, HA and so on.
Create a volume (Volume) for PVE shared storage in the PS6000E disk array:
Volume name: pve-storage
Size: 2000G, compact mode
Enable sharing (allow different initiators to connect to the target at the same time):
Mount the disk array iSCSI volume (pve-storage).
1. Find the iSCSI initiator of pve-01, pve-02 and other nodes.
Look at the contents of the / etc/iscsi/initiatorname.iscsi file on node 1 (pve-01) and find the iSCSI initiator name of pve-01: iqn.1993-08.org.debian:01:c8a15d1fa8b
Root@pve-01:# cat / etc/iscsi/initiatorname.iscsi
# # DO NOT EDIT OR REMOVE THIS FILE!
# # If you remove this file, theiSCSI daemon will not start.
# # If you change the InitiatorName,existing access control lists
# # may reject this initiator. The InitiatorName must be unique
# # for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames.
InitiatorName=iqn.1993-08.org.debian:01:c8a15d1fa8b
Looking at the contents of the / etc/iscsi/initiatorname.iscsi file on 1 (pve-02) in the same way, you can find the iSCSI initiator name of pve-02: iqn.1993-08.org.debian:01:d9fe19a3091.
Fill in the pve-storage volume access settings page created in the PS6000S disk array with two initiating names, allowing only the volume to be accessed by pve-01 and pve-02
2. Obtain iSCSItarget
Execute the command iscsiadm-m discovery-t sendtargets-p
< target IP>Get iSCSItarget
Root@pve-01:~# iscsiadm-m discovery-t sendtargets-p 192.168.1.254
192.168.1.254pur3260 iqn.2001 1-05.com.equallogic:0-8a0906-a05065a08-f053c73a5da5881d-pve-storage
You can also copy iSCSI target directly in the Connections page of PS6000E pve-storage:
3. Log in to the iSCSI target
On each node, do the following to log in to the iSCSI target
a. Execute the command iscsiadm-m node-T-p-l to log in to the iSCSI target:
Iscsiadm-m node-Tiqn.2001-05.com.equallogic:0-8a0906-a05065a08-f053c73a5da5881d-pve-storage-p192.168.1.254-l
b. To restart the system to automatically log in to the target, execute the following command:
Iscsiadm-m node-p 192.168.1.254-opupdate-n node.startup-v automatic
Now, a new disk / dev/sdb has been added to the node (there is only / dev/sda on the local disk).
Perform the above login operation on other nodes (such as pve-02) (a. And b.), mount the pve-strage volume on PS6000E to each node.
Create LVM partition, physical volume and volume group on iSCSI disk / dev/sdb (only do the following on a node such as pve-01. Cannot operate again on other nodes)
a. Execute the disk partition command:
Root@pve-01:/#fdisk / dev/sdb
Welcome to fdisk (util-linux 2.25.2).
Changes will remainin memory only, until you decide to write them.
Be careful beforeusing the write command.
Command (m forhelp): G (create GPT partition table)
.
Command (m forhelp): n (create a new partition, enter the partition number, start and end sectors, etc.)
.
Command (m forhelp): t (change partition type)
Selected partition1
Partition type (type L to list all types): 23 (the type of partition 1 is changed to Linux LVM)
Command (m for help): P (view partition table)
Disk/dev/sdb: 2 TiB, 2147494133760 bytes, 4194324480 sectors
Units:sectors of 1 * 512 = 512 bytes
Sectorsize (logical/physical): 512 bytes / 512 bytes
I/Osize (minimum/optimal): 512 bytes / 512 bytes
Disklabeltype: gpt (partition table type is GPT)
Diskidentifier: 97D04321-DE97-4001-A68B-84585F6EAC93
Device Start End Sectors Size Type
/ dev/sdb1 34 4194324446 4194324413 2T Linux LVM (partition type is Linux LVM)
Command (m for help): W (write to disk and exit fdisk)
b. Create the physical volume physical volume (PV) on partition / dev/sdb1:
Pvcreate / dev/sdb1
c. Create a volume group volume group (VG), VG named "vg-pve"
Vgcreate vg-pve/dev/sdb1
At this point, iSCSI shared storage is ready. Available for use by proxmoxVE.
Add shared storage to the GUI of proxmox VE
Use the mouse to select: data Center-Storage-add-LVM
A dialog box for adding LVM appears:
Name ID (iSCSI-lvm), select volume group (the volume group vg-pve you just created will appear in the drop-down menu, select it), select node (select all), select enable, select share, and then click add.
Now the shared storage iSCSI-lvm appears on each node of the proxmoxVE. Shared storage iSCSI-lvm is LVM storage, and the hard disk of VM can be created or moved to run on it to achieve HA or hot migration VM through it. LVM does not support thin (Thin) disks and snapshots.
On how to parse the iSCSI disk array for Proxmox VE LVM shared storage to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.