Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jun 2021 12:51:29 -0400
From:      Ryan Stone <rysto32@gmail.com>
To:        freebsd-scsi@freebsd.org
Subject:   Converting ctl.conf to UCL
Message-ID:  <CAFMmRNwSJKdfUX7_oVNcaYLP9BCNjqJNOQ_TG1zw1sSeJvvXfg@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
I'm trying to use configure ctld to create virtual disks suitable for
use with virtio-scsi (I'm working with a VM that is hardcoded to
require scsi disks, so the other virtio disk providers unfortunately
can't be used in my case).  I would like to use ctl.conf in UCL format
so I can use UCL's file inclusion facilities, which will simplify
managing my configuration.  Unfortunately, I'm having trouble
converting a file to UCL format and I'm beginning to suspect that the
manpage is missing something.  Here is my test configuration, which
does work for me:

lun foo_test_storage0 {
        serial "f1-1-1";
        path "/usr/local/vmrc/vm/foo-test/storageHDD0.img";
}

lun foo_test_storage1 {
        serial "f1-1-2";
        path "/usr/local/vmrc/vm/foo-test/storageHDD1.img";
}

target "iqn.com.example:foo-test" {
        port "ioctl/11/1"
        lun 0 foo_test_storage0
        lun 1 foo_test_storage1
}

My attempt at a UCL version resulted in this:

lun {
        foo_test_storage0 {
                serial = "f1-1-1"
                path = "/usr/local/vmrc/vm/foo-test/storageHDD0.img"
        }

        foo_test_storage1 {
                serial = "f1-1-2"
                path = "/usr/local/vmrc/vm/foo-test/storageHDD1.img"
        }
}

target {
        "iqn.com.example:foo-test" {
                port = "ioctl/11/1"
                lun = [
                        { number = 0, name = foo_test_storage0 },
                        { number = 1, name = foo_test_storage1 } ,
                ]
        }
}

But I just get the error:

Starting ctld.
ctld: no LUNs defined for target "iqn.com.example:foo-test"

This seems to match the sample in the manpage, so I'm confused as to
what has gone wrong.  Does anybody have any pointers?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFMmRNwSJKdfUX7_oVNcaYLP9BCNjqJNOQ_TG1zw1sSeJvvXfg>