aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ctladm
Commit message (Collapse)AuthorAgeFilesLines
* Report STATUS_QUEUED/SENT in `ctladm dumpooa` output.Alexander Motin2020-05-291-3/+6
| | | | | | | | MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=361625
* Add device temperature reporting into CTL.Alexander Motin2019-07-261-1/+4
| | | | | | | | | | The values to report can be set via LUN options. It can be useful for testing, and also required for Drive Maintenance 2016 feature set. MFC after: 2 weeks Notes: svn path=/head/; revision=350346
* Fix passing wrong variables to nvlist_destroy() after r333446.Alexander Motin2018-12-211-4/+4
| | | | | | | | Reported by: Alexander Fedorov (IT-Grad.ru) MFC after: 5 days Notes: svn path=/head/; revision=342349
* Rework CTL frontend & backend options to use nv(3), allow creating multipleMarcelo Araujo2018-05-103-197/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ioctl frontend ports. This revision introduces two changes to CTL: - Changes the way options are passed to CTL_LUN_REQ and CTL_PORT_REQ ioctls. Removes ctl_be_arg structure and associated logic and replaces it with nv(3)-based logic for passing in and out arguments. - Allows creating multiple ioctl frontend ports using either ctladm(8) or ctld(8). New frontend ports are represented by /dev/cam/ctl<pp>.<vp> nodes, eg /dev/cam/ctl5.3. Those device nodes respond only to CTL_IO ioctl. New command-line options for ctladm: # creates new ioctl frontend port with using free pp and vp=0 ctladm port -c # creates new ioctl frontend port with pp=10 and vp=0 ctladm port -c -O pp=10 # creates new ioctl frontend port with pp=11 and vp=12 ctladm port -c -O pp=11 -O vp=12 # removes port with number 4 (it's a "targ_port" number, not pp number) ctladm port -r -p 4 New syntax for ctl.conf: target ... { port ioctl/<pp> ... } target ... { port ioctl/<pp>/<vp> ... Note: Most of this work was made by jceel@, thank you. Submitted by: jceel Reworked by: myself Reviewed by: mav (earlier versions and recently during the rework) Obtained from: FreeNAS and TrueOS Relnotes: Yes Sponsored by: iXsystems Inc. Differential Revision: https://reviews.freebsd.org/D9299 Notes: svn path=/head/; revision=333446
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-272-2/+6
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Correct typo in usage string.Benno Rice2017-08-221-1/+1
| | | | | | | | Submitted by: peterpakos (GitHub username) MFC after: 1 day Notes: svn path=/head/; revision=322804
* The ctladm man page incorrectly duplicated the text for theBenedict Reuschling2017-07-151-3/+3
| | | | | | | | | | | | | | | delete subcommand in the modify section. Rewrite the modify description text in two places to say modify/modified instead of remove/removed. PR: 220710 Submitted by: sseekamp@risei.net Reviewed by: mav@ MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11608 Notes: svn path=/head/; revision=321023
* Split iscsi(4) ctl frontend off of ctl(4) as cfiscsi(4)Enji Cooper2017-03-302-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The goal of this work is to remove the explicit dependency for ctl(4) on iscsi(4), so end-users without iscsi(4) support in the kernel can use ctl(4) for its other functions. This allows those without iscsi(4) support built into the kernel to use ctl(4) as a test mechanism. As a sidenote, this was possible around the 10.0-RELEASE period, but made impossible for end-users without iscsi(4) between 10.0-RELEASE and 11.0-RELEASE. Automatically load cfiscsi(4) from ctladm(8) and ctld(8) for backwards compatibility with previously releases. The automatic loading feature is compiled into the beforementioned tools if MK_ISCSI == yes when building world. Add a manpage for cfiscsi(4) and refer to it in ctl(4). Differential Revision: D10099 MFC after: 2 months Relnotes: yes Reviewed by: mav, trasz Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=316212
* ctldadm: sort #includes per style(9)Enji Cooper2017-03-271-12/+11
| | | | | | | | | | | - Only include sys/types.h or sys/param.h, not both. - Sort alphabetically. MFC after: 3 days Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=316051
* usr.sbin: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-041-2/+2
| | | | | | | | | | This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314659
* Replace Cyrillic characters with Latin (normal) ones.Warren Block2017-02-031-2/+2
| | | | | | | | | | PR: 216534 Submitted by: eborisch+FreeBSD@gmail.com MFC after: 1 week Sponsored by: iXsystems Notes: svn path=/head/; revision=313162
* Make CTL ramdisk backend a real RAM disk.Alexander Motin2017-01-241-2/+17
| | | | | | | | | | | | | | | | | | | | | | If "capacity" LU option is set, ramdisk backend now implements featured thin provisioned disk, storing data in malloc(9) allocated memory blocks of pblocksize bytes (default PAGE_SIZE or 4KB). Additionally ~0.2% of LU size is used for indirection tree (bigger pblocksize reduce the overhead). Backend supports all unmap and anchor operations. If configured capacity is overflowed, proper error conditions are reported. If "capacity" LU option is not set, the backend operates mostly the same as before without allocating real storage: writes go to nowhere, reads return zeroes, reporting that all LBAs are unmapped. This backend is still mostly oriented on testing and benchmarking (it is still a volatile RAM disk), but now it should allow to run real FS tests, not only simple dumb dd. MFC after: 2 weeks Notes: svn path=/head/; revision=312694
* Add support for locally assigned RFC 4122 UUID LUN identifiers.Alexander Motin2016-12-211-2/+5
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=310356
* Add LU option to control reported provisioning type.Alexander Motin2016-10-151-1/+7
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=307374
* Add LUN options to limit UNMAP and WRITE SAME sizes.Alexander Motin2016-10-151-1/+8
| | | | | | | | | | | | CTL itself has no limits on on UNMAP and WRITE SAME sizes. But depending on backends large requests may take too much time. To avoid that new configuration options allow to hint initiator maximal sizes it should not exceed. MFC after: 2 weeks Notes: svn path=/head/; revision=307350
* Make the iSCSI parameter negotiation more flexible.Navdeep Parhar2016-08-251-17/+22
| | | | | | | | | | | | | | | | | | | | | | Decouple the send and receive limits on the amount of data in a single iSCSI PDU. MaxRecvDataSegmentLength is declarative, not negotiated, and is direction-specific so there is no reason for both ends to limit themselves to the same min(initiator, target) value in both directions. Allow iSCSI drivers to report their send, receive, first burst, and max burst limits explicitly instead of using hardcoded values or trying to derive all of them from the receive limit (which was the only limit reported by the drivers prior to this change). Display the send and receive limits separately in the userspace iSCSI utilities. Reviewed by: jpaetzel@ (earlier version), trasz@ Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D7279 Notes: svn path=/head/; revision=304787
* Remove duplicated semicolons.Edward Tomasz Napierala2016-06-051-4/+4
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=301438
* Report negotiated MaxBurstLength and FirstBurstLength in "iscsictl -v"Edward Tomasz Napierala2016-06-051-0/+10
| | | | | | | | | and "ctladm islist -v" outputs. MFC after: 1 month Notes: svn path=/head/; revision=301437
* usr.sbin: minor spelling fixes on comments.Pedro F. Giffuni2016-05-011-1/+1
| | | | | | | No functional change. Notes: svn path=/head/; revision=298886
* Fix typo.Edward Tomasz Napierala2016-02-291-1/+1
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=296195
* Add to CTL initial support for CDROMs and removable devices.Alexander Motin2015-09-271-3/+4
| | | | | | | Relnotes: yes Notes: svn path=/head/; revision=288310
* Remove some duplicate, legacy, dead and questionable code.Alexander Motin2015-09-262-596/+26
| | | | Notes: svn path=/head/; revision=288259
* CTL documentation update, mostly for HA.Alexander Motin2015-09-121-2/+5
| | | | Notes: svn path=/head/; revision=287707
* Remove unused target and initiator IDs.Alexander Motin2015-09-102-213/+125
| | | | Notes: svn path=/head/; revision=287620
* Allow LUN options modification via CTL_LUNREQ_MODIFY.Alexander Motin2015-09-062-4/+88
| | | | | | | Not all changes take effect, but that is a different question. Notes: svn path=/head/; revision=287500
* Addition to r287455.Alexander Motin2015-09-041-1/+0
| | | | Notes: svn path=/head/; revision=287458
* Drop "internal" CTL frontend.Alexander Motin2015-08-152-255/+1
| | | | | | | | | Its idea was to be a simple initiator and execute several commands from kernel level, but FreeBSD never had consumer for that functionality, while its implementation polluted many unrelated places.. Notes: svn path=/head/; revision=286806
* make ctdladm(8) return 0 is everything was ok.Baptiste Daroussin2015-07-171-0/+3
| | | | | | | | | | | | | | | | | retval is used to test the return of XML_Parse function which is ok if 1 is returned and retval it directly returned to the main function and used as an exit value. if all the parsing part is done reset retval to 0 so that the command return 0 if everything ok Differential Revision: https://reviews.freebsd.org/D3102 Reviewed by: trasz MFC after: 3 days Sponsored by: gandi.net Notes: svn path=/head/; revision=285658
* User proper terminology - iSCSI sessions, not iSCSI connections.Edward Tomasz Napierala2015-07-031-7/+7
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=285085
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-273-26/+166
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-193-67/+163
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-192-4/+314
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | | Merge headSimon J. Gerraty2014-04-282-39/+39
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * \ \ \ Merge head@256284Simon J. Gerraty2013-10-132-4/+469
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256424
| * \ \ \ \ Merge from headSimon J. Gerraty2013-09-051-2/+4
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * \ \ \ \ \ sync from headSimon J. Gerraty2013-04-122-2/+13
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=249429
| * | | | | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | | | | Sync from headSimon J. Gerraty2012-11-043-13/+9
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | | | Advertise ctlstat(8) a little better.Edward Tomasz Napierala2015-05-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=283285
* | | | | | | | | Fix man page to match real option names.Alexander Motin2015-02-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=278621
* | | | | | | | | Make it possible to set (via ctl.conf(5)) and query (via ctladm islist -v)Edward Tomasz Napierala2015-02-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | target iSCSI offload. Add mechanism to query maximum receive data segment size supported by chosen hardware offload module, and use it in ctld(8) to determine the value to advertise to the other side. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=278331
* | | | | | | | | Make "ctladm islist" ignore unknown elements, so the old versionEdward Tomasz Napierala2015-02-061-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | continues to work with newer kernel. Other ctladm(8) "*list" subcommands seem to already handle it in a reasonable way. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=278316
* | | | | | | | | Bring some more order into iSCSI portal group tags support.Alexander Motin2015-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While ctld(8) still does not allow multiple portal groups per target to be configured, kernel should now be able to handle it. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=278161