Bug 9890

Summary: diskdrake doesn't recognize USB Flash drives
Product: Mageia Reporter: Frank Griffin <ftg>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED INVALID QA Contact:
Severity: normal    
Priority: Normal    
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: drakxtools CVE:
Status comment:

Description Frank Griffin 2013-04-27 17:32:37 CEST
I plug in a USB Flash Drive, and the system recognizes it immediately:

Apr 27 11:11:34 ftglap kernel: usb 3-1.2: new high-speed USB device number 4 using ehci-pci
Apr 27 11:11:34 ftglap kernel: usb 3-1.2: New USB device found, idVendor=1f75, idProduct=0916
Apr 27 11:11:34 ftglap kernel: usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Apr 27 11:11:34 ftglap kernel: usb 3-1.2: Manufacturer:         
Apr 27 11:11:34 ftglap kernel: usb 3-1.2: SerialNumber: 12120791000052
Apr 27 11:11:34 ftglap kernel: scsi7 : usb-storage 3-1.2:1.0
Apr 27 11:11:34 ftglap mtp-probe[1699]: checking bus 3, device 4: "/sys/devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1.2"
Apr 27 11:11:34 ftglap mtp-probe[1699]: bus: 3, device: 4 was not an MTP device
Apr 27 11:11:35 ftglap kernel: scsi 7:0:0:0: Direct-Access     CENTON   CENTON USB       1.00 PQ: 0 ANSI: 6
Apr 27 11:11:35 ftglap kernel: sd 7:0:0:0: [sdb] 122880000 512-byte logical blocks: (62.9 GB/58.5 GiB)
Apr 27 11:11:35 ftglap kernel: sd 7:0:0:0: [sdb] Write Protect is off
Apr 27 11:11:35 ftglap kernel: sd 7:0:0:0: [sdb] Mode Sense: 23 00 00 00
Apr 27 11:11:35 ftglap kernel: sd 7:0:0:0: [sdb] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA
Apr 27 11:11:35 ftglap kernel:  sdb: unknown partition table
Apr 27 11:11:35 ftglap kernel: sd 7:0:0:0: [sdb] Attached SCSI removable disk

but when I start diskdrake, /dev/sdb isn't shown.

diskdrake clearly knows about sdb from the stdout/stderr when run from a console:

Apr 27 11:12:12 ftglap drakconf.real[1772]: ### Program is starting ###
Apr 27 11:14:13 ftglap diskdrake[1885]: ### Program is starting ###
Apr 27 11:14:13 ftglap diskdrake[1885]: running: dmraid -s -c -c
Apr 27 11:14:13 ftglap diskdrake[1885]: _raid_devices_raw
Apr 27 11:14:13 ftglap diskdrake[1885]: running: dmraid -d -s -c -c
Apr 27 11:14:13 ftglap diskdrake[1885]: running: dmraid -r -c -c
Apr 27 11:14:13 ftglap diskdrake[1885]: dmraid:
Apr 27 11:14:13 ftglap diskdrake[1885]: using dmraid on
Apr 27 11:14:13 ftglap diskdrake[1885]: HDIO_GETGEO on /dev/sda succeeded: heads=255 sectors=63 cylinders=25665 start=0
Apr 27 11:14:13 ftglap diskdrake[1885]: HDIO_GETGEO on /dev/sdb succeeded: heads=64 sectors=32 cylinders=60000 start=0
....
Apr 27 11:14:13 ftglap diskdrake[1885]: running: blkid -o udev -p /dev/sdb
Apr 27 11:14:13 ftglap diskdrake[1885]: blkid gave: ntfs-3g 1E4407D44407AD99 CENTON_USB
Apr 27 11:14:13 ftglap diskdrake[1885]: running: blkid -o udev -p /dev/sdb
Apr 27 11:14:13 ftglap systemd-udevd[1932]: failed to execute '/usr/lib/udev/socket:/org/kernel/dm/multipath_event' 'socket:/org/kernel/dm/multipath_event': No such file or directory
Apr 27 11:14:13 ftglap diskdrake[1885]: blkid gave: ntfs-3g 1E4407D44407AD99 CENTON_USB
Apr 27 11:14:13 ftglap diskdrake[1885]: running: blkid -o udev -p /dev/sdb
Apr 27 11:14:14 ftglap diskdrake[1885]: blkid gave: ntfs-3g 1E4407D44407AD99 CENTON_USB

So why isn't  there a tab for the drive in the display ?  Is this by design ?  If so, why ?

Reproducible: 

Steps to Reproduce:
Comment 1 Frank Griffin 2013-04-27 17:34:35 CEST
I misspoke about stdout/stderr.  All of the above is from journalctl.
Comment 2 Frank Griffin 2013-04-27 17:51:10 CEST
fdisk sees it, but doesn't like it:

[root@ftglap system]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.22.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sdb: 62.9 GB, 62914560000 bytes, 122880000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x69205244

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   ?   218129509  1920119918   850995205   72  Unknown
/dev/sdb2   ?   729050177  1273024900   271987362   74  Unknown
/dev/sdb3   ?   168653938   168653938           0   65  Novell Netware 386
/dev/sdb4      2692939776  2692991410       25817+   0  Empty

Partition table entries are not in disk order

gparted sees it as having a single /dev/sdb1 partition, but says it's unreadable.

I think that diskdrake ought to at least show it so the existing "partitions" can be removed and new ones created.  This thing was obviously formatted for Windows, so I'm not sure if maybe it's GPT.
Comment 3 Frank Griffin 2013-04-27 18:02:56 CEST
gdisk claims it's not GPT:

[root@ftglap system]# gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.6

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
you don't want to convert your MBR partitions to GPT format!
***************************************************************

Exact type match not found for type code 7200; assigning type code for
'Linux filesystem'
Exact type match not found for type code 7400; assigning type code for
'Linux filesystem'
Exact type match not found for type code 6500; assigning type code for
'Linux filesystem'

Warning! Secondary partition table overlaps the last partition by
1797239952 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help): q
Comment 4 Frank Griffin 2013-04-27 21:10:25 CEST
I'm closing this as INVALID, because I've determined that the contents of the drive is an NTFS filesystem with no partition structure.  The /dev/sdb device is created, but no /dev/sdbX devices are.  However, it can be mounted using
                    ntfs-3g /dev/sdb /mnt/disk
and just shows as empty.

I guess this is something that Windows allows for, but i can't see any point to not having a partition structure, so it's probably not something that diskdrake should be concerned with.

Status: NEW => RESOLVED
Resolution: (none) => INVALID