From: Marc Joliet <marcec@gmx.de>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] External HDD: sector size incorrectly detected on first connect
Date: Fri, 6 Mar 2015 20:44:28 +0100 [thread overview]
Message-ID: <20150306204428.4432f883@marcec.fritz.box> (raw)
[-- Attachment #1: Type: text/plain, Size: 4688 bytes --]
Hi again
This has been frustrating me ever since I bought the drive, but I have pushed
off looking into it for a while. Part of the reason is that my desktop used to
run pretty much 24/7 before I moved, so I rarely had to deal with this issue.
However, now I'm more interested in not pointlessly wasting electricity and as
such, encounter this issue at least once a day. Since my automatic backups run
automatically if they were scheduled to run while the computer was off, this is
becoming more and more annoying.
What happens is that when I (cold) boot my desktop, my external Toshiba 3TB
drive (which is always connected via USB3) is detected, but cannot mount. It
*does* work once I unplug the USB3 plug and plug it back in.
After finally getting around to debugging the issue, looking at the kernel log
very quickly showed me what was happening:
# journalctl -k -b -1 | grep "sdg"
Mär 06 16:55:34 marcec kernel: sd 8:0:0:0: [sdg] Very big device. Trying to use READ CAPACITY(16).
Mär 06 16:55:34 marcec kernel: sd 8:0:0:0: [sdg] 5860533160 512-byte logical blocks: (3.00 TB/2.72 TiB)
Mär 06 16:55:34 marcec kernel: sd 8:0:0:0: [sdg] Write Protect is off
Mär 06 16:55:34 marcec kernel: sd 8:0:0:0: [sdg] Mode Sense: 2b 00 00 00
Mär 06 16:55:34 marcec kernel: sd 8:0:0:0: [sdg] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Mär 06 16:55:34 marcec kernel: sd 8:0:0:0: [sdg] Very big device. Trying to use READ CAPACITY(16).
Mär 06 16:55:20 marcec kernel: sdg: sdg1 sdg2
Mär 06 16:55:20 marcec kernel: sd 8:0:0:0: [sdg] Very big device. Trying to use READ CAPACITY(16).
Mär 06 16:55:20 marcec kernel: sd 8:0:0:0: [sdg] Attached SCSI disk
Mär 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] Very big device. Trying to use READ CAPACITY(16).
Mär 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] 732566645 4096-byte logical blocks: (3.00 TB/2.72 TiB)
Mär 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] Write Protect is off
Mär 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] Mode Sense: 2b 00 00 00
Mär 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Mär 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] 732566645 4096-byte logical blocks: (3.00 TB/2.72 TiB)
Mär 06 16:57:08 marcec kernel: sdg: sdg1 sdg2
Mär 06 16:57:08 marcec kernel: sdg: p1 size 10476524864 extends beyond EOD, enabling native capacity
Mär 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] 732566645 4096-byte logical blocks: (3.00 TB/2.72 TiB)
Mär 06 16:57:08 marcec kernel: sdg: sdg1 sdg2
Mär 06 16:57:08 marcec kernel: sdg: p1 size 10476524864 extends beyond EOD, truncated
Mär 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] 732566645 4096-byte logical blocks: (3.00 TB/2.72 TiB)
Mär 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] Attached SCSI disk
Mär 06 16:57:10 marcec kernel: BTRFS: device label MARCEC_BACKUP devid 1 transid 64138 /dev/sdg2
Mär 06 16:57:10 marcec kernel: BTRFS info (device sdg2): disk space caching is enabled
Mär 06 16:57:17 marcec kernel: EXT4-fs (sdg1): mounted filesystem with ordered data mode. Opts: (null)
(I rebooted in the meantime, and the drive is always detected correctly then,
hence the "-b -1" argument to journalctl.)
As you can see, the kernel initially thinks that it has 512-byte logical
blocks. After unplugging the USB3 cable and plugging it back in it is
detected as having 4096-byte logical blocks. From then on it works fine.
The interesting question now is: *why* does this happen? According to [0] and
[1], the problem is that the enclosure firmware is doing some silly block size
translation in order to support MBR partitions, which apparently is done in a
buggy fashion to boot. Sadly, they provide no solution.
(I also can't help but wonder if that also helps explain the "p1 size
10476524864 extends beyond EOD, truncated" messages. Note that the
partitioning was done with gparted, but IIRC even editing it with cfdisk
couldn't get rid of it.)
I have not been able to find a way to fix this issue. The "manual" that comes
with the drive is devoid of relevant information, and so far google comes up
with several related posts, each without a solution.
So, does anybody know of a way to get the drive to work more reliably? Or will
I have to resort to a different enclosure (when I can afford it)?
[0] http://askubuntu.com/questions/337017/cant-read-partition-table-of-3tb-usb-disk
[1] http://ubuntuforums.org/showthread.php?t=1536933
Greetings,
--
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup
[-- Attachment #2: Digitale Signatur von OpenPGP --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next reply other threads:[~2015-03-06 19:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-06 19:44 Marc Joliet [this message]
2015-03-07 2:33 ` [gentoo-user] Re: External HDD: sector size incorrectly detected on first connect walt
2015-03-07 10:24 ` Marc Joliet
2015-03-10 9:45 ` Marc Joliet
2015-03-10 16:58 ` Hans
2015-03-10 17:15 ` Marc Joliet
2015-03-10 17:12 ` Marc Joliet
2015-03-11 0:38 ` walt
2015-03-11 0:53 ` Dutch Ingraham
2015-03-11 7:04 ` Marc Joliet
2015-03-22 13:28 ` Marc Joliet
2015-04-01 19:04 ` Marc Joliet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150306204428.4432f883@marcec.fritz.box \
--to=marcec@gmx.de \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox