Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In my laptop (running Linux) I have only one SSD, connected to the SATA3 port.

Why I have two sdx entries in /dev directory?

In particular I see /dev/sda and /dev/sdb, and /dev/sda is the SSD:

# fdisk -l

Disk /dev/sda: 128.0 GB, 128035676160 bytes, 250069680 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
Identificativo disco: 0x00034e4b

Dispositivo Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048   125954047    62976000    7  HPFS/NTFS/exFAT
/dev/sda2       125954048   190466047    32256000   83  Linux
/dev/sda3       190466048   222210047    15872000   83  Linux
/dev/sda4       222210048   250068991    13929472    7  HPFS/NTFS/exFAT

$ cat /sys/block/sda/queue/rotational 
0

The surprising thing is the following:

$ cat /sys/block/sdb/queue/rotational 
1

So it looks like that /dev/sdb is considered as a magnetic hard disk drive.

What's the point?

EDIT:

# lshw -C disk
  *-disk                  
       description: SCSI Disk
       product: xD/SD/M.S.
       vendor: Generic-
       physical id: 0.0.0
       bus info: scsi@8:0.0.0
       logical name: /dev/sdb
       version: 1.00
       serial: 3
       capabilities: removable
       configuration: sectorsize=512
     *-medium
          physical id: 0
          logical name: /dev/sdb
  *-disk
       description: ATA Disk
       product: SAMSUNG SSD 830
       physical id: 0.0.0
       bus info: scsi@0:0.0.0
       logical name: /dev/sda
       version: CXM0
       serial: S0Z3NSAC905663
       size: 119GiB (128GB)
       capabilities: partitioned partitioned:dos
       configuration: ansiversion=5 sectorsize=512 signature=00034e4b
share|improve this question
    
It seems the kernel does detect a block device. Please provide the output of lshw -C disk (as root). –  gertvdijk Dec 20 '12 at 12:57
    
@gertvdijk Edited first post. So I have an empty SCSI port on my laptop? –  ital Dec 20 '12 at 13:03
    
No, it's not empty - it's your card reader. What kernel version are you on? And what type of laptop are you on? –  gertvdijk Dec 20 '12 at 13:05
    
Kernel 3.6, my laptop is a ThinkPad Edge E130 and yes, it has a card reader. Thank you. –  ital Dec 20 '12 at 13:10
add comment

2 Answers 2

With the update (lshw … output) there is the answer now:

product: xD/SD/M.S.

That's your laptop's cardreader. Also, capabilities: removable.

UPDATE: As for the mentioned /sys/block/sdb/queue/rotational value being 1, this parameter actually influences the I/O scheduling algorithm in Linux. Probably, it should have been named something like 'minimize-seek' or similar, because this is what it is intended to do.

I'm not sure why it has been set to 1 for your particular device, I'm not that good in the flash memory architecture and technologies. But I can easily imagine an implementation that works better when accessing adjacent memory units first is quicker than jumping here and there over the medium (roughly equivalent to seeking).

share|improve this answer
1  
I've seen capabilities: removable also appear on AHCI-enabled, hotswap-aware controllers/drives too. –  gertvdijk Dec 20 '12 at 13:09
    
Agreed, that's not a distinctive feature of a floppy drive/CD-DVD reader/cardreader. –  Leonid Dec 20 '12 at 13:25
add comment

The output of lshw in your updated question appears to provide the information you're looking for; it's your flash card reader. Why it would appear as a magnetic drive is unclear to me - I would say this is a bug or a firmware error to represent itself like this.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.