Mdadm RAID 1 power save

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
dennnic
Level 1
Level 1
Posts: 10
Joined: Mon Aug 21, 2017 4:57 pm
Location: Belgrade, Serbia

Mdadm RAID 1 power save

Post by dennnic » Fri Apr 20, 2018 10:14 am

Hello,

Found a very informative guide on how to set up and auto-mount a raid1 volume, based on 2 hdd, of course.
It seems to be working fine, someone on "pcsteps" wrote a very foolproof article, I'd like to thank him for it, if he ever reads this thread.

However, if mounted, the drives are active all the time. There is no power save option, or spin down, or anything similar, none that I can find, at least. When I manually unmount the volume using disks (gnome disk utility?), the two drives do shut down eventually, after predetermined time. Unfortunately, volume then needs to be manually mounted again.

Since the OS is installed on a third drive (ssd), raid1 volume would be used strictly as a data storage and it wouldn't be needed roughly 80% of the time the PC is on.

Is anyone aware of an in-between option - always mounted (or, at least, a shortcut shown on desktop), but powering off when not used? I don't mind the "latency", waiting for a half a minute every time is fine, as long as it extends the life of my drives.


Thanks ahead,
Regards,
Stefan

Mute Ant
Level 13
Level 13
Posts: 4731
Joined: Tue Sep 03, 2013 7:45 pm

Re: Mdadm RAID 1 power save

Post by Mute Ant » Fri Apr 20, 2018 7:10 pm

Leave them mounted and talk to the drive hardware. As soon as Linux needs to access something in the RAID they will spin up again...
sudo hdparm -Y /dev/sda ; sudo hdparm -Y /dev/sdb
Right at the bottom, all alone in the centre of the bright cold floor, was a lemon drop.

User avatar
dennnic
Level 1
Level 1
Posts: 10
Joined: Mon Aug 21, 2017 4:57 pm
Location: Belgrade, Serbia

Re: Mdadm RAID 1 power save

Post by dennnic » Sun Apr 22, 2018 9:25 am

It won't do the trick. They come back online the same moment I issue the command. There must be something using them all the time.

User avatar
dennnic
Level 1
Level 1
Posts: 10
Joined: Mon Aug 21, 2017 4:57 pm
Location: Belgrade, Serbia

Re: Mdadm RAID 1 power save

Post by dennnic » Tue Apr 24, 2018 6:50 am

Anyone? Can someone, maybe, move the thread somewhere, where it's gonna be read more often?

User avatar
catweazel
Level 14
Level 14
Posts: 5202
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Mdadm RAID 1 power save

Post by catweazel » Tue Apr 24, 2018 6:58 am

dennnic wrote:
Fri Apr 20, 2018 10:14 am
I don't mind the "latency", waiting for a half a minute every time is fine, as long as it extends the life of my drives.
Drives are best left powered up. Spinning up a HDD induces torsion stress in the drive spindle, which promotes failure. Power cycles are counted by the drive's firmware (SMART) precisely because once they reach a certain threshold they shorten the life of the drive, which is the exact opposite of what you wish to achieve.
A new scientific truth does not triumph by convincing its opponents and making them see the light, but rather because its opponents eventually die, and a new generation grows up that is familiar with it. - Max Planck

User avatar
dennnic
Level 1
Level 1
Posts: 10
Joined: Mon Aug 21, 2017 4:57 pm
Location: Belgrade, Serbia

Re: Mdadm RAID 1 power save

Post by dennnic » Tue Apr 24, 2018 9:49 am

catweazel wrote:
Tue Apr 24, 2018 6:58 am
Drives are best left powered up. Spinning up a HDD induces torsion stress in the drive spindle, which promotes failure. Power cycles are counted by the drive's firmware (SMART) precisely because once they reach a certain threshold they shorten the life of the drive, which is the exact opposite of what you wish to achieve.
Even if it meant leaving them on for 10 hours straight every day?

User avatar
catweazel
Level 14
Level 14
Posts: 5202
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Mdadm RAID 1 power save

Post by catweazel » Tue Apr 24, 2018 6:31 pm

dennnic wrote:
Tue Apr 24, 2018 9:49 am
catweazel wrote:
Tue Apr 24, 2018 6:58 am
Drives are best left powered up. Spinning up a HDD induces torsion stress in the drive spindle, which promotes failure. Power cycles are counted by the drive's firmware (SMART) precisely because once they reach a certain threshold they shorten the life of the drive, which is the exact opposite of what you wish to achieve.
Even if it meant leaving them on for 10 hours straight every day?
Even if it means leaving them on 24x365.
A new scientific truth does not triumph by convincing its opponents and making them see the light, but rather because its opponents eventually die, and a new generation grows up that is familiar with it. - Max Planck

User avatar
dennnic
Level 1
Level 1
Posts: 10
Joined: Mon Aug 21, 2017 4:57 pm
Location: Belgrade, Serbia

Re: Mdadm RAID 1 power save

Post by dennnic » Thu Apr 26, 2018 5:08 pm

Thank you for your answer! Will do just that.

Post Reply

Return to “Newbie Questions”