Announcement

Collapse
No announcement yet.

ZFS HDD Sleep spin down in 18.04

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [DESKTOP] ZFS HDD Sleep spin down in 18.04

    Hi,
    Just completed installing a 4xhdd raidz zfs and I am trying to work out how to "spin down" or sleep the drives when not in use
    I have read this https://www.kubuntuforums.net/showth...ight=hdd+sleep
    and seams relevant, but I've already setup ZFS, and I have files on there.
    I did read an old (2011) blog about hdparm -S 120 command in /etc/rc.local but I don't have that in 18.04.
    I have searched around the system settings, but cannot find anything specific for HDD sleep.

    Any suggestions on how to sleep the whole zfs pool array?

    Thanks.

    #2
    Perform a Google search using this: ubuntu how to sleep zfs pool array
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Not that it's your solution, but rc.local can be created and enabled:

      https://www.linuxbabe.com/linux-serv...l-with-systemd

      About a third of the way down re. Ubuntu 16.04 and above.

      Please Read Me

      Comment


        #4
        Originally posted by Snowhog View Post
        Perform a Google search using this: ubuntu how to sleep zfs pool array
        Thanks Snowhog. I've been 'googling' for like 15 hours already.
        I did find the page about hdparm sleep https://rudd-o.com/linux-and-free-so...zfs-pool-sleep
        but I don't have an /etc/rc.d/rc.local file
        I have 7 /etc/rc.d0 thru to rc.d6 but no actual rc.local file

        Should I ask this in a ZFS fourm ?

        Comment


          #5
          Originally posted by oshunluvr View Post
          Not that it's your solution, but rc.local can be created and enabled:

          https://www.linuxbabe.com/linux-serv...l-with-systemd

          About a third of the way down re. Ubuntu 16.04 and above.
          YIKES ! That's confusing. Is there a "Ima Dummy" version?
          Thanks oshunluvr

          Comment


            #6
            Originally posted by CharlieDaves View Post
            Should I ask this in a ZFS fourm ?
            That would probably be a good idea. Not that I'm trying to steer you away from here, but I don't think very many members here use ZFS, so any knowledgeable answers are more likely to come from those who use it routinely.
            Using Kubuntu Linux since March 23, 2007
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Originally posted by Snowhog View Post
              That would probably be a good idea. Not that I'm trying to steer you away from here, but I don't think very many members here use ZFS, so any knowledgeable answers are more likely to come from those who use it routinely.
              I totally agree. ZFS is not in the kernel and not commonly used. There are only two members here who have ever posted about ZFS to my recollection, and one of those has "retired" from most activity.

              As far as enabling rc.local, it looks to me like it's installed by default, just the file doesn't exist and it's not enabled.

              Code:
              [FONT=monospace][COLOR=#000000]sudo systemctl status rc-local            [/COLOR]
              [sudo] password for stuart:  
              ● rc-local.service - /etc/rc.local Compatibility
                 Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
                Drop-In: /lib/systemd/system/rc-local.service.d
                         └─debian.conf
                 Active: inactive (dead)
                   Docs: man:systemd-rc-local-generator(8)
              [COLOR=#54FF54][B]stuart@office[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#54FFFF][B]/[/B][/COLOR][COLOR=#000000]$ [/COLOR][/FONT]
              So it seems simply creating the file, making it executable, and enabling and starting the service is all that's needed.

              Please Read Me

              Comment


                #8
                Originally posted by CharlieDaves View Post
                Any suggestions on how to sleep the whole zfs pool array?
                Is it necessary to do it at the zfs level? Or will zfs keep waking the drives? Is the zfs pool mounted when you're not using it?

                Before automating a solution with startup files, I suggest you check out commands from a konsole. I use
                Code:
                $ sudo hdparm -y /dev/sda
                $ sudo hdparm -y /dev/sdb
                to spin down sda and sdb immediately (they spin up on any access). Once you've got the commands you want, if you create /etc/rc.local and make it executable, systemd has a compatibility service that will run it.

                hdparm -S 120 means a 10 minute timeout. On my system hdparm -S doesn't work, the timeout is ignored.
                Regards, John Little

                Comment


                  #9
                  Originally posted by oshunluvr View Post
                  I totally agree. ZFS is not in the kernel and not commonly used. There are only two members here who have ever posted about ZFS to my recollection, and one of those has "retired" from most activity.

                  As far as enabling rc.local, it looks to me like it's installed by default, just the file doesn't exist and it's not enabled.

                  Code:
                  [FONT=monospace][COLOR=#000000]sudo systemctl status rc-local            [/COLOR]
                  [sudo] password for stuart:  
                  ● rc-local.service - /etc/rc.local Compatibility
                    Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
                   Drop-In: /lib/systemd/system/rc-local.service.d
                            └─debian.conf
                    Active: inactive (dead)
                      Docs: man:systemd-rc-local-generator(8)
                  [COLOR=#54FF54][B]stuart@office[/B][/COLOR][COLOR=#000000]:[/COLOR][COLOR=#54FFFF][B]/[/B][/COLOR][COLOR=#000000]$ [/COLOR][/FONT]
                  So it seems simply creating the file, making it executable, and enabling and starting the service is all that's needed.
                  I get the same result as you did.
                  My 'YIKES' was mainly about the content of rc.local as in services section. What is asked to put in there I have no idea what it's for. My headache has settled somewhat today so I'll giggle(C)(R) around the internet.

                  As for the hdparm command, it operates on individual devices, I was sort of hoping for a "pool" sleep command. I'll also try and register with a ZFS fourm or at least try and look through one, since like Linux, there's multiple flavours.
                  Thanks PPL

                  Comment


                    #10
                    Another question if I may.
                    Is it HDD "sleep", or "spin down" or "something else" that I should be searching for?
                    It'll help narrow the results away from screen saver questions

                    Comment

                    Working...
                    X