Firmware 4.05.00-315 Discussion

sleep issue aside i noticed an issue with SMB3 and freefilesync every sync triggered an error about sparse files. i ended up having to full restore ssh in and downgrade. problem went away so i am sure that the application in question does not properly process such files. however i am not the type to manually drag and drop to get the files pushed.

Windows 10 1607 pro. 64 bit.

Can you post a screen capture of the Free File Sync error? Not seeing an error using Free File Sync on my end using two Windows 10 x64 computers. But then I mostly mirror the My Cloud contents to a USB hard drives attached to both Win 10 computers.

a huge thank you to rac8006 & Ralphael

I think the problem with samba in this version is that it tries to set itself as the local master, and wakes up to listen/advertise/whatever.

“Samba name server FROST is now a local master browser for workgroup WORKGROUP on subnet”

edit /etc/samba/smb-global.conf and set domain master = no

I’ve also added ‘disable netbios = yes’ to it, and for now smb is not causing a spin up.

The domain master was already configured for no in the smb-global.conf on my unit. Here are the three “master” entries in my smb-global.conf.

  local master = yes
  domain master = no
  preferred master = auto
  os level = 5

I wonder if local master, preferred master and os level need be changed?

Error Code 1: Incorrect function. (DeviceIoControl, FSCTL_SET_SPARSE) was the error has i am not on the firmware at present i am unable to post an image in my case i mirror from external drive to the mycloud

Mine was “domain master = yes” (just checked the backup I kept after I reflashed & factory reset the unit). Alas it started to wake-up again.

I’m going to run mine for a while with the following (per this link) that doesn’t set Samba as the master browser.

  local master = no
  domain master = no
  preferred master = no
  os level = 0

Not getting an error mirroring files from an external usb hard drive attached to a Win 10 PC to the My Cloud when using Free File Sync.

There is the following over on the FFS forum:

what version ffs are you using i tried 9 and the beta

The fix is trivial: Samba’s implementation for GetVolumeInformation should not return FILE_SUPPORTS_SPARSE_FILES or just support FSCTL_SET_SPARSE. which is beyond my understanding

Currently using 9.0 (April 16, 2017 build).

currently in the process of incremental manual updates leading up to the current firmware will report back once i can retest my system. which now also has the same ffs build as you.

The domain master was already configured for no in the smb-global.conf on my unit. Here are the three “master” entries in my smb-global.conf.
local master = yes
domain master = no
preferred master = auto
os level = 5

I wonder if local master, preferred master and os level need be changed?


After some testing over the last few days. This is my sleep time. This is with samba, cron ,atop running.
Not sure if the method I use is clean. I mean I don’t have the test environment to make sure that every feature
works. I know that I can map a drive. so samba appears to work. I can open the dashboard. But I can’t change the hostname for some reason. I’m basically running the gen1 cloud from a USB stick using chroot. I still have
a couple of processes that have not been moved to the USB. Which might increase the sleep time.

05 11 23:37:27 00:01:06 1419 0:23:39
05 11 00:11:23 02:58:07 10004 2:46:44
05 11 03:15:31 03:17:56 145 0:02:25
05 11 03:28:13 05:00:27 5534 1:32:14
05 11 05:10:45 05:15:06 261 0:04:21
05 11 05:25:23 06:17:06 3103 0:51:43
05 11 06:27:23 07:17:15 2992 0:49:52
05 11 07:27:32 08:01:06 2014 0:33:34
05 11 08:11:23 15:45:45 27262 7:34:22
05 11 15:56:02 18:30:14 9252 2:34:12
Total Sleep Time: 17:34:12
Start 1494475266
End 1494541814
Total Up Time: 18:29:08 93% Sleep 7% Wake

currently in the process of updating my win 10 pro system to the creator’s edition.
With my gen 1 cloud and the newest v4 firmware. it seems that either my computer implementation of smb3 broke or files got to messed up and since it was time for a reformat i figured it would not hurt to run a test with the upgrade to see if the systems improved.

i spent the time processing the individual updates after downgrading to v3. which in the process fixed some issues that i had with transfers until 315 was installed. last time it was the sparse error. This time NFS was working and samba was not… but NFS was read only and slow. so i rebooted the device to let cron and all the default things run while i upgrade my pc to test again hopefully all will be well if not no lost sleep most files are not on the main system and while i wait for the format and reinstall to finish i could always downgrade now that SSH is working properly last time it was not.

Edit: well it worked briefly and very slow win 10 did use smb 3.1 to perform the transfer then files that where sparse still failed to copy usings ffs. i was able to find a tool that removes the spare attrib but a better fix would be to track down a fix… of course if i set my cloud to smb2 the share disappears

I think printer support in samba causes some wake-ups. Try

disable spoolss = yes

