Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
iSCSI target how to?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
leonchik1976
Apprentice
Apprentice


Joined: 24 Jan 2010
Posts: 176

PostPosted: Tue Apr 04, 2017 4:44 am    Post subject: iSCSI target how to? Reply with quote

when i try to emerge sys-block/iscsitarget, it fails with error "Linux 3.11 is the latest supported version".
is there any alternative to iscsitarget? or anyone knows good how to for iscsi target for gentoo?
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1792
Location: Oranienburg/Germany

PostPosted: Tue Apr 04, 2017 5:25 am    Post subject: Reply with quote

Hi,

You should try out sys-block/tgt instead.

Code:

* sys-block/tgt
     Available versions:  1.0.67 1.0.68 1.0.69 {fcoe fcp ibmvio infiniband rbd}
     Homepage:            http://stgt.sourceforge.net
     Description:         Linux SCSI target framework (tgt)


greets, bb
_________________
1st: i5-4570, 16GB, 1.75TB
2nd: i5-4570, 16GB, 620GB
3rd: i5-4570, 16GB, 10,5TB
4th: Asus N61VN, 8GB, 240GB
5th: C2D T7200, 2GB, 16GB USB + NFS
Back to top
View user's profile Send private message
leonchik1976
Apprentice
Apprentice


Joined: 24 Jan 2010
Posts: 176

PostPosted: Tue Apr 04, 2017 5:38 am    Post subject: Reply with quote

hi, thanks for a quick reply, but it seems that sys-block/tgt doesn't have systemd service?
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 22059
Location: here

PostPosted: Tue Apr 04, 2017 6:01 am    Post subject: Reply with quote

Maybe could help.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1792
Location: Oranienburg/Germany

PostPosted: Tue Apr 04, 2017 8:04 am    Post subject: Reply with quote

leonchik1976 wrote:
hi, thanks for a quick reply, but it seems that sys-block/tgt doesn't have systemd service?


Nope it has a systemd service. Look here: https://www.apt-browse.org/browse/debian/jessie/main/amd64/tgt/1:1.0.51-1/file/lib/systemd/system/tgt.service

And I had a look into the source package. There is a unit for systemd included.

greets, bb
_________________
1st: i5-4570, 16GB, 1.75TB
2nd: i5-4570, 16GB, 620GB
3rd: i5-4570, 16GB, 10,5TB
4th: Asus N61VN, 8GB, 240GB
5th: C2D T7200, 2GB, 16GB USB + NFS
Back to top
View user's profile Send private message
leonchik1976
Apprentice
Apprentice


Joined: 24 Jan 2010
Posts: 176

PostPosted: Tue Apr 04, 2017 9:14 am    Post subject: Reply with quote

i can't see nor 'systemd' USE flag, neither systemd service file:

# emerge sys-block/tgt -pqv
[ebuild R ] sys-block/tgt-1.0.69 USE="-fcoe -fcp -ibmvio -infiniband -rbd"

# equery files sys-block/tgt
* Searching for tgt in sys-block ...
* Contents of sys-block/tgt-1.0.69:
/etc
/etc/conf.d
/etc/conf.d/tgtd
/etc/init.d
/etc/init.d/tgtd
/etc/tgt
/etc/tgt/.keep_sys-block_tgt-0
/usr
/usr/sbin
/usr/sbin/tgt-admin
/usr/sbin/tgt-setup-lun
/usr/sbin/tgtadm
/usr/sbin/tgtd
/usr/sbin/tgtimg
/usr/share
/usr/share/doc
/usr/share/doc/tgt-1.0.69
/usr/share/doc/tgt-1.0.69/README.iscsi.bz2
/usr/share/doc/tgt-1.0.69/README.iser.bz2
/usr/share/doc/tgt-1.0.69/README.lu_configuration.bz2
/usr/share/doc/tgt-1.0.69/README.mmc.bz2
/usr/share/doc/tgt-1.0.69/README.rbd.bz2
/usr/share/doc/tgt-1.0.69/html
/usr/share/doc/tgt-1.0.69/html/targets.conf.5.html
/usr/share/doc/tgt-1.0.69/html/tgt-admin.8.html
/usr/share/doc/tgt-1.0.69/html/tgt-setup-lun.8.html
/usr/share/doc/tgt-1.0.69/html/tgtadm.8.html
/usr/share/doc/tgt-1.0.69/html/tgtd.8.html
/usr/share/doc/tgt-1.0.69/html/tgtimg.8.html
/usr/share/doc/tgt-1.0.69/tmf.txt.bz2
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/tgt-admin.8.bz2
/usr/share/man/man8/tgt-setup-lun.8.bz2
/usr/share/man/man8/tgtadm.8.bz2
/usr/share/man/man8/tgtd.8.bz2
/usr/share/man/man8/tgtimg.8.bz2
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 22059
Location: here

PostPosted: Tue Apr 04, 2017 9:33 am    Post subject: Reply with quote

Try this ebuild modified from tgt-1.0.69.ebuild
Code:
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=5

inherit flag-o-matic toolchain-funcs systemd

MY_TREE="77b802c"

DESCRIPTION="Linux SCSI target framework (tgt)"
HOMEPAGE="http://stgt.sourceforge.net"
SRC_URI="https://github.com/fujita/tgt/tarball/v${PV} -> ${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 ~arm64 x86"
IUSE="fcoe fcp ibmvio infiniband rbd"

CDEPEND="dev-perl/Config-General
        dev-libs/libxslt
        rbd? ( sys-cluster/ceph )
        infiniband? (
                sys-fabric/libibverbs:=
                sys-fabric/librdmacm:=
        )"
DEPEND="${CDEPEND}
        app-text/docbook-xsl-stylesheets"
RDEPEND="${DEPEND}
        dev-libs/libaio
        sys-apps/sg3_utils"

S=${WORKDIR}/fujita-tgt-${MY_TREE}

pkg_setup() {
        tc-export CC
}

src_prepare() {
        epatch "${FILESDIR}"/${P}-sysmacros.patch #580594

        sed -i -e 's:\($(CC)\) $^:\1 $(LDFLAGS) $^:' usr/Makefile || die

        # make sure xml docs are generated before trying to install them
        sed -i -e "s@install: @& all @g" doc/Makefile || die
}

src_compile() {
        local myconf
        use ibmvio && myconf="${myconf} IBMVIO=1"
        use infiniband && myconf="${myconf} ISCSI_RDMA=1"
        use fcp && myconf="${myconf} FCP=1"
        use fcoe && myconf="${myconf} FCOE=1"
        use rbd && myconf="${myconf} CEPH_RBD=1"

        emake -C usr/ KERNELSRC="${KERNEL_DIR}" ISCSI=1 ${myconf}
        emake -C doc
}

src_install() {
        emake  install-programs install-scripts install-doc DESTDIR="${D}" docdir=/usr/share/doc/${PF}
        newinitd "${FILESDIR}"/tgtd.initd tgtd
        newconfd "${FILESDIR}"/tgtd.confd tgtd
        systemd_dounit "${S}"/scripts/tgtd.service
        dodir /etc/tgt
        keepdir /etc/tgt
}

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum