Mount The Shares From Clients

By Bill Meade, published on August 1, 2006
Source: Tom's Guide US | Keywords: , , , , ,

10. Mount The Shares From Clients

I've found that mounting shares from client computers is the last 20% of the process, but can be 80% of the work. After creating a share on your DIY RAID 5 NAS with Ubuntu, go to a client PC on your network and try to log in. You'll find that the log-in won't work. This is because every NAS has a trick to allowing clients to mount shares. This sick torture, inflicted while we wannabe geeks are at the finish line, is the price we pay for using open source products.

The trick to making your RAID 5 NAS share mountable on other computers is the /etc/samba folder. One great resource for getting little things going on your Ubuntu installation is Ubuntu dapper. The SAMBA tricks are located in the Samba Server section.

First open a terminal window and check to see whether Samba is in fact, installed when you used the administrative menu click-to-install process I described previously. The acid test is to type:

sudo /etc/init.d/samba restart

If you get a "samba not found" message you'll need to install Samba manually. To do this, make sure you can reach the Internet from the Ubuntu machine (open a web browser), then type:

sudo apt-get install samba

Ubuntu will then prompt you for password. Just give it the password you set up when you installed Ubuntu.

Next type sudo apt-get install smbfs then sudo /etc/init.d/samba restart again and you should see the services stop and then start.

Now you can enter cd /etc/samba and then ls to verify you can see smb.conf. If you can, type sudo nano smb.conf and enter your password when prompted and hit return. Then type + to search for a text string and type in security = user.

The search will bring you to the part of smb.conf that looks like this:

####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
; security = user


take out the ; at the beginning of the security = user line and then change user to share, i.e. security = share

Then, scroll down to the very bottom of your smb.conf file where you should find the following:

[test]
path = /home/bill
available = yes
browseable = yes
public = yes
writable = yes

Note that the last part of the path name, i.e. /bill, will probably be different, as noted earlier. Now add these lines:

create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup

The final product will look like this:

[test]
path = /home/bill
available = yes
browseable = yes
public = yes
writable = yes
create mask = 0777
directory mask = 0777
force user = nobody
force group = nogroup

Type + to exit the Nano editor, then hit Y to save the changes. Finally, restart SAMBA by typing:

sudo /etc/init.d/samba restart

To log on to my RAID 5 NAS I needed to authenticate with no username and no password. This is not a very secure Linux SAMBA configuration by any means, but it will get you started. If you still can't mount your NAS share after following all of this, you'll need to consult the Ubuntu dapper links above. Also be sure that you run chmod 0777 [sharename] on the directory you are trying to share.

Comments | Print | Send to a friend

Sponsored links

Comments

Anonymous 12/19/2007 10:01 AM
Hide
-0+

An excellent article. I have been trying to setup something like this. I just went thru 2 weeks of trying to get software raid 5 to work in Ubuntu. I searched the net for how-to or step by step instructions and could only find bits and pieces. Nothing worked. Linux users need to remember that us wanna bees don't know even the slightest of commands! In every article I found, they assumed you knew "some" basic commands. I tried reading and learning, but I couldn't find a good learner for linux. Anyway, having decided to do a hardware raid 5 with Ubuntu desktop seemed like my only hope. Then I find this article here, and it is exactly the way EVERY article should be done, step by step, assuming the reader knows nothing. This article is VERY good and thorough! Congratulations Benjamin Webb, you did a great job! -Blueuniform

Anonymous 04/15/2008 11:01 PM
Hide
-0+

interesting article, but the beauty of linux software RAID5 is that an array rebuild will happen automatically when you replace the faulty drive (well you have to tell it that you replaced the drive using mdadm). you can even simulate a failure and then watch it rebuild the array to get an idea of how your system will respond under different scenarios. here's a snippet of what needs to be done to replace the missing drive/partition:

Rebuilding:

To remove the failed partition and add the new parition:
mdadm /dev/mdX -r /dev/sdYZ -a /dev/sdYZ

where X is the array number (0,1,etc) and YZ is your disk/partition (sda3 for example)

e.g.:
mdadm /dev/md0 -r /dev/sde3 -a /dev/sdr3
(where sde3 is the 3rd partition on your faulty drive, and sdr3 is the 3rd partition on the new drive)


Watch the automatic reconstruction run with:
watch -n1 cat /proc/mdstat

Anonymous 07/02/2008 2:29 PM
Hide
-0+

I understand that people fear the console commands. It can be a bit scary at first. But mdadm is pretty simple when you're used to console apps and a little bit of linux. It's mostly just mdadm and such. I currently run two software raids with 7 and 5 disks.

Anonymous 11/03/2008 1:06 AM
Hide
-0+

i believe his concerns with software raid5 were not just the rebuilding points. i believe he liked the fact that if the os drive took a crap, he could take the card and array and move it to any operating computer and it would power up and work. if you lose the operating system that wrote the software raid array, you have lost the array.

Comments are closed on this page.

Sponsored links