Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-09-05 Thread Alan Stern
On Wed, 3 Sep 2014, James Bottomley wrote: On Wed, 2014-09-03 at 16:30 -0400, Alan Stern wrote: On Wed, 3 Sep 2014, James Bottomley wrote: Before we embark on elaborate hacks, why don't we just make the capacity writeable (by root) in sysfs from userspace (will require block change)?

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-09-04 Thread Dale R. Worley
From: James Bottomley james.bottom...@hansenpartnership.com Before we embark on elaborate hacks, why don't we just make the capacity writeable (by root) in sysfs from userspace (will require block change)? We can then encode all the nasty heuristics (including gpt reading) in userspace as a

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-09-03 Thread Dale R. Worley
From: Alan Stern st...@rowland.harvard.edu On Fri, 29 Aug 2014, Matthew Dharm wrote: Is there an 'easy' way to override the detected size of a storage device from userspace? If we had that, someone could write a helper application which looked for this particular fubar and try to Do The

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-09-03 Thread Alan Stern
On Wed, 3 Sep 2014, Dale R. Worley wrote: From: Alan Stern st...@rowland.harvard.edu On Fri, 29 Aug 2014, Matthew Dharm wrote: Is there an 'easy' way to override the detected size of a storage device from userspace? If we had that, someone could write a helper application which

RES: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-09-03 Thread Alfredo Dal Ava Junior
On Sat, 30 Aug 2014, Matthew Dharm wrote I was thinking of something that could notice a USB device which is formatted NTFS and has a partition table and filesystem that indicates a much bigger capacity than what the drive reports. Under this circumstances, you could do something like

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-09-03 Thread Dale R. Worley
From: Alan Stern st...@rowland.harvard.edu Anyway, I can try writing a patch to add this capability. We'll see if it can solve your problem. Unfortunately, I think there is genuine value in such a hack. E.g., I've got two USB-to-SATA adapters. One works correctly. One does not. But at

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-09-03 Thread James Bottomley
On Wed, 2014-09-03 at 15:05 -0400, Alan Stern wrote: On Wed, 3 Sep 2014, Dale R. Worley wrote: From: Alan Stern st...@rowland.harvard.edu On Fri, 29 Aug 2014, Matthew Dharm wrote: Is there an 'easy' way to override the detected size of a storage device from userspace? If we

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-09-03 Thread Alan Stern
On Wed, 3 Sep 2014, James Bottomley wrote: Before we embark on elaborate hacks, why don't we just make the capacity writeable (by root) in sysfs from userspace (will require block change)? We can then encode all the nasty heuristics (including gpt reading) in userspace as a udev rule. That's

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-09-03 Thread James Bottomley
On Wed, 2014-09-03 at 16:30 -0400, Alan Stern wrote: On Wed, 3 Sep 2014, James Bottomley wrote: Before we embark on elaborate hacks, why don't we just make the capacity writeable (by root) in sysfs from userspace (will require block change)? We can then encode all the nasty heuristics

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-08-31 Thread Alan Stern
On Sat, 30 Aug 2014, Douglas Gilbert wrote: On 14-08-30 05:15 PM, Alan Stern wrote: On Fri, 29 Aug 2014, Matthew Dharm wrote: Is there an 'easy' way to override the detected size of a storage device from userspace? If we had that, someone could write a helper application which looked

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-08-30 Thread Alan Stern
On Fri, 29 Aug 2014, Matthew Dharm wrote: Is there an 'easy' way to override the detected size of a storage device from userspace? If we had that, someone could write a helper application which looked for this particular fubar and try to Do The Right Thing(tm), or at least offer the user

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-08-30 Thread Douglas Gilbert
On 14-08-30 05:15 PM, Alan Stern wrote: On Fri, 29 Aug 2014, Matthew Dharm wrote: Is there an 'easy' way to override the detected size of a storage device from userspace? If we had that, someone could write a helper application which looked for this particular fubar and try to Do The Right

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-08-30 Thread Matthew Dharm
On Sat, Aug 30, 2014 at 2:15 PM, Alan Stern st...@rowland.harvard.edu wrote: On Fri, 29 Aug 2014, Matthew Dharm wrote: Is there an 'easy' way to override the detected size of a storage device from userspace? If we had that, someone could write a helper application which looked for this

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-08-29 Thread Dale R. Worley
From: Alan Stern st...@rowland.harvard.edu If you try to repartition the drive under Windows using the deficient adapter, you'll see that the problem still exists. It just doesn't show up during normal use. So in summary, the Windows workaround is icky, but it allows any use but

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-08-29 Thread Matthew Dharm
Is there an 'easy' way to override the detected size of a storage device from userspace? If we had that, someone could write a helper application which looked for this particular fubar and try to Do The Right Thing(tm), or at least offer the user some options. Matt On Fri, Aug 29, 2014 at 2:07

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-08-27 Thread Dale R. Worley
From: James Bottomley james.bottom...@hansenpartnership.com Did you try read capacity 16 on it? What happened? (the AS2105 rejects read capacity 16, so there's no reliable way to deduce the capacity of drives over 2TB). OK, I had to track down which package contains sg_readcap. The

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-08-27 Thread Dale R. Worley
What I find interesting is that Windows (at least, Windows 7 Professional) seems to be able to handle the deficient adapter. What I'd like to do is log the disk commands during the mounting sequence, preferably at both the SCSI and USB layers. Then at least we'll know exactly what the driver is

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-08-27 Thread James Bottomley
On Wed, 2014-08-27 at 15:21 -0400, Dale R. Worley wrote: From: James Bottomley james.bottom...@hansenpartnership.com Did you try read capacity 16 on it? What happened? (the AS2105 rejects read capacity 16, so there's no reliable way to deduce the capacity of drives over 2TB). OK, I

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-08-27 Thread Alan Stern
On Wed, 27 Aug 2014, Dale R. Worley wrote: What I find interesting is that Windows (at least, Windows 7 Professional) seems to be able to handle the deficient adapter. So does Linux. The difference is that Windows believes the values in the partition table in preference to what the hardware

Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-08-26 Thread Dale R. Worley
This is almost certainly a form of the problem reported in AS2105-based enclosure size issues with 2TB HDDs. I'm repeating my original message here so linux-usb can see it, and so it can be connected to the older thread. I'll address it in another message. I've appended James Bottomley's

Re: Problem with USB-to-SATA adapters (was: AS2105-based enclosure size issues with 2TB HDDs)

2014-08-26 Thread James Bottomley
On Tue, 2014-08-26 at 15:39 -0400, Dale R. Worley wrote: This is almost certainly a form of the problem reported in AS2105-based enclosure size issues with 2TB HDDs. I'm repeating my original message here so linux-usb can see it, and so it can be connected to the older thread. I'll address