Re: disable sleep mode hdd usb

2010-08-20 Thread Tabano

 Tabano wrote:
  I want disable the sleep mode in my external hdd usb forever when 
start Debian.




First, thanks to everybody.


Debian Sid. Updated from Squeeze.


hdparm -B 255 /dev/sda1

/dev/sda1:
 setting Advanced Power Management level to disabled
 HDIO_DRIVE_CMD failed: Invalid exchange
 HDIO_DRIVE_CMD(identify) failed: Invalid exchange


blkid

/dev/hda1: UUID=8f2c7eb6-aa65-457f-868e-60f840f28029 TYPE=ext4
/dev/hda5: UUID=8dff1df8-c18c-4d37-950f-d81170525785 TYPE=swap
/dev/sda1: UUID=44FCB251FCB23D4C TYPE=ntfs


hdparm -B 255 /dev/disk/by-uuid/44FCB251FCB23D4C

/dev/disk/by-uuid/44FCB251FCB23D4C:
 setting Advanced Power Management level to disabled
 HDIO_DRIVE_CMD failed: Invalid exchange
 HDIO_DRIVE_CMD(identify) failed: Invalid exchange


Impossible ??

In Windows, the sofware xspeed is the solution (eternally read/write in 
hdd).



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4c6e2367.2000...@iberia.jazztel.es



Re: disable sleep mode hdd usb

2010-08-20 Thread Camaleón
On Fri, 20 Aug 2010 08:40:39 +0200, Tabano wrote:

 Tabano wrote:
I want disable the sleep mode in my external hdd usb forever when
 start Debian.
  
  
  
 First, thanks to everybody.
 
 
 Debian Sid. Updated from Squeeze.
 
 
 hdparm -B 255 /dev/sda1
 
 /dev/sda1:
   setting Advanced Power Management level to disabled HDIO_DRIVE_CMD
   failed: Invalid exchange HDIO_DRIVE_CMD(identify) failed: Invalid
   exchange

Maybe the USB enclousure disallows this information to be passed to the 
disk. You can attach the drive directly to a sata/ide host controller and 
issue the hdparm command from there. Then, put the disk back into the 
USB case.

 Impossible ??

May I ask why you need to get this done? What problem are you 
experiencing with sleep mode? I'm just curious :-?

 In Windows, the sofware xspeed is the solution (eternally read/write in
 hdd).

Continously performing random/untargeted operations on the drive may 
gratuitously short the hard disk live :-/

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2010.08.20.07.44...@gmail.com



Re: disable sleep mode hdd usb

2010-08-17 Thread Camaleón
On Tue, 17 Aug 2010 11:26:30 +0200, Tabano wrote:

 I want disable the sleep mode in my external hdd usb forever when start
 Debian.

hdparm/sdparm may help. 

But some manufacturers disallow this management on the user side.

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2010.08.17.11.42...@gmail.com



Re: disable sleep mode hdd usb

2010-08-17 Thread Camaleón
El 2010-08-17 a las 17:24 +0200, Markus escribió:

(resending to the list. It reached just by inbox and the suggested 
step can be useful for the OP).

 Camaleón wrote:
 On Tue, 17 Aug 2010 11:26:30 +0200, Tabano wrote:

 I want disable the sleep mode in my external hdd usb forever when start
 Debian.

 hdparm/sdparm may help. 

 But some manufacturers disallow this management on the user side.

 Greetings,

 Put this line:

 hdparm -B 255 /dev/sdX

 in your /etc/rc.local file where X is the corresponding letter for your  
 usb hdd.
 For getting this to work, your usb hdd has to be pluged in the usb-port  
 during boot up.
 And you have to ensure that it always has the same X.

Greetings,

-- 
Camaleón 


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100817153013.ga9...@stt008.linux.site



Re: disable sleep mode hdd usb

2010-08-17 Thread Markus

Camaleón wrote:

On Tue, 17 Aug 2010 11:26:30 +0200, Tabano wrote:


I want disable the sleep mode in my external hdd usb forever when start
Debian.


hdparm/sdparm may help. 


But some manufacturers disallow this management on the user side.

Greetings,


Put this line:

hdparm -B 255 /dev/sdX

in your /etc/rc.local file where X is the corresponding letter for your 
usb hdd.
For getting this to work, your usb hdd has to be pluged in the usb-port 
during boot up.

And you have to ensure that it always has the same X.


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4c6ac403.3030...@gmx.de



Re: disable sleep mode hdd usb

