Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
can not foramt device after being used by tgtd
Version-Release number of selected component (if applicable):
scsi-target-utils-1.0.4-3.el6.x86_64
How reproducible:
yes
Steps to Reproduce:
Define an iSCSI target name:
# tgtadm --lld iscsi --op new --mode target --tid=1 --targetname iqn.2010-10.local.rhev:target1
Add disk as a logical unit to the target:
# tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/sdb1
try to format part:
# mke2fs /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
/dev/sdb1 is apparently in use by the system; will not make a filesystem here!
trun off tgtd try again same problem
unload iscsi moduals same problem
reboot same problem
I had to boot into rescue mode to foramt the drive
Actual results:
cannot format dive after used by tgtd
Expected results:
be able to format dirve
Additional info:
(In reply to comment #0)
> Add disk as a logical unit to the target:
> # tgtadm --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /dev/sdb1
>
In that command you are passing tgt a partition on a disk and not the entire disk. Is that what you intended (the comment above mentions you wanted to add a disk)?
Just a warning:
If you pass tgtd a partition, it will expose it as a complete disk, so if on the initiator you did fdisk and mkfs on what the initiator sees, I think it will screw things up if you later try to access /dev/sdb on the target side assuming that all the partitions are from the target's point of view.
> try to format part:
>
> # mke2fs /dev/sdb1
> mke2fs 1.41.12 (17-May-2010)
> /dev/sdb1 is apparently in use by the system; will not make a filesystem here!> unload iscsi moduals same problem
The unloading iscsi modules threw me. tgtd does not use any kernel modules. So are you running mkfs on the /dev/sdb1 on the tgt systems or are did the iscsi initiator just happen to assign the iscsi disk /dev/sdb too, and you are running mkfs in the initiator side.
>
> reboot same problem
>
Do you mean you reboot and restart tgtd? Is tgtd restarted after you reboot and try to run mkfs?
Comment 5RHEL Program Management
2011-04-04 02:17:04 UTC
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.
Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.