2

On a pretty large system with 1000+ hdd drives I have a problem where hdd drives are going to sleep | spinning down (if you find it more accurate).

The system is running on Ubuntu 22.04 LTS, as stated in title, but I think it is a more general question to linux.

In the server I have a mix of SATA and SAS drives, connected through HBA's and JBOD's - I don't think the capacity will matter here.

So how can I prevent these drives from spinning down?

Finding out how to do this per drive is obviously my goal, but maybe there is a global system wide solution?

I've already tried sudo hdparm -S 254 /dev/sdXX or with 0, but I'am getting errors in all these cases like this:

SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 01 cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

I would be more than glad, if anyone from the superuser community, could guide me towards the proper solution.

Bart
  • 287
  • 4
  • 13
  • A proper solution? Nah.. I don't have one of those; however, I have (in the past) written stupid "touch" services to touch the drive parameters every so often to keep them from spinning down for both Linux and Windows. I am interested to hear what the real solution is. – Señor CMasMas Sep 24 '22 at 22:52
  • @SeñorCMasMas for now I am thinking of using the same approach. BTW what command have you used? I mean did you tried to fetch|read some drive parameters or write new file using touch and deleted it afterwards repeatedly with some time interval? – Bart Sep 25 '22 at 18:56
  • In my "stupid but worked solution" .. I used 'c'. I think I simply opened and closed the drive with something like `if ((fd = open("/dev/hda", O_RDONLY | O_NONBLOCK)) < 0) { close(fd) };}` This is pseudo-code.. I think I did something like this but it has been a while. – Señor CMasMas Sep 26 '22 at 16:12

0 Answers0