Skip to content

How To Add An iSCSI Target To Proxmox VE 3.4 And Create LVM Group

I’ve been digging into Proxmox VE 3.4 quite a bit lately. I have a FreeNAS server on my network that I use for VM storage in my lab. When I went to add an iSCSI target on Proxmox for virtual machine and image storage, it was a bit confusing. So, I thought I would put a quick step by step guide together to help other folks in the same boat. Here goes.

How to add an iSCSI target in Proxmox

First, log into your Proxmox VE 3.4 server via the web interface. Make sure Datacenter (top level) is selected in the left pane, and make sure you are on the Storage tab on the right pane. It should look like this.

Screen Shot 2015-05-23 at 9.08.23 PM

Now, click on the Add pull down menu, and select iSCSI.

Screen Shot 2015-05-23 at 9.10.31 PM


This can look a bit intimidating because the naming scheme used isn’t very intuitive. It’s really not that bad once you know what to do.

Go ahead and type in a name for the iSCSI drive in ID. This can be anything you like, such as, iSCSI-share.

Portal is the IP address of your iSCSI target. In my case, the FreeNAS server is at 192.168.1.57 on my lab network. Once you enter the IP address, when you click the target down arrow, it will automatically populate with all of the available iSCSI targets on that particular host. Like This.

Screen Shot 2015-05-23 at 9.13.35 PM

Select your desired target, and click Add. Now, it’s added but it isn’t usable quite yet. At this point it’s no more than a raw unformatted, unpartitioned drive. So, were going to set up LVM on it, so it has a usable partition and its formated.

How to create an LVM group on an iSCSI target

Click on Add (the same Add we used to add the iSCSI target) and select LVM.

Screen Shot 2015-05-23 at 9.16.44 PM

You will see this box.

Screen Shot 2015-05-23 at 9.17.28 PM

Once again, give it a name. It can be very similar to the name you gave your iSCSI target. This will be the actual drive you will select for VM storage and what not, so keep that in mind when you name it. Put your desired name in the ID field.

Next, under Base storage, select the iSCSI target we added earlier. Then, under base volume, all of the LUNs for that iSCSI target are listed. Most of the time, there is only a single LUN, so go ahead and select it.

Volume Group is a name for the LVM group itself. I usually just put the same thing in the Volume Group field as I did in the ID field.

Make sure you click the Shared checkbox!!

Screen Shot 2015-05-23 at 9.19.16 PM

Go ahead and click add.

That’s it! Your iSCSI target now has LVM set up on it and it’s ready to store your virtual machines.

If you run into any problems, feel free to ask for help in the comments below. Thanks!

9 thoughts on “How To Add An iSCSI Target To Proxmox VE 3.4 And Create LVM Group

  1. Juan J says:

    you create n lvm for any virtual machine thatyou create right ? if you have a a iSCSI with 50gb i can have for examples 4 vm with 10gb in 4 LVM correct ? the image can be create in another disj in the freenas

    Reply
  2. akismetuser144268698 says:

    I have a fisical iSCSI (Fugitsu Eternus DX60) and I can’t see it. When I put the portal and clic in target, I can’t find any target.
    Do you know why?
    I think I have to add the iqn of the Proxmox VE in the iSCSI but I don’t know what’s my Proxmox VE iqn.
    Do you know how can I find it?
    Thanks.

    Reply
    • Mike Smith says:

      Yes, you’re on to something. Most iSCSI storage appliances either use CHAP authentication, or have an “approved IP/network/subnet” list to grant access. I would start there.

      Reply
  3. Oscar Gómez says:

    Hello

    You did not say to uncheck “Use LUNs directly”
    Is that correct ?

    Reply
    • Mike Smith says:

      Hi Oscar,

      That is right, per the article, leave “Use LUNs directly” checked. Let me know if everything works for you. Thanks for reading!

      Mike

      Reply
  4. ahmadwahyu santosa says:

    Hallo,
    I was a novice in operating the proxmox, I want to add ISCSI to proxmox, but experienced problems when pressing the add button in the lVM, appeared alert as below:
    “create storage failed: pvcreate ‘/dev/disk/by-id/scsi-330000000280913bb ‘ error: Can’t open/dev/disk/by-id/scsi-330000000280913bb exclusively. Mounted filesystem? (500) ”

    Please help!!!
    Thanks

    Reply
    • Mike Smith says:

      Did it have a file system formatted on it already?

      Reply
      • ahmadwahyu santosa says:

        No, he doesn’t have it, whether the current set of file system?
        because of some of the literature I was looking on the internet it does not set the file system.

        If there is nothing wrong from my understanding, please straightened out. Thank you!!

        Reply
  5. ahmadwahyu santosa says:

    No, he doesn’t have it, whether the current set of file system?
    because of some of the literature I was looking on the internet it does not set the file system.

    If there is nothing wrong from my understanding, please straightened out. Thank you!!

    Reply

Leave a Reply