The unofficial gen2 definitive sleep

not a synology fan, but I am a QNap fan. Problem is that a good QNap 4 drive unit is about $600 without drives which I was debating to buy when I had my 3 x 4TB Cloud drives of which I could have just stripped the drives and use them in the QNap unit. However, I could not bear the thought of an empty Cloud shell deprived of its innards.

Thus I sold them and bought 2x8TB gen2 Clouds which was pretty reasonable. A WD 8TB cloud drive which contains an 8TB Red drive is actually cheaper than a bare 8T Red drive here in Canada, thus for the price of a 8TB drive you get a free NAS which is decent. It gets read speeds up to 122MB/s and write speeds of 80-100MB/s which is on par with QNap.

Two 8TB clouds, one for backup and can be swapped in anytime. It is a solid deal at this time. The clouds do sleep even without the above stop commands. Much more stable than the gen1 version.

Since you will need to get some Red drives for your synology anyways, might as well get them with the Cloud shell and see if you like the free NAS, if not, strip them out and use it with your synology.

I’ll check into it as per your instructions. Anything else? :stuck_out_tongue:

I think I found that a process called set_pwm is the process that puts the disk to sleep. If you grep the file you will see hdparm -Y a couple of times.

RAC

So after waiting a whole day, my new cloud came at around 6:30pm and I really don’t want to unwrap this thing to do any testing. My other two clouds has been sleeping quietly for the last few days and I have no complaints at all.

Cron is off, Scans are off, Even the annoying tick seem to have disappear now that I don’t have any new data being added to it.

So I think I’m just going to return this new unit to Costco tomorrow, un-opened and call it a done.

Despite all your findings which actually proves nothing since whatever you found is in the same directory as monitorio.sh, I am calling this case closed with monitorio.sh running in the background somewhere since it is included ; if it has been replaced then you won’t see the monitorio.sh file at all.

Grep all you want but until you get yourself a gen2 cloud you have nothing on the line, but on the other hand, the gen2 cloud doesn’t seem to have any of the problems that the gen1 cloud had, so there is really nothing to do.

Anyways
 time to go Rac
 if I change my mind and unwrap this new cloud to do all the things that I said, I’ll let you know by posting, but I bought myself a new pressure cooker and that will be my entertainment this weekend as I cook pot roast, chicken curry and so on.

I did go out and buy another Gen2. I’ve had it for several days. I know that the monitorio.sh script is not run. From what I’ve found out it would be easier to work on a car with only a screw and pair of pliers. Than work on the gen2. Most command that I try to run don’t exist. If I copy a program from either a gen1,which shluld not work, or a standard Debian system it won’t run. None of my utilities that I use on the gen1 won’t work on the gen2. A copy of the user.log is located in /usr/local/config/user.log. This is how the log can continue across reboots.
Since you are happy with your gen2’s. I guess I will return it to best buy.

RAC

I see, so it wasn’t a copy of the files that you were grepping


It is running under a different guise but it is running
 go grep file_tally
 because that is definitely running in the background.

well yeah, this is what hacking is all about, a screw driver to loosen all the screws and a pair of pliers to pull out the thorns.

well at least we know where to store our scripts then between reboots :stuck_out_tongue:

You should not be doing it for me :stuck_out_tongue: you should be doing it for the sake of the forum. Find out if we can get the wake logs back so we know how often we should be irritated.

but yeah, I’m happy
 and the pressure cooker made a great meal tonight, first time using it.

Good morning Rac.

I thought I might feel different this morning about chasing down this illusive monitorio.sh that is running but nope, the two original clouds are sleeping on the shelf. The new Cloud, unwrapped, is back in its shipping box along with printed internet receipts, ready to go back to costco.

I did look into disk_monitor.sh that you indicated and it seems to be an identical copy of monitorio.sh except that it actually tally up the hard drive size and monitoring the hard drive size change, but it doesn’t put the drive to sleep (i.e. no hdparm -Y). It is interesting indeed.