2010-08-17 Thread Greg Madden
On Tuesday 17 August 2010 09:16:51 Markus wrote:
 Camaleón wrote:
  On Tue, 17 Aug 2010 11:26:30 +0200, Tabano wrote:
  I want disable the sleep mode in my external hdd usb forever when start
  Debian.
 
  hdparm/sdparm may help.
 
  But some manufacturers disallow this management on the user side.
 
  Greetings,

 Put this line:

 hdparm -B 255 /dev/sdX

 in your /etc/rc.local file where X is the corresponding letter for your
 usb hdd.
 For getting this to work, your usb hdd has to be pluged in the usb-port
 during boot up.
 And you have to ensure that it always has the same X.

Does hdparm understand uuid's ?  

The original poster doesn't mention the verson of Debian, Squeeze uses uuid's, 
and if you are using external usb devices, uuid's are a great  way to make 
sure the same file system gets mounted  appropriately each time.

-- 
Peace,

Greg


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201008171026.26194.gomadtr...@gci.net



Re: disable sleep mode hdd usb

2010-08-17 Thread Sven Joachim
On 2010-08-17 20:26 +0200, Greg Madden wrote:

 On Tuesday 17 August 2010 09:16:51 Markus wrote:
 Camaleón wrote:
  On Tue, 17 Aug 2010 11:26:30 +0200, Tabano wrote:
  I want disable the sleep mode in my external hdd usb forever when start
  Debian.
 
  hdparm/sdparm may help.
 
  But some manufacturers disallow this management on the user side.
 
  Greetings,

 Put this line:

 hdparm -B 255 /dev/sdX

 in your /etc/rc.local file where X is the corresponding letter for your
 usb hdd.
 For getting this to work, your usb hdd has to be pluged in the usb-port
 during boot up.
 And you have to ensure that it always has the same X.

 Does hdparm understand uuid's ?  

Probably not, but this could easily be worked around by using a symlink
in /dev/disk/by-uuid.  The only problem is that there may not be one for
sdX; at least I don't have a symlink to /dev/sda in /dev/disk/by-uuid, ,
only symlinks to /dev/sdaX, i.e. the partitions.

 The original poster doesn't mention the verson of Debian, Squeeze uses 
 uuid's, 
 and if you are using external usb devices, uuid's are a great  way to make 
 sure the same file system gets mounted  appropriately each time.

Maybe the disk name in /dev/disk/by-id could be used instead, there are
symlinks to /dev/sda on my system.

Sven


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87k4npoyvb@turtle.gmx.de



Re: disable sleep mode hdd usb

2010-08-17 Thread Greg Madden
On Tuesday 17 August 2010 10:52:40 Sven Joachim wrote:
 On 2010-08-17 20:26 +0200, Greg Madden wrote:
  On Tuesday 17 August 2010 09:16:51 Markus wrote:
  Camaleón wrote:
   On Tue, 17 Aug 2010 11:26:30 +0200, Tabano wrote:
   I want disable the sleep mode in my external hdd usb forever when
   start Debian.
  
   hdparm/sdparm may help.
  
   But some manufacturers disallow this management on the user side.
  
   Greetings,
 
  Put this line:
 
  hdparm -B 255 /dev/sdX
 
  in your /etc/rc.local file where X is the corresponding letter for your
  usb hdd.
  For getting this to work, your usb hdd has to be pluged in the usb-port
  during boot up.
  And you have to ensure that it always has the same X.
 
  Does hdparm understand uuid's ?

 Probably not, but this could easily be worked around by using a symlink
 in /dev/disk/by-uuid.  The only problem is that there may not be one for
 sdX; at least I don't have a symlink to /dev/sda in /dev/disk/by-uuid, ,
 only symlinks to /dev/sdaX, i.e. the partitions.

  The original poster doesn't mention the verson of Debian, Squeeze uses
  uuid's, and if you are using external usb devices, uuid's are a great 
  way to make sure the same file system gets mounted  appropriately each
  time.

 Maybe the disk name in /dev/disk/by-id could be used instead, there are
 symlinks to /dev/sda on my system.

 Sven

Well my mistake, hdparm deals with hard drives and uuid's are for file 
systems/partitions.  i haven't had much luck with usb/sata device naming 
remaining the same without uuid's though. Seems like anything using sdX could 
fail at some point.
-- 
Peace,

Greg


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/201008171110.18118.gomadtr...@gci.net



Re: disable sleep mode hdd usb