in your smb-global. Without it samba looks for printers

[2017/05/13 02:21:09.696614, 10, pid=11928, effective(0, 0), real(0, 0), class=registry] (reghook_cache_find)
  reghook_cache_find: Searching for keyname [\HKLM\SOFTWARE\Samba\smbconf\printers]

and tries to do some spool housekeeping.

[2017/05/13 02:22:09.754966,  5, pid=11928, effective(0, 0), real(0, 0)] (print_queue_housekeeping)
  print queue housekeeping

somehow when samba does a config file check, if spoolss is not disabled, it causes a spin-up (or it looks for some other file and that causes the spin-up)

[2017/05/13 02:29:18.236272,  6, pid=12341, effective(0, 0), real(0, 0)] (lp_file_list_changed)
  file /etc/samba/tm_config.conf -> /etc/samba/tm_config.conf  last mod_time: Sat May 13 01:19:17 2017
  file /etc/samba/overall_share -> /etc/samba/overall_share  last mod_time: Sat May 13 01:01:40 2017
  file /etc/samba/smb-global_veto.conf -> /etc/samba/smb-global_veto.conf  last mod_time: Sat Apr  1 00:40:02 2017
  file /etc/samba/smb-global.conf -> /etc/samba/smb-global.conf  last mod_time: Sat May 13 02:20:07 2017
  file /etc/samba/smb.conf -> /etc/samba/smb.conf  last mod_time: Sat May 13 00:49:20 2017
1 Like

Hello again,

After wasting 4+ days (I’m not even sure) I think I’ve managed to strip as much as I can and ended up with a minimal installation with (hopefully) great standby time (still testing) and even greater performance.

1- disabled as much service as possible, including:

– afp: performance hog, smb3 works great with mac os.
– nfs: never used
– ftp: ssh already offers sftp
– external usb: never used
– logs: waste of memory, never checked before
– winbind: I don’t have any PCs
– cron, media server, etc.

2- cleanup: removed some obvious useless files/folders. once you do it, it may take 10-20mins to reboot, don’t worry and just wait for file system check to complete.

3- ramlog: dropped its size to 10M to prevent swapping.

4- samba
– applied msg.sock tmpfs fix, integrated to init.d samba file
– disable spoolss: disables printer support: improves disk standby time
– added streams_xattr: gets rid of dot underscore files, lightning fast directory listings, and drops cpu usage
– increased deadtime: default is unlimited, improves disk standby time
– disable netbios: disables nmbd which improves disk standby time
– disabled log file: save memory to prevent swapping

5- mDNSResponder
– added smb & removed afp: connect from sidebar

6- monitorio
-– removed tally (/usr/local/bin/tally doesn’t even exists)
–- removed mediacrawler
-– removed individual share size calculations
–- disabled rotateLogs (run-parts /etc/nas/wakeup.d)
–- mount / noatime,nodiratime
–- decrease vm.swappiness
–- added afp fix (killall cnid_dbd) (if you decide to keep afp, this one prevents spin-ups)
–- added sleeptime logging (/var/log/monitorio.log)
–- added log truncation
– decreased swappiness: keep it in memory
– stop cron (a couple scripts restart it)
– added debug mode: stop the service and run it from terminal to pinpoint processes that read/write


  • no more 7 seconds sleeps
  • stays asleep hours (hopefully will standby days)
  • read/write speeds jumped from 55/40 to 100/85 (due to low cpu use)

Once again, thank you Bennor, rac8006, and Ralphael!


1 Like

@Levent_Ozler, good job. What kind of sleep times are you looking at now?

In looking through your changes its not clear what impact it would have for those using Windows PC’s. Is there any impact or edit that shouldn’t be made to allow for better Windows compatibility?

Beyond basic file access what other features remain active? It appears you turned off media serving so this means no DLNA I assume. I assume your changes also mean no remote access as well (for those who use remote access)?

Amazing how far we are going to try and fix the mess the WD firmware coders have made with the firmware.

Thanks, last time I left it alone it slept 6+ hours.

Sorry about the windows compatibility, I didn’t have the time to check them one by one. But nmbd (netbios for samba) definitely spins up the disk (every 5 mins or so). So I nixed as much as I can. I’ve posted is quite good for debugging sleep problems, you can run it in terminal, and as soon as the disk wakes up it displays process/kernel disk activity and files that were modified/created in last minute.

that is funny… in all my years debugging WD, I never thought of running monitorio by itself in terminal :stuck_out_tongue: If I had to start it up in terminal, I would throw an ampersand behind it to put it into background.

That is unfortunate because now I’m on gen 2 and I no longer have a running :frowning: Some mysterious program like monitorio now runs in the background and I think it is all compiled into the init.

but Good work on your detective work, now we just need @rac8006 to port it to gen 2 :slight_smile: