hard drive in usb case refuses to mount but i get no error

I have a 1TB western digital 3 1/2 hard disk used as a backup drive in a usb case.
I’ve been using it for making incremental backups since a lot of time (with storebackup).
Some days ago, after an upgrade of OpenSuse to 13.2, I was going to make a backup and when I mounted the disk I received an error that the disk id didn’t exists.
I looked with fdisk, and my disk WAS in /dev/sdb, but searching in /dev/disk/by-id its “reference” was not there (the one I had in /etc/fstab) but a different one… i thought mayme I changed the disk and I forgot it…
Then I changed the id in fstab by the one pointing to sdb1 in /dev/disk/by-id and mounted it… the disk seemed to be blank… great shock!!
I discover that I tried to mount the disk but it was not mounted, then I thought the disk was in the process of crashing. So I switch it off, i bought a new external usb disk and i tried to recover the “broken” one.
I plug my “old” backup disk inside my computer, attached to a sata port, mounted it (it worked) and the new one to a usb3. I did a cp -a /oldone/* /newone and it ended with no error in a couple of days (almost 1 TB of info)
Then I updated the backup with storebackup with no errors… then I detached it from the computer an put it again in the usb case.
The problem is the same…


andromeda:/mnt/backup # fdisk -l /dev/sdb

Disco /dev/sdb: 931,5 GiB, 1000204886016 bytes, 1953525168 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 512 bytes
Tamaño de E/S (mínimo/óptimo): 512 bytes / 512 bytes
Tipo de etiqueta de disco: dos
Identificador del disco: 0x6bd083b1

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953525167 1953523120 931,5G 83 Linux

andromeda:/mnt/backup # ls -l /dev/disk/by-uuid |grep sdb1
lrwxrwxrwx 1 root root 10 ago 18 18:54 6e15b0cc-c3ee-40d4-9340-4cdb2a75ee35 -> ../../sdb1
andromeda:/mnt/backup # cat /etc/fstab  |grep 6e15b0cc-c3ee-40d4-9340-4cdb2a75ee35
/dev/disk/by-uuid/6e15b0cc-c3ee-40d4-9340-4cdb2a75ee35  /mnt/backup     auto    noauto,defaults,users,exec 
andromeda:/mnt/backup # cd
andromeda:~ # mount /mnt/backup
andromeda:~ # ls /mnt/backup
andromeda:~ # umount /mnt/backup
umount: /mnt/backup: not mounted
andromeda:~ # mount /dev/sdb1 /mnt/backup
andromeda:~ # ls /mnt/backup
andromeda:~ # umount /mnt/backup
umount: /mnt/backup: not mounted
andromeda:~ #

If it had not happend just before a System upgrade, y will think it is the usb case wich is broken, but as I had just made the upgrade and I get no error, I’, not sure.

Thins is the log when pluggin the usb case


andromeda:~ # tail -f /var/log/messages

2015-08-18T19:12:30.303279+02:00 andromeda kernel:  1571.605552] usb 2-4: new high-speed USB device number 3 using ehci-pci
2015-08-18T19:12:30.421244+02:00 andromeda kernel:  1571.724324] usb 2-4: New USB device found, idVendor=174c, idProduct=5136
2015-08-18T19:12:30.421273+02:00 andromeda kernel:  1571.724335] usb 2-4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
2015-08-18T19:12:30.421274+02:00 andromeda kernel:  1571.724342] usb 2-4: Product: AS2105
2015-08-18T19:12:30.421275+02:00 andromeda kernel:  1571.724348] usb 2-4: Manufacturer: ASMedia
2015-08-18T19:12:30.421277+02:00 andromeda kernel:  1571.724353] usb 2-4: SerialNumber: 00000000000000000000
2015-08-18T19:12:30.423204+02:00 andromeda kernel:  1571.725666] usb-storage 2-4:1.0: USB Mass Storage device detected
2015-08-18T19:12:30.424246+02:00 andromeda kernel:  1571.726830] scsi8 : usb-storage 2-4:1.0
2015-08-18T19:12:30.428013+02:00 andromeda mtp-probe: checking bus 2, device 3: "/sys/devices/pci0000:00/0000:00:13.2/usb2/2-4"
2015-08-18T19:12:30.429113+02:00 andromeda mtp-probe: bus: 2, device: 3 was not an MTP device
2015-08-18T19:12:31.427257+02:00 andromeda kernel:  1572.731823] scsi 8:0:0:0: Direct-Access     ASMT     2105             0    PQ: 0 ANSI: 6
2015-08-18T19:12:31.428264+02:00 andromeda kernel:  1572.732548] sd 8:0:0:0: Attached scsi generic sg2 type 0
2015-08-18T19:12:31.430298+02:00 andromeda kernel:  1572.734159] sd 8:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
2015-08-18T19:12:31.434241+02:00 andromeda kernel:  1572.738070] sd 8:0:0:0: [sdb] Write Protect is off
2015-08-18T19:12:31.434260+02:00 andromeda kernel:  1572.738077] sd 8:0:0:0: [sdb] Mode Sense: 43 00 00 00
2015-08-18T19:12:31.435216+02:00 andromeda kernel:  1572.739315] sd 8:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
2015-08-18T19:12:31.941278+02:00 andromeda kernel:  1573.246515]  sdb: sdb1
2015-08-18T19:12:31.947278+02:00 andromeda kernel:  1573.251875] sd 8:0:0:0: [sdb] Attached SCSI disk

But there is something very-very strange


andromeda:/home/fernando # mount /dev/sdb1 /mnt/backup
andromeda:/home/fernando # ls /mnt/backup
andromeda:/home/fernando # umount /mnt/backup
umount: /mnt/backup: not mounted
andromeda:/home/fernando # 


and in /var/log/messages appears


2015-08-18T19:15:43.689640+02:00 andromeda kernel:  1765.248868] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)


But if instead of mountting it in /mnt/backup I mount it in /mnt/usbstick, it works


andromeda:/home/fernando # ls /mnt -l
total 28
drwxr-xr-x 2 root     root  4096 ene 23  2012 backup
drwxr-xr-x 2 root     root  4096 ago 31  2014 backupantiguo
drwxr-xr-x 2 root     root  4096 oct  2  2012 isomount
drwxr-xr-x 2 root     root  4096 may  6  2012 peliculas
drwxr-xr-x 2 fernando users 4096 ago 17  2012 pendrive
drwxr-xr-x 2 root     root  4096 ago 10 18:27 toshiba
drwxr-xr-x 2 root     root  4096 oct  2  2012 usbstick
andromeda:/home/fernando # mount /dev/sdb1 /mnt/usbstick
andromeda:/home/fernando # ls /mnt/usbstick
antiguos           backup.comunes.sh~  backup.fernando.sh~  backup.maria.sh~  backup.todo.sh~          backup.vmware.sh   comunes     fernando    Mapas  vmware
backup.comunes.sh  backup.fernando.sh  backup.maria.sh      backup.todo.sh    backup.vmware.fecha.log  backup.vmware.sh~  documentos  lost+found  maria
andromeda:/home/fernando # umount /mnt/usbstick
andromeda:/home/fernando # 



why?

A pure guess here. I think you have exceeded the capability of your USB disk enclosure.

Here’s what I see with an internal 1T hard drive:


# fdisk -l /dev/sda


Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 0110ECE8-B04B-4D35-9B90-EE6575DACEFD


Device          Start        End   Sectors   Size Type
...

I omitted the partition details. It’s not quite comparable because it uses GPT partitioning instead of DOS partitioning. (I have one with DOS partitioning that I can check if you want, but it’s more trouble because I first have to mount in an external enclosure).

The difference that I want to point to, is that my disk has sector size of 4096 physical, 512 logical. As it happens, it is Western Digital.

As far as I know, all 1T disks use a physical sector size of 4K. Your output is showing a physical sector size of 512.

If you have a different external drive enclosure, try that and see what it says. Or see if you can mount the disk in a computer for long enough to run “fdisk” and check it.

It possible that WD did make disks with 512 physical sector size, so I could be mistaken. But I have not come across any of those. Even a 750G hard drive that I’m using has 4K physical sector size.

I’m not 100% sure but I think WD Advanced format uses 4K physical sector but it emulates sector as 512 in the controller, so for the OS the disk is a 512 sector one.
Anycase, I’ve been using it whit the same format and it has been working perfectly and the disk is almost full long since. Is an incremental backup disk in which I store backups at least once a month and keeps all the last backups. Disk size is 1TB and it is using over 800GB since near a year.

regards

Yes. And that’s what my “fdisk” output is showing. But yours is showing 512 physical sector size.

Either your disk is different from most, or the controller in your enclosure is not reading it correctly. I’m suspecting the latter, which would explain why you are not able to mount the disk when in the enclosure.

What I meant was that although the disk is 4K sector size, the computer and the OS (and in it’s case the usb case) will see it as 512 bytes sector… or at least it is what I understood reading here but I might understood it bad.

My drive is a WD Caviar Green 1TB, WD10EZRX.
The main drive in my computer is also a WD10EZRX, fdisk detects it as 512 byte sector and works fine, is this sda in the following code.


andromeda:/home/fernando # LANG=C fdisk -l

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 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
Disklabel type: dos
Disk identifier: 0x016eead2

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1              63  12594959  12594897     6G 82 Linux swap / Solaris
/dev/sda2        12594960 222323534 209728575   100G 83 Linux
/dev/sda3       222323535 746620874 524297340   250G 83 Linux
/dev/sda4  *    746620936 976771071 230150136 109.8G  5 Extended
/dev/sda5       746620938 747247409    626472 305.9M 83 Linux
/dev/sda6       747247616 976771071 229523456 109.5G 83 Linux

Disk /dev/sdb: 1.8 TiB, 2000398931968 bytes, 3907029164 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
Disklabel type: dos
Disk identifier: 0x197811b8

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdb1        2048 3907026943 3907024896  1.8T 83 Linux

andromeda:/home/fernando # 



sdb is a external usb drive toshiba canvio basic 2TB HDTB320EK3CA. I don’t know if it is a 4K sector or a 512 byte, but in both of them fdisk says 512 bytes physical and 512 bytes logical.

I have a second computer with a raid with two 1TB WD Caviar blue WD10EZEX, and in this case, fdisk says 4096 physical / 512 logical. I’m sure it is a 4K sector drive with advance format WD says ithere


aldebaran:/home/fernando # LANG=C fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x301cad44

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    33556479    16777216   82  Linux swap / Solaris
/dev/sda2   *    33556480   243271679   104857600   fd  Linux raid autodetect
/dev/sda3       243271680  1953525167   855126744   fd  Linux raid autodetect

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x301cad50

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048    33556479    16777216   82  Linux swap / Solaris
/dev/sdb2   *    33556480   243271679   104857600   fd  Linux raid autodetect
/dev/sdb3       243271680  1953525167   855126744   fd  Linux raid autodetect

Disk /dev/md0: 107.4 GB, 107374051328 bytes, 209714944 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/md1: 875.6 GB, 875649630208 bytes, 1710253184 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes


Disk /dev/mapper/lvmgroup-home: 875.6 GB, 875644846080 bytes, 1710243840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

So i guess both my WD Green are 512 bytes sector drive, so that is not the problem for the usb case.

On 2015-08-18 19:26, fperal wrote:

>
> But there is something very-very strange
>
> Code:
> --------------------
>
> andromeda:/home/fernando # mount /dev/sdb1 /mnt/backup
> andromeda:/home/fernando # ls /mnt/backup
> andromeda:/home/fernando # umount /mnt/backup
> umount: /mnt/backup: not mounted
> andromeda:/home/fernando #
>
>
> --------------------

Do you have an entry for it in fstab? And does it have the option
“nofail” in it? If it does, when the mount command fails to mount it,
nothing will be reported.

Mounting into another directory that does not match the fstab entry
would bypass it.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

On 2015-08-18 23:56, fperal wrote:

> So i guess both my WD Green are 512 bytes sector drive, so that is not
> the problem for the usb case.

External enclosures via USB often lie to the computer about the disks
they have connected. You can not trust it about the sector size. To find
out the real sector size you have to connect the disk directly to the
computer, on SATA.

It can even happen that the reported sector size is different when
connecting the same enclosure via USB or eSATA :-/


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

RIght. And in that case, I see:


 Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

But when I look at your opening post, I see:


Tamaño de sector (lógico/físico): 512 bytes / 512 bytes
Tamaño de E/S (mínimo/óptimo): 512 bytes / 512 bytes

Now maybe I’m not reading it correctly, because I am guessing the translation. But that “512” everywhere, where I would expect 512/4096 is what I am pointing to as a possible problem.

A google search for WD caviar green says that it is advanced format. As far as I know, that means 4K physical sector sizes. So I’m suspecting that your external disk enclosure is giving wrong information, which could cause the errors that you are seeing.

Maybe the USB enclosure is not designed to handle disks with 4K physical sectors.

yes I have, but it doe not have the nofail option

/dev/disk/by-uuid/6e15b0cc-c3ee-40d4-9340-4cdb2a75ee35  /mnt/backup     auto    noauto,defaults,users,exec

And it fails either if i use mount /mnt/backup or if I use mount /dev/sdb1 /mnt/backup, wich I think override options in fstab.

Mounting into another directory that does not match the fstab entry
would bypass it.

Yes but why the first manual mount does not work and the second do?


andromeda:/home/fernando # LANG=C fdisk -l /dev/sdb

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 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
Disklabel type: dos
Disk identifier: 0x6bd083b1

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953525167 1953523120 931.5G 83 Linux

andromeda:/home/fernando # mount /dev/sdb1 /mnt/backup
andromeda:/home/fernando # ls /mnt/backup
andromeda:/home/fernando # umount /mnt/backup
umount: /mnt/backup: not mounted
andromeda:/home/fernando # mount /dev/sdb1 /mnt/usbstick
andromeda:/home/fernando # ls /mnt/usbstick
Mapas     backup.comunes.sh   backup.fernando.sh   backup.maria.sh   backup.todo.sh   backup.vmware.fecha.log  backup.vmware.sh~  documentos  lost+found  vmware
antiguos  backup.comunes.sh~  backup.fernando.sh~  backup.maria.sh~  backup.todo.sh~  backup.vmware.sh         comunes            fernando    maria
andromeda:/home/fernando # umount /mnt/usbstick


yes, sorry, I’ve my user session in spanish and my root session in english, but I changed using su instead of su - and I dind’t noticed the logs weredisplayed in spanish.
Your guess is correct, using the case it reports 512 logical/512 physical.

A google search for WD caviar green says that it is advanced format. As far as I know, that means 4K physical sector sizes. So I’m suspecting that your external disk enclosure is giving wrong information, which could cause the errors that you are seeing.

Maybe the USB enclosure is not designed to handle disks with 4K physical sectors.

It seems so, I’ve attached the disc to a SATA in the motherboard and:


andromeda:/home/fernando # fdisk -l /dev/sdb

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x6bd083b1

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953525167 1953523120 931.5G 83 Linux
                                                                                                                                                                                   
andromeda:/home/fernando # mount /mnt/backup                                                                                                                                       
andromeda:/home/fernando # ls /mnt/backup                                                                                                                                          
Mapas     backup.comunes.sh   backup.fernando.sh   backup.maria.sh   backup.todo.sh   backup.vmware.fecha.log  backup.vmware.sh~  documentos  lost+found  vmware
antiguos  backup.comunes.sh~  backup.fernando.sh~  backup.maria.sh~  backup.todo.sh~  backup.vmware.sh         comunes            fernando    maria
andromeda:/home/fernando # umount /mnt/backup
andromeda:/home/fernando # 
 


Now it seems to work… there are two things I can’t understand:

  1. Why using the case if I mount the disk on a different mount point than /mnt/backup it mounts it well
  2. I bought the drive to make backups and I’ve been using it always in the case, I even formatted it in the case, and it has been working well since last week… why it stopped working?

regards

Even more estrange, now it works…

After trying the disk directly attached to a SATA in the motherboard, as I reported one hour ago I have tested it again in the usb case, this is the result


andromeda:/home/fernando # fdisk -l /dev/sdc

Disk /dev/sdc: 931.5 GiB, 1000204886016 bytes, 1953525168 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
Disklabel type: dos
Disk identifier: 0x6bd083b1

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdc1        2048 1953525167 1953523120 931.5G 83 Linux

andromeda:/home/fernando # mount /mnt/backup
andromeda:/home/fernando # ls /mnt/backup
Mapas     backup.comunes.sh   backup.fernando.sh   backup.maria.sh   backup.todo.sh   backup.vmware.fecha.log  backup.vmware.sh~  documentos  lost+found  vmware
antiguos  backup.comunes.sh~  backup.fernando.sh~  backup.maria.sh~  backup.todo.sh~  backup.vmware.sh         comunes            fernando    maria
andromeda:/home/fernando # umount /mnt/backup
andromeda:/home/fernando # 


It works mounting it in /mnt/backup through fstab.

The difference is that when attached directly to the SATA I get this


andromeda:/home/fernando # fdisk -l /dev/sdb

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x6bd083b1

Device     Boot Start        End    Sectors   Size Id Type
/dev/sdb1        2048 1953525167 1953523120 931.5G 83 Linux
                                                                                                                                                                                   
andromeda:/home/fernando # mount /mnt/backup                                                                                                                                       
andromeda:/home/fernando # ls /mnt/backup                                                                                                                                          
Mapas     backup.comunes.sh   backup.fernando.sh   backup.maria.sh   backup.todo.sh   backup.vmware.fecha.log  backup.vmware.sh~  documentos  lost+found  vmware
antiguos  backup.comunes.sh~  backup.fernando.sh~  backup.maria.sh~  backup.todo.sh~  backup.vmware.sh         comunes            fernando    maria
andromeda:/home/fernando # umount /mnt/backup
andromeda:/home/fernando #

then attached to the sata it is recognised as a 4K sector drive and attached to the usb case is recognised as a 512 bytes sector drive, but NOW it works both ways … amazing!!

On 2015-08-19 16:46, fperal wrote:

> Now it seems to work… there are two things I can’t understand:
>
> 1) Why using the case if I mount the disk on a different mount point
> than /mnt/backup it mounts it well

It has to be related to the options in the fstab line.

> 2) I bought the drive to make backups and I’ve been using it always in
> the case, I even formatted it in the case, and it has been working well
> since last week… why it stopped working?

I don’t know…

What filesystem does it have? I see “auto” in your fstab. I don’t think
it is ntfs, right?


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)

Just guessing here, but…

Most of my issues with external usb enclosures were due to power required x available. Not all usb ports are born equal, some can deliver more power than others, even if the spec is the same (usb2 requires 0.5A, for example, but usb3 can deliver more).

The same enclosure would work in one port but not in another (usually on a laptop). HDDs may have different power requirements too.

Different enclosure circuitry may demand different power levels, so the same HDD will work with one enclosure but not with another (in the same computer port).

If your enclosure accept an external power source, it’s easy to check.

It may also be that your enclosure circuitry or connection is faulty, and might work intermittently. If so you’ll see the same problem again.

One true thing in hardware - as in life - is that all things eventually break…

No, is an ext4.

I have always used it with external power source (i think it need external power to work)

It may also be that your enclosure circuitry or connection is faulty, and might work intermittently. If so you’ll see the same problem again.

One true thing in hardware - as in life - is that all things eventually break…

Maybe… i will try it with other hard drive to see. Maybe it is just a coincidence that the problems appeared just before a system upgrade and that they have only appeared when mounting in /mnt/backup

Well, that looks more like a permissions issue. But sometimes problems accumulate. It’s like Murphy’s Law :wink: