Re: What is the modern recommendation for sata to usb drive disconnect ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you . 

On Sunday, 16 December 2018 15:28:08 IST Greg KH wrote:
> On Sun, Dec 16, 2018 at 01:09:48PM +0200, borissh1983@xxxxxxxxx wrote:
> > Hi,
> > 
> > I got to a slight confusion about what is the correct way to safely
> > disconnect hdd sata over usb  adapter with external power unit from
> > laptop running Linux (4.18).
> > 
> > my current action list was :
> > 
> > 1. unmount everything
> 
> That's all you need to do.
> 
> You can also issue a "power off" command to the drive now if you want to
> shut off the power to it (and the drive/controller actually support it).

Not knowing if said drive does or does not support it (hdparam -Y ) made me 
go to the safest next choice. (sleep) man file says don't do it if you don't 
know what you are doing (and I'm not).

> I know gnome-disks has that option and I use it all the time with my
> external sata USB controller.
> 
> > 2. sync
> 
> You could do that before unmount, but unmount will also do that for you.
> No need to do this afterward.
> 

Thanks.

> > 3. hdpram -S 30  /dev/sdX (I'm not sure if does anything honestly because
> > device is connected over a sata to usb interface)
> 
> What does this do?  Why "sleep" the drive?
> 

sleep have more chances to be implemented.

> > 4. Wait for ~20 minutes
> 
> Huh?  Why 20 minutes?
> 

 just to play safe.

> Just unmount and then power off the device, that should be sufficient.
> 
> good luck!
> 
> greg k-h

When I asked this morning , I had one dead drive, this afternoon I got another 
that looks like a dead one (kernel does not enumerate it or even show a 
connection ) .

I do not see any problem with pata (2.5") over usb (worked with two drives 
that did not fail yet).

The  drive that  failed , had been the  ones with sata connection but not with 
an IDE connection. 

When connected over PATA it is identified as 

Bus 001 Device 029: ID 152d:2338 JMicron Technology Corp. / JMicron USA 
Technology Corp. JM20337 Hi-Speed USB to SATA & PATA Combo Bridge
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x152d JMicron Technology Corp. / JMicron USA Technology 
Corp.
  idProduct          0x2338 JM20337 Hi-Speed USB to SATA & PATA Combo Bridge
  bcdDevice            1.00
  iManufacturer           1 JMicron
  iProduct                2 USB to ATA/ATAPI bridge
  iSerial                 5 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 USB Mass Storage
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              6 MSC Bulk-Only Transfer
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0

Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

for a PATA connection : 

usb 1-1: new hih-speed USB device number 29 using xhci_hcd
usb 1-1: New USB device found, idVendor=152d, idProduct=2338, bcdDevice= 1.00
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
usb 1-1: Product: USB to ATA/ATAPI bridge
usb 1-1: Manufacturer: JMicron

Sold under the brand name Gold-Touch sata to usb.

Either I had two faulty sata  hard drives within one week ,two bad adaptors or 
some nasty luck.


Thanks.






[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux