When I write scripts in Python, I prefer to write them under Linux. I personally use Ubuntu in a Virtual Machine, powered by Sun’s free VirtualBox. There are of course several ways to share data between Linux and Windows but I decided to incorporate my last acquisitions, a Network Attached Storage Device called Drobo / Droboshare. In this post you will read how to connect Linux (Ubuntu 9.10) to your Drobo.
If you are operating Linux in a virtual machine as I do, you should check the settings of your network adapter. If you are using Network Address Translation (NAT) you might have a hard time to connect to your Drobo. I’m using the bridged network adapter where my host system (WindowsXP) and my guest system (Ubuntu) share the same IP address within the local network (LAN). This depends of course on your personal needs and security requirements.
My Drobo is formated with the NTFS filesystem and connected through a DroboShare to my local network.
Using the Ubuntu File Browser
The easiest way to mount your Drobo is through the Ubuntu menu Places > Network. Click yourself through Windows Network > workgroup > DroboShare > Drobo . Once you click yourself through, the Drobo will be mounted and shown in your Places.
You might also introduce directly smb://workgroup/droboshare/drobo in the File Browser.
I personally found this way as pretty slow. Since I prefer to work in the console, I’ll show you also a way how to mount Drobo by using the console.
Using the Console
Open a console window and check if your Ubuntu can see your Drobo. Use this command:
smbclient -L //droboshare/drobo
If you find your Drobo in the list, then everything is ok. Mine looks like this:
Enter user's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.14a] Sharename Type Comment --------- ---- ------- Drobo Disk Drobo IPC$ IPC IPC Service (DroboShare) ADMIN$ IPC IPC Service (DroboShare) Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.14a] Server Comment --------- ------- DROBOSHARE DroboShare WINXP-WS1 Workgroup Master --------- ------- WORKGROUP WINXP-WS1 user@ubuntu:~$
Now we have to create a directory into which Drobo will be mounted
sudo mkdir /mnt/drobo
And now we will mount the Drobo
sudo mount -t cifs -o username=YourName,password=YourPwd //YourDroboShare/YourDrobo MntDir
- YourName is your user name; leave blank if you haven’t set any
- YourPwd is your password; leave blank if you haven’t set any
- YourDroboShare is the name of your DroboShare or it’s IP Address
- YourDrobo is the Name of your Drobo
- MntDir is the directory to which your Drobo will be mounted
sudo mount -t cifs -o username=,password= //192.168.1.200/drobo /mnt/drobo
Mouting automatically on system startup
If like to mount your Drobo on Ubuntu startup then include the following line in /etc/fstab
//YourDroboShare/YourDrobo MntDir cifs username=YourName, password=YourPwd 0 0
//192.168.1.200/drobo /mnt/drobo cifs username=, password= 0 0
This is how my /etc/fstab looks like:
# /etc/fstab: static file system information. # # Use 'blkid -o value -s UUID' to print the universally unique identifier # for a device; this may be used with UUID= as a more robust way to name # devices that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc defaults 0 0<br /><br /> UUID=6ae7cedc-0de5-4666-81b7-8673ae7d9135 / ext4 errors=remount-ro 0 1 UUID=86e08645-ba82-4b3a-a896-1829bb743c6d none swap sw 0 0 /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0 /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0 //192.168.1.99/drobo /mnt/drobo cifs username=,password= 0 0
Now your Drobo will be mounted on every system startup.
Do you have any comments / suggestions / improvements? I’m happy to hear you opinion!