Putting NAS to sleep from /sys/power/state

Post Reply
ktlin
Posts: 5
youtube meble na wymiar Warszawa
Joined: Sun Sep 12, 2021 12:01 am

Putting NAS to sleep from /sys/power/state

Post by ktlin »

Hi!

I'm looking to do some regular automatic backups from my Linux laptop using rsync. I always keep my NAS in Sleep (S3), so I made a script to:
  • Wake on LAN
  • copy data with rsync
  • Put the NAS back to sleep
, which would be called once per day.

For the "putting the NAS to sleep", I simply write "mem" through ssh to /sys/power/state and that puts it to sleep.

Now my question: Is this safe?

I noticed when triggering the Sleep from mobile app or Control Center, it takes a bit of time to prep things, and after around 10-15 seconds, it goes to sleep.
When I do the /sys/power/state method, it goes (almost) instantly.

Is there anything I should know, or anything that I'm missing?

Thanks!
User avatar
Nazar78
Posts: 2085
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: Putting NAS to sleep from /sys/power/state

Post by Nazar78 »

You should call this instead, to let the system handles the way it's designed during STR.

Code: Select all

/etc/init.d/NASsuspend
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
ktlin
Posts: 5
Joined: Sun Sep 12, 2021 12:01 am

Re: Putting NAS to sleep from /sys/power/state

Post by ktlin »

Thanks!

This is exactly what I needed and for some reason, I couldn't find this info anywhere before.
Post Reply

Return to “[Official] For AS52xx/53xx/66xx Series”