Go look for the init scripts that starts up the whole system and I’m sure from there you can unravel the mysteries of the Clouds gen 2.

Good luck Rac

The init script shows that disk_monitorio.sh and set_pvm are started. But only set_pvm shows up in a ps -eaf. Also set_pvm has the ability to do hdparm -Y.
But I found another interesting thing while looking at the system_init script. It shows ,that if a usb device with the name mfg_WDMYCLOUD which contains a file called fun_plug, it starts a program called mfg_start. I suspect that the mfg_start program runs the fun_plug script.

RAC

1 Like

well there you go
 so what they have done is split monitorio.sh into two parts. One does the tallying which is disk_monitor and the other puts the drive to sleep. The reason that disk_monitor is not showing up may be that it is a background process which only has a PID or running under another process.

I did not look hard at the scripts but one may depend on the other, so I would need to kill both if I were to replace it with a simpler monitorio.sh without the file_tally.

The tally process of disk_monitor is what is making the ticking noise between scans; it needs to be killed.

Good Job Rac!! keep going


as to the fun_plug, I would guess it was the fix to recognizing the 8TB USB drives and any future new hard drives or it could be a backdoor for a WD virus :stuck_out_tongue:

Fun_plug is not a virus. I use the fun_plug feature on my DNS-323 NAS to add more features. Or to do things like stop processes when the system starts up.

RAC

vi·rus
ˈvīrəs/Submit
noun

a piece of code that is capable of corrupting the system or data.

and you


sounds like corruption to me :stuck_out_tongue:

Did some testing today. The gen2 was sleeping. I rebooted the gne2 and killed the set_pwm process. For the next few hours the device did not go to sleep. I then started the set_pwm and with in 20m minutes the Gen2 was sleeping.
Been trying to figure out what the fun_plug file is used for in the gen2. But I can’t modify the system_init file because the /usr/local/module in mounted read only. I also can’t figure out how to recreate the image.cfs file.

If you look at the file /usr/local/module/script/system_init you will see the reference to fun_plug. Which if it is a virus then you and my system both have the virus. But it is not a virus. It is WD supports way to add code to the gen2 when it boots.

RAC

I have already said that


you do know that I was kidding about the virus in general, but what you and I are doing is corrupting the WD, so therefore we are the virus :stuck_out_tongue:

Good job on that. Now it isn’t the sleep that we are after though
 although I could change the led lights on sleep to “off” but unfortunately set_pwn is a binary and not a script; although set_pwm could be called from another script that actually sets the led.

I would like to kill the disk_monitor process because that is the clickity clackity tick tock process that is set to low priority that checks whether the hard drive has changed in size. If you can killed that process I will be appreciative.

I did return my cloud to costco today and cannot participate in full abandon hacker changes to the cloud as I had planned. I did however grep around the drive yesterday night and found those files that you have alluded to above.

Since you are testing your drive anyways, kill all the process one by one to see if you can stop the clacking; to do this fill the drive with 4 or 5 GB of photos, music or pubs. Something that requires a little bit of effort to tally the hard drive changes. You should hear a kind of slow clacking every couple of seconds.

Keep up the good work Rac


Here is the check.sh script. It fails on gen2 because they use ash as the shell. But you can
type bash This gets you to the bash shell. Then ./check.sh 30
This will display the disk activity for the root and data disk. If the data disk is being read or written the last two numbers should increase when the disk clacks.

Use my check.sh script from the gen1. But change the sda4 to sda2.

RAC

Hold off on this script. The numbers are not right.

noooo
 but thanks for trying

just need a method to kill disk_monitor.sh

no scripts for monitoring the monitor of disk activities which I know that it is simply reading because it does go to sleep after 10 minutes.

disk_monitor.sh is not running. The system_init script checks /usr/sbin/disk_monitorio.sh
If the file exists it starts the file. The file does not exist in /usr/sbin.

RAC

PS I ran /usr/local/sbin/disk_monitor.sh. It shows up in ps -eaf