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.
Bug 591849 - usb device couldn't be detached via udisks --detach
Summary: usb device couldn't be detached via udisks --detach
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: udisks
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: David Zeuthen
QA Contact: desktop-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-13 11:03 UTC by Lubos Kocman
Modified: 2013-03-06 04:02 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-13 17:22:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Lubos Kocman 2010-05-13 11:03:07 UTC
Description of problem:

usb device couldn't be detached via udisks --detach

lkocman@ThinkPad X60$ sudo fdisk /dev/sdb

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): p

Disk /dev/sdb: 16.2 GB, 16173236224 bytes
64 heads, 32 sectors/track, 15424 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000176db

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       15424    15794160   83  Linux

Command (m for help): q

lkocman@ThinkPad X60$ df -h | grep sdb
/dev/sdb1              15G  166M   14G   2% /media/ADATA

lkocman@ThinkPad X60$ sudo udisks --detach /dev/sdb1
Detach failed: Device is not a drive

lkocman@ThinkPad X60$ sudo udisks --unmount /dev/sdb1

lkocman@ThinkPad X60$ sudo udisks --detach /dev/sdb1
Detach failed: Device is not a drive



Version-Release number of selected component (if applicable):
RHEL 6.0 snapshot 2
udisks-1.0.1-1.el6.i686
kernel: 2.6.32-25.el6.i686

How reproducible:


Steps to Reproduce:

Setup
   1. Obtain an USB mass storage device.
   2. Plugin in USB device.
   3. Let OS mount USB device (lets say that USB mass storage corresponds with /dev/sdb1).

Actions:
   1. Open terminal
   2. Runas root

      udisks --detach /dev/sdb1

  
Actual results:

Detach failed: Device is not a drive

Expected results:

The USB device should be unmounted and powered down.

Additional info:

Comment 2 RHEL Program Management 2010-05-13 12:48:22 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.

Comment 3 Bill Nottingham 2010-05-13 14:44:12 UTC
What happens if you do udisks --detach /dev/sdb (specifying no partition?)

Comment 4 David Zeuthen 2010-05-13 17:22:02 UTC
As Bill says you are using the command incorrectly. If you use /dev/sdb it should work. Btw, you also need to ensure that all partitions etc. are not in use (e.g. not mounted, not claimed by LVM, MD etc.) otherwise the command will fail.


Note You need to log in before you can comment on or make changes to this bug.