Lost iSCSI Target configuration

  • Hi everybody.


    I've been running OMV 2.2.13 with the iSCSI Target plugin for quite a while, and it has been working great.


    Last week, I lost a drive in my six disk SATA software RAID array. I was able to remove the faulty drive, replace it with a new drive, and rebuild the array successfully. However, after doing so, all of my iSCSI configuration got wiped out, and I am not able to reconfigure it via the GUI, as when I try to add a new LUN, the device list is coming up blank.


    I was able to get iSCSI working again by manually editing /etc/iet/ietd.conf, but I'd like to have that configuration reflected in the GUI. Any suggestions?


    I have replaced a drive in this RAID array before, and didn't have this problem. The only difference this time is that the device list changed... my boot device used to be /dev/sda and the array was /dev/sdb through /dev/sdg, but now the array is /dev/sda through /dev/sdf, and the boot device is /dev/sdg.


    The RAID device /dev/md0 contains one partition, and I've read in the forums that the device list does not list devices that contain partitions. Just wondering why this is?


    Here is the contents of my /etc/iet/ietd.conf file:


    • Offizieller Beitrag

    I'd like to have that configuration reflected in the GUI. Any suggestions?

    Look at the iscsi section of /etc/openmediavault/config.xml to see if anything is wrong. If you have to make changes, then omv-mkconf iscsitarget will re-write the config and you can see if it is correct.


    The only difference this time is that the device list changed... my boot device used to be /dev/sda and the array was /dev/sdb through /dev/sdg, but now the array is /dev/sda through /dev/sdf, and the boot device is /dev/sdg.

    Drive letters can change in Linux. That is why fstab refers to the filesystems by UUID.


    I've read in the forums that the device list does not list devices that contain partitions. Just wondering why this is?

    The physical disks tab doesn't show partitions or filesystems. The filesystems tab shows filesystems whether they use the entire device or just a parition. OMV doesn't create a partition for mdadm raid but it does create a partition for single disks.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Look at the iscsi section of /etc/openmediavault/config.xml to see if anything is wrong.

    Sorry, I meant to post that in my original message. The iscsi section of config.xml is pretty much empty.


    Code
    <iscsitarget>
          <enable>1</enable>
          <authentication></authentication>
          <extraoptions></extraoptions>
          <targets></targets>
        </iscsitarget>

    If you have to make changes, then omv-mkconf iscsitarget will re-write the config and you can see if it is correct.

    Because the config.xml file is empty, this just erased what I had manually put into ietd.conf.


    The physical disks tab doesn't show partitions or filesystems. The filesystems tab shows filesystems whether they use the entire device or just a parition. OMV doesn't create a partition for mdadm raid but it does create a partition for single disks.

    Sorry for the confusion... I was referring to the Device dropdown box in the Add LUN section of the iSCSI Target configuration, not the Physical Disk tab under Storage. I had read that the dropdown box doesn't show any block devices that contain partitions, and that the disk needed to be wiped in order to be able to choose the block device and add it as a LUN.

    • Offizieller Beitrag

    The iscsi section of config.xml is pretty much empty.

    That is strange that losing a drive would change config.xml. Do you have a backup of it somewhere?


    Because the config.xml file is empty, this just erased what I had manually put into ietd.conf.

    As you already discovered, I wouldn't use omv-mkconf iscsitarget if the config.xml section was empty.


    I had read that the dropdown box doesn't show any block devices that contain partitions, and that the disk needed to be wiped in order to be able to choose the block device and add it as a LUN.

    That is correct. You can only choose devices not partitions. As a safety feature, it doesn't allow you to use drives with partitions.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • That is strange that losing a drive would change config.xml. Do you have a backup of it somewhere?

    Unfortunately I don't. Not sure why it is not a part of my regular backup schedule though.



    That is correct. You can only choose devices not partitions. As a safety feature, it doesn't allow you to use drives with partitions.

    Would it not be better to allow the device to be selected, but then if a partition is detected on the selected device, display a warning that it might not be a good idea to select this device, and ask the user for confirmation if they are sure they really want to do this? In my case, I am not using this device/partition for anything else other than iSCSI, so I do want to be able to select it. It would also help a user that for whatever reason lost their OMV boot device and had to re-install... they could re-import their data drive(s) and be able to reset them up as iSCSI targets.


    Or, what if devices in the dropdown selection were only able to be chosen if there were no detected partitions on them that were mounted? An option in the File Systems tab could also be included as to flag whether a partition should be mounted or not at boot time. Normally this would be checked and enabled, but in my case, I could uncheck the auto mount option, dismount the partition (or reboot), and then be able to reset the iSCSI configuration.

    • Offizieller Beitrag

    Would it not be better to allow the device to be selected, but then if a partition is detected on the selected device, display a warning that it might not be a good idea to select this device, and ask the user for confirmation if they are sure they really want to do this? In my case, I am not using this device/partition for anything else other than iSCSI, so I do want to be able to select it. It would also help a user that for whatever reason lost their OMV boot device and had to re-install... they could re-import their data drive(s) and be able to reset them up as iSCSI targets.


    Or, what if devices in the dropdown selection were only able to be chosen if there were no detected partitions on them that were mounted? An option in the File Systems tab could also be included as to flag whether a partition should be mounted or not at boot time. Normally this would be checked and enabled, but in my case, I could uncheck the auto mount option, dismount the partition (or reboot), and then be able to reset the iSCSI configuration.

    Unfortunately, I can't change that code. So, submit a feature request on bugtracker (slow right now).

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.6 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!