Disk not sleeping

Recently I found that if I leave a windows file explorer window open on my PC
that is connected to the My Cloud. The PC sends smb2 requests to the My Cloud
every 20 seconds requesting information of the mounted partitions. This causes
the My Cloud to read the /etc/mtab file. Which keeps the disk from sleeping.
Just some additional information about the sleep problem.

Nice find. Experienced the same but never bothered to dig into it to find out exactly what is causing it. Gave up on the sleep issue on my first gen a long time ago. I normally have Windows Explorer open quite often, will have to get in the habit of closing it when not in use to see if anything changes. Any time I leave Windows running, or bring it out of sleep, the My Cloud doesn’t sleep or wakes up from sleep. Even at night when only the My Cloud is running by itself on the local network it fails to sleep for long periods of time. I’ve messed around with all the usual suggestions and short of turning off almost all services on the My Cloud nothing is a 100% fix for this problem.

One of the things I noticed is that one of my My Clouds has the file indexing enabled.
I can’t turn it off. Do your My Clouds have the indexing enabled? Only my gen2 devices have the
indexing enabled.

Which file indexing?

Currently I’ve got wdphotodbmergerd and wdmcserverd stopped via user-start at boot on my first gen v4.x single bay. Sleep is erratic on my unit. Has been from day one unless go scorched earth and turn off Samba and other services.

I use my system from 8:00pm until 11:00 pm every night. It is a gen1 system that slept 69% of the time since Oct 17.
This is my S98user-start file.

/etc/rc2.d/S03atop stop
/etc/rc2.d/S20nfs-common stop
/etc/rc2.d/S20nfs-kernel-server stop
/etc/rc2.d/S20restsdk-serverd stop
/etc/rc2.d/S20winbind stop
/etc/rc2.d/S50netatalk stop
/etc/rc2.d/S60mDNSResponder stop
/etc/rc2.d/S61upnp_nas stop
/etc/rc2.d/S84itunes stop
/etc/rc2.d/S85twonky stop
/etc/rc2.d/S85wdmcserverd stop
/etc/rc2.d/S86wdphotodbmergerd stop
/etc/rc2.d/S92wdnotifierd stop
/etc/rc2.d/S95wdAutoMount stop
mount -o remount,noatime,nodiratime /dev/root /

Yeah that’s going scorched earth on the My Cloud processes. :smiley: I’ve tried that and it helped a bit with sleep but came at the cost of certain features I normally use not working. Guess I’ll have to take another run at this stupid problem sometime on my first gen.

I hope you noticed most of the lines have a # as the first character.

Yes. :laughing:

Darn for some reason the S98user-start command entries (none of them) appear to get run when my first gen My Cloud boots (or reboots). When I run the commands individually from the command line (Putty) the services are stopped. Not sure why the firmware isn’t running the user-start file at startup. Guess I’ll have to spend more time (at some point) trying to track this issue down. For now I’ll simply manually run the commands to stop the services and monitor the sleep time to see if it improves.

Think the only modification I’ve done recently is using CRON to backup to a USB hard drive rather than using Safepoint.

Make sure that the ./etc/S98user-start file has 777 for permissions and is a symbolic link to /CacheVolume/user-start which also has 777 permissions.
Standard linux when entering run level 2 executes all of the scripts in the /etc/rc2.d directory that has the first letter S. It then executes them in numerical order starting with 1 and ending with 99.
So the S98user-start file should execute unless there is an error in the file.

Forgot about the symbolic link that Linux does. (face palm) The s98user-start file was 777 but the actual user-start file was 666. Not sure how that happened. Was only checking the s98user-start file when checking permissions in the past. Changed the permission on the user-start file to 777 and am monitoring the sleep to see if it gets better now that the commands are getting run at boot/reboot. Now I just have to remember to keep Windows File Explorer closed when not using it rather than leaving it open running in the background.