Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Oct 2024 15:06:19 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 262301] [ctl] Cannot "kldunload ctl"
Message-ID:  <bug-262301-227-agnlqcCN4w@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-262301-227@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262301

--- Comment #5 from Alan Somers <asomers@FreeBSD.org> ---
Unloading cfiscsi first works _if_ ctld shut down cleanly.  What originally
tripped me up was the case where ctld did not shut down cleanly, leaving iSCSI
targets configured in the kernel.  In that case, the iscsi and cfiscsi kernel
modules cannot be unloaded.

Eventually I discovered an undocumented command that can manually remove iSCSI
ports.  It looks like this:

ctladm port -d iscsi -r -p DONTCARE -O cfiscsi_portal_group_tag=TAG -O
cfiscsi_target=TARGET

On FreeBSD 15+, the "-p DONTCARE" option can be omitted.  The TAG is what's
displayed on the "pp" column of "ctladm portlist", and the TARGET is displayed
on the last column (but leave out any part after the comma, like ",t,0x0101".

-- 
You are receiving this mail because:
You are the assignee for the bug.

help

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