Bradley Handziuk's blog

Western Digital WDMC folders

The Western Digital EX2 has been great so far except one big snag are all these .wmdc folders. The drive seems to automatically create a hidden folder called .wdmc which is not owned by the user (me) who created the content of that folder. These hidden folders create all sorts of problems when copying files (folder path's too long) or when deleting folders (I don't own that folder so I can't delete it).

Fixing this on the EX2 cannot be done through the web interface. You need to SSH into the computer itself to make the necessary changes. You need to make sure you have some SSH client installed. I'm on Windows 8.1 here so I used PuTTY. I also had to turn SSH on on my EX2.

Now you can get the right access. Back to business.
This is all caused by two services running in the background, regardless of whether or not you have DLNA streaming going.
They show up in the running services (ps) as
 3940 root     32640 S    /usr/local/wdmcserver/bin/wdmcserver -v /tmp/Volumes.xml 3960 root     41312 S    /usr/local/wdmcserver/bin/wdphotodbmerger
They can be stopped (an disabled by)
/etc/init.d/wdmcserverd stop
/etc/init.d/wdphotodbmergerd stop

update-rc.d wdphotodbmergerd disable
update-rc.d wdmcserverd disable
However, when I try to disable the service I get
-sh: update-rc.d: not found
So the other way to stop them from restarting after a reboot is to remove their right to execute (-rwxr-xr-x --> -rw-r--r--). You can inspect the services status with ls -l /etc/init.d before you change anything if you want.
chmod 644 /etc/init.d/wdmcserverd
chmod 644 /etc/init.d/wdphotodbmergerd
Now to remove all those ridiculous .wdmc folders. I only want those ones gone which are not related to media streaming at first. There are hundreds of these.
find / -name .wdmc | wc -l
They are all located where you'd expect: in the "shares" folders, /mnt/HD/HD_a2/*.
find /mnt/HD/HD_a2/Files/ -name .wdmc | wc -l
find /mnt/HD/HD_a2/Files/ -name .wdmc -exec rm -rf {} \;
find /mnt/HD/HD_a2/Files/ -name .wdmc | wc -l
With the services stopped and .wdmc folders deleted looking at pictures in Windows Live Photo Gallery is A LOT faster. I watch videos over DLNA on my PS3 and this does not seem to have affected anything on that front. All wins.

Undoing all of this (except deleting the files) can be accomplished by:
/etc/init.d/wdmcserverd start
/etc/init.d/wdphotodbmergerd start
chmod 755 /etc/init.d/wdmcserverd
chmod 755 /etc/init.d/wdphotodbmergerd

Comments (4) -

  • YB

    3/22/2015 12:25:08 AM | Reply

    You saved me hundred of hours to find and delete all those. thanks a lot. Pity it is all I can do for you!

  • Serhan

    10/22/2015 7:58:35 AM | Reply

    An automatic firmware update wipes out that setting and restarts those services. Since I don't want to disable update, how can I prevent an update to initialize those again. Thanks

    • Bradley

      11/4/2015 7:44:52 PM | Reply

      @Serhan I don't know the answer, however in more recent firmware updates it does seem to go faster over my network. It's possible it's less of an issue. You could set up a scheduled task to do this though if it still misbehaving for you.

  • Alexander

    12/28/2015 8:25:30 PM | Reply

    Thanks a lot!