2010-08-17 Thread Brad Sawatzky
On Tue, 17 Aug 2010, Greg Madden wrote:

   The original poster doesn't mention the verson of Debian, Squeeze uses
   uuid's, and if you are using external usb devices, uuid's are a great 
   way to make sure the same file system gets mounted  appropriately each
   time.
 
  Maybe the disk name in /dev/disk/by-id could be used instead, there are
  symlinks to /dev/sda on my system.
 
 Well my mistake, hdparm deals with hard drives and uuid's are for file 
 systems/partitions.  i haven't had much luck with usb/sata device naming 
 remaining the same without uuid's though. Seems like anything using sdX could 
 fail at some point.

/dev/disk/by-id/has entries mapping to the drive as well as partitions:

1021% ls -l /dev/disk/by-id/ata-ST3750330AS_9QK0X03V*
lrwxrwxrwx 1 root root  9 2010-08-16 10:44 
/dev/disk/by-id/ata-ST3750330AS_9QK0X03V - ../../sdb
lrwxrwxrwx 1 root root 10 2010-08-16 10:44 
/dev/disk/by-id/ata-ST3750330AS_9QK0X03V-part1 - ../../sdb1

So you should be able to point hdparm at a udev-managed symlink.

-- Brad


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100817192705.ga14...@aether.jlab.org



Re: disable sleep mode hdd usb

2010-08-17 Thread Markus

Greg Madden wrote:

On Tuesday 17 August 2010 09:16:51 Markus wrote:

Camaleón wrote:

On Tue, 17 Aug 2010 11:26:30 +0200, Tabano wrote:

I want disable the sleep mode in my external hdd usb forever when start
Debian.

hdparm/sdparm may help.

But some manufacturers disallow this management on the user side.

Greetings,

Put this line:

hdparm -B 255 /dev/sdX

in your /etc/rc.local file where X is the corresponding letter for your
usb hdd.
For getting this to work, your usb hdd has to be pluged in the usb-port
during boot up.
And you have to ensure that it always has the same X.


Does hdparm understand uuid's ?  

The original poster doesn't mention the verson of Debian, Squeeze uses uuid's, 
and if you are using external usb devices, uuid's are a great  way to make 
sure the same file system gets mounted  appropriately each time.



Yes hdparm works with uuid's. Here is an example from my ubuntu system.
I suppose it's the same for a Debian system ;-)

sudo blkid

gives my a summary of the pluged hdd's:

/dev/sda1: UUID=2C6CA0626CA02912 TYPE=ntfs
/dev/sda2: UUID=D6EC99F0EC99CB5F LABEL=PageFile TYPE=ntfs
/dev/sda3: UUID=7fd6681a-b5af-4972-8fb7-827bd9ab45a6 TYPE=ext3
/dev/sda5: UUID=3d77d85b-9d39-4f02-852b-1eb5669e6fda TYPE=ext3
/dev/sda6: UUID=6cdb6b0e-14c7-4014-8588-a16228152909 TYPE=swap
/dev/sdb1: UUID=f331af38-d8b0-473d-92b1-9ada96e1dfb9 TYPE=ext3

Let's say /dev/sdb is my usb-hdd. Then the hdparm command would look 
like this:


sudo hdparm -B 255 -S 243 
/dev/disk/by-uuid/f331af38-d8b0-473d-92b1-9ada96e1dfb9


As the result you should get something like:

/dev/disk/by-uuid/f331af38-d8b0-473d-92b1-9ada96e1dfb9:
 setting Advanced Power Management level to disabled
 HDIO_DRIVE_CMD failed: Invalid exchange
 setting standby to 243 (1 hours + 30 minutes)
 APM_level  = off

By the wayYou dont need the -S parameter. It's just for setting 
the standby time.



--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org

Archive: http://lists.debian.org/4c6ae96e.6060...@gmx.de



RE: disable sleep mode hdd usb

2010-08-17 Thread James Zuelow
Original Message
From: p...@gci.net [mailto:p...@gci.net] On Behalf Of Greg Madden
Sent: Tuesday, August 17, 2010 11:10 AM
To: debian-user@lists.debian.org
Subject: Re: disable sleep mode hdd usb


 
 Maybe the disk name in /dev/disk/by-id could be used instead, there
 are symlinks to /dev/sda on my system.
 
 Sven
 
 Well my mistake, hdparm deals with hard drives and uuid's are for file
 systems/partitions.  i haven't had much luck with usb/sata device
 naming remaining the same without uuid's though. Seems like anything
 using sdX could fail at some point.
 --
 Peace,
 
 Greg

I believe a quick udev rule would solve this issue.  Just set up a persistent 
udev rule to alias the USB device (by serial number?) to /dev/sdX.

James Z

--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/4a09477d575c2c4b86497161427dd94c15b0d1f...@city-exchange07