I decided that 2014 for me was going to be the year of the Network Attached Storage (NAS). Last year was the year that I finally abandoned my desktops and went all laptop for both my Mac-based iOS development workflow and general purpose computing (i.e, everything else on my Acer i5 running Lubuntu). This year I wanted to have a massive centralized storage where I could put all my videos and photos so I can access it from any laptop or mobile device. What follows is what I chose and how to hook it up to Lubuntu.
I first looked at external cloud solutions (DropBox, Box, CrashPlan, BackBlaze) and although they were all cool they were unfortunately out for me due to three reasons. First, the storage limits – I didn’t want Gigs – I wanted Terabytes. Although, CrashPlan and BackBlaze both offer unlimited online storage they limit the number of devices. Two, I didn’t have all the files centralized on one computer and it would be best to centralized all my Mac, Linux, and iOS data first before I could go to one of these offsite back-up solutions. Third, these all cost money in a form of a monthly fee of $5 or $50 yearly subscriptions. These offline solutions are definitely part of the final solution but I decided that would be a second phase for me. It looked like I had developed a phased project that broke down into two phases of centralization first and then offsite continuous backup second.
The first phase then came down to having a Network Attached Storage (NAS) type unit. The new Airport Time Capsule looked cool but I wanted something less Appley. I have had good experiences with Western Digital (WD) drives and saw in the January 2014 issue of Maximum PC a head-to-head between Dropbox and the new WD My Cloud product. A successor to the My Book branded drive this new My Cloud branded offering provides a shell to a NAS device and it was cheaper than a Time Capsule. I was sold and for X-mas asked Santa for the WD My Cloud 4TB Personal Cloud Storage – NAS (WDBCTL0040HWT-NESN) device.
Set-up was literally plug and play. There is an iOS App for iPad and iPhone/iPod Touch which allows upload to and download/stream from the NAS. The WD website and User Manual mention Mac and PC software to mount and sync that make connection a breeze. The device supports Time Capsule so I’ll be doing that with my Mac laptops (yes – there is no limit to how many computers connect to this thing). Then came my Linux laptop. There was no mention of Linux which is a shame since you would think that they are leveraging the community’s efforts in their products. But it was easy enough to connect my Lubuntu laptop as a Network File System (NFS) Client via three shell commands.
First, I changed directory to my home directory and created a nfs directory in there:
$ cd $HOME
$ mkdir nfs
Then I applied the following three shell commands:
$ sudo apt-get install nfs-common
$ showmount -e <IP Address of the My Cloud Device>
$ sudo mount -o soft,intr,rsize=8192,wsize=8192 192.168.1.132:/nfs ~/nfs/
If you cd into nfs you’ll be accessing the WD My Cloud device. That’s it. I started to copy twenty mp4 files totalling 1.6GB into the device through 802.11n and it took 8 minutes. I was then streaming these on my iPad mini.
If you are asking how do you find the IP Address of the My Cloud Device well that may be the trickiest part of this whole thing. On some versions of Ubuntu I’ve heard that it automatically sees the WD My Cloud in the Network (going to Nautilus / Network for example). Others recommend you view your router’s Admin Panel to find the NAS IP. If you visit your router’s admin panel you can also take another approach of using the MAC address of the My Cloud to reserve an IP address on your router since the default on the MyCloud is to use DHCP. Once you have the IP you can go to it in a browser using the http://<My Cloud IP Address>/UI interface which WD calls the Dashboard. From there you can assign a static address to the WD MyCloud device and not use DHCP and undo the reservation on the router.
I hope this helps assure you you can connect to this from Linux. I know once I finished the plug and play I panicked for a bit thinking I wouldn’t be able to connect my Linux machines to this device but now I happily throw everything I have onto this. Also, it has a USB 3 port on the back so I can simply plug another 4TB USB drive on it and expand it in the future.
Welcome arstechnica readers. If you have not seen it here is the Jason Inofuentes arstechnica article that links to this blog post:
2. Ask Ubuntu:
This article was also referenced in the following AskUbuntu forum question:
3. Italian Ubuntu Forum:
This article was further referenced in an Italian Ubuntu Community Forum:
22 thoughts on “WD My Cloud NAS on Ubuntu”
Is your WS Cloud is password protected? if so, how did you specify the username and password on the mount command?
I didn’t set-up any password. For home use since its behind my router you need to be on the same wifi network.
If you set it up for remote access I imagine it would force a user id and password.
That user id and password would be used for the web interface.
From what I know about NFS the NFS share permissions are handled in the file system of the server side of things.
So when users are added to the NAS they all seem to share the same permissions to the share on the NAS.
I created a couple of users to test this and we can all see each others folders. Again – for home use this is fine not sure if this would be cool in the Enterprise.
My WDMycloud needs a username and password to get access to. I am a Linux rookie so would someone be willing to tell me how to specify these in the mount command?
From what I understand of NFS there’s no such thing as “password protected” NFS.
Pingback: Western Digital My Cloud Review: The $150 personal cloud |
Will your Linux box automatically re-mount it after a reboot?
I’ve had problems in the past with Ubuntu failing that – as it would try to do the mount before it loaded the network drivers.
It doesn’t automatically remount. You could script that.
I’ve been lazy and just go to terminal, up arrow, and hit return to run the command again.
I’ve also been using the WD device from a Roku on my network through the Roku Media Player Channel and it plays Videos, Music, and Photos perfectly as a DLNA Media Server. The days of putting movies on a USB thumb drive are over for me.
To watch my files in WD NAS 2 TB I open Nautilus. Then choose Network and connect to server. Then type smb:// e.g. smb://192.168.1.55
I purchased the same device and I am trying to mount it to my Xubuntu.
How did you find the IP Address of Device?
Using the MAC address you can reserve an IP address on your router since the default on the MyCloud is to use DHCP. Once you have the IP you can go to it in a browser and you get an http://IP-Address/UI interface which is called the Dashboard. From there you can assign a static address to the WD MyCloud device and not use DHCP and undo the reservation on the router if you prefer.
Pingback: WD My Cloud NAS on Ubuntu | 默默的点滴
Thanks for the tip !
But… after some tests, it seems that the connexion always freeze at some point And I don’t know why SMB or AFP does not freeze but it is so less responsive…
In fact if I actually use the mount options soft,intr it seems to be ok
This is a great collumn. Everything went well for me, but the drive seems to be mounted read only:
root@samiam-ubuntu:/mnt# mount -o soft,intr,rsize=8192,wsize=8192 192.168.1.110:/nfs /mnt/nas/
root@samiam-ubuntu:/mnt# cd nas
Public SmartWare TimeMachineBackup
root@samiam-ubuntu:/mnt/nas# cat > hi
-su: hi: Permission denied
root@samiam-ubuntu:/mnt/nas# ls -l
drwxrwxrwx 5 root samiam 4096 Oct 23 21:46 Public
drwxrwxrwx 2 root samiam 4096 Oct 23 06:43 SmartWare
drwxrwxrwx 2 root samiam 4096 Oct 23 06:43 TimeMachineBackup
root@samiam-ubuntu:/mnt/nas# ls -l ..
drwxr-xr-x 5 root root 4096 Oct 23 06:43 nas
drwxr-xr-x 2 root root 4096 Oct 9 23:35 protolinux
root@samiam-ubuntu:/mnt/nas# chmod a+w ..
root@samiam-ubuntu:/mnt/nas# dir ..
root@samiam-ubuntu:/mnt/nas# ls -l ..
drwxr-xr-x 5 root root 4096 Oct 23 06:43 nas
Ideas? I checked the WD cloud web page, nothing like “read only” seemed to be there.
I got it to work. I didn’t understand the way they work the drive. You don have any access to the top level directory on the WD drive at all. You have to create a “share” on the drive, using the web interface, then you can write to that.
Kinda non-intuitive, but I can live with it.
PS my fstab entry ended up looking like:
192.168.1.110:/nfs /mnt/nas nfs rw,soft,intr 0 0
keep getting msg “mount: can’t find 192.168.1.2/nfs~/nfs/ in /etc/fstab or /etc/mtab
Do I need to enter something in either of those 2 tables or what. TIA Sorry I am a real noobie using Rasbian (debian wheezy) on a raspberry pi 2. Rich
Rich – Scott had what sounds like a similar issue back in Oct 2014. He mentions he creates a share on the drive with the web interface – then he was able to write to that.
Not sure if this is the issue you are facing but I wanted to mention it.
Also, in the command 192.168.1.2/nfs~/nfs/ there is a space between 192.168.1.2/nfs and ~/nfs/
Wanted to mention too – just in case.
Hope that helps.
Unfortunately the latest version on these devices as I have just bought now no longer support NFS…. 😦 How did you handle the firmware update that removed NFS? Or did you not do the update for this reason??
That’s strange. I have it auto-update and it send me an email everytime it does it and after over a year of daily 24 hour use it is still going strong and NFS works fine.