From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 092D1138CA3 for ; Fri, 6 Mar 2015 19:44:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5390EE0931; Fri, 6 Mar 2015 19:44:43 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1057DE08D0 for ; Fri, 6 Mar 2015 19:44:42 +0000 (UTC) Received: from marcec.fritz.box ([93.181.44.4]) by mail.gmx.com (mrgmx102) with ESMTPSA (Nemesis) id 0MIPhr-1YSbWp2KeV-0048hy for ; Fri, 06 Mar 2015 20:44:40 +0100 Date: Fri, 6 Mar 2015 20:44:28 +0100 From: Marc Joliet To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] External HDD: sector size incorrectly detected on first connect Message-ID: <20150306204428.4432f883@marcec.fritz.box> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; boundary="Sig_/dQRuU4eayeuBIpjKihv6nYK"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:NydXV+tEh9fQL0tU/5LxSZfA0Z44eTwJNpVwjA87+Vg6xXaZmgC o4fP7NdOCHULBzjLZPuz2HnsRtI4SkbNfIa9XX/S4WcQTfNJ/SgOiaBPnW+iwHG9o/zgvYC FGKuELglzg8EkuNs1rRLYBqwgHDbYpjSA1+PYdoRHOEvqWsXE3zwHlKK0ZdDNmLSj+uxDoP nK+N7fCB10+JRnXK0U+Gw== X-UI-Out-Filterresults: notjunk:1; X-Archives-Salt: bdcf6e85-dec9-45bd-a2a5-315362d0f658 X-Archives-Hash: 5677e2044aba73c5ac046a2a634f801a --Sig_/dQRuU4eayeuBIpjKihv6nYK Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi again This has been frustrating me ever since I bought the drive, but I have push= ed off looking into it for a while. Part of the reason is that my desktop use= d to run pretty much 24/7 before I moved, so I rarely had to deal with this issu= e. 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, thi= s 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=C3=A4r 06 16:55:34 marcec kernel: sd 8:0:0:0: [sdg] Very big device. Tryi= ng to use READ CAPACITY(16). M=C3=A4r 06 16:55:34 marcec kernel: sd 8:0:0:0: [sdg] 5860533160 512-byte l= ogical blocks: (3.00 TB/2.72 TiB) M=C3=A4r 06 16:55:34 marcec kernel: sd 8:0:0:0: [sdg] Write Protect is off M=C3=A4r 06 16:55:34 marcec kernel: sd 8:0:0:0: [sdg] Mode Sense: 2b 00 00 = 00 M=C3=A4r 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=C3=A4r 06 16:55:34 marcec kernel: sd 8:0:0:0: [sdg] Very big device. Tryi= ng to use READ CAPACITY(16). M=C3=A4r 06 16:55:20 marcec kernel: sdg: sdg1 sdg2 M=C3=A4r 06 16:55:20 marcec kernel: sd 8:0:0:0: [sdg] Very big device. Tryi= ng to use READ CAPACITY(16). M=C3=A4r 06 16:55:20 marcec kernel: sd 8:0:0:0: [sdg] Attached SCSI disk M=C3=A4r 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] Very big device. Tryi= ng to use READ CAPACITY(16). M=C3=A4r 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] 732566645 4096-byte l= ogical blocks: (3.00 TB/2.72 TiB) M=C3=A4r 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] Write Protect is off M=C3=A4r 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] Mode Sense: 2b 00 00 = 00 M=C3=A4r 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=C3=A4r 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] 732566645 4096-byte l= ogical blocks: (3.00 TB/2.72 TiB) M=C3=A4r 06 16:57:08 marcec kernel: sdg: sdg1 sdg2 M=C3=A4r 06 16:57:08 marcec kernel: sdg: p1 size 10476524864 extends beyond= EOD, enabling native capacity M=C3=A4r 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] 732566645 4096-byte l= ogical blocks: (3.00 TB/2.72 TiB) M=C3=A4r 06 16:57:08 marcec kernel: sdg: sdg1 sdg2 M=C3=A4r 06 16:57:08 marcec kernel: sdg: p1 size 10476524864 extends beyond= EOD, truncated M=C3=A4r 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] 732566645 4096-byte l= ogical blocks: (3.00 TB/2.72 TiB) M=C3=A4r 06 16:57:08 marcec kernel: sd 9:0:0:0: [sdg] Attached SCSI disk M=C3=A4r 06 16:57:10 marcec kernel: BTRFS: device label MARCEC_BACKUP devid= 1 transid 64138 /dev/sdg2 M=C3=A4r 06 16:57:10 marcec kernel: BTRFS info (device sdg2): disk space ca= ching is enabled M=C3=A4r 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 the= n, 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 s= ize 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 co= mes 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=3D1536933 Greetings, --=20 Marc Joliet -- "People who think they know everything really annoy those of us who know we don't" - Bjarne Stroustrup --Sig_/dQRuU4eayeuBIpjKihv6nYK Content-Type: application/pgp-signature Content-Description: Digitale Signatur von OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJU+gOlAAoJEL/Q5oYsiHj0PbQP/icmq61UQamVxGhXJTQj2cLs Sy7lbLtX9mS73c5ckQUsMSuLYt62xNU3kj3iH5ZVrK43MO/uxKGA2vwAgnS0xEJI JBr1PGdy7KegKYIWTJiQiBEQAdBlRF61nI6bRM+mZN42SFUV12pBILAJBoi20GgX y/mPAA2Sin/TfvKVy/6y2FA4yMONZtBawNpZN6HcZztyWSx4omPfDQW6DQsNUHvT qhG4Yzn8wkex9cjP2q4qXGJzP1cVZdI0oweWrmBwpjK73Knte1+LoonKx3JuDU4k jZJaafDcQiYJQ6PGSl5GBvpKY5MninSItK3SWhSCB/ItyiLu6f1ISbXtM/kYJ3jN 1F2XDTNvfxnJ8yl0dM2ZQliQSl65BrcTEwvnu6seVS5rIkrSUAWqbJoEKjrDxYUB SYxYBc+p2dDMFmD/v+OykvFhtrYTFNnFs7Lw2qemBIzddbG4Gxsa/XCLPPFGcRuH ZUXyLJMB6NJegZljQomiCc4vWVvoKEdzCDG07EGl+EcyqTVAHt7qzWUmucVOksbU TogYoBHv7DAWlV+sCW4ScsQzidiITrlznaShu7hf7k/KrMtJZTBy9u4t9Mjwpghx OfvMEk0/INJF/WbEOIuYeiZ8zUc0lPl1C3P3IIY43GqiTzl4XvSzONm/3viJscMC N0t96V47fRvUSkR18hQX =3Iv/ -----END PGP SIGNATURE----- --Sig_/dQRuU4eayeuBIpjKihv6nYK--