Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-09-2015, 05:54 PM   #1
LQ Newbie
Registered: May 2015
Posts: 3

Rep: Reputation: Disabled
Auto Mount 2 Hard Drives attached by USB to Router

Hi all. My first time post and very new to linux.
I am using linux Mint Debian version.

My goal is to auto mount 2 external harddrives (Each hard drive is 2TB) attached to the 2 usb ports on my asus wireless router model rt-n56r.

I have succeeded in auto mounting my first drive HDD1 by configuring fstab file:

// /media/public cifs username=**,password=**,rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

At boot this partition is mounted without issue.

In attempting to mount the second hard drive HDD2 I added another entry in fstab as follows:

// /media/public cifs username=**,password=**,rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

It appears that both HDD1 and HDD2 mount however, when entering the partition only files and directories of the second hard drive appear.

So I changed the mount point in the second hard drive to reflect /media1/public1 and after the configuration neither hard drive appears to have mounted.

I tried using UUID instead of path to partition but cannot get even 1 attached hard drive to mount.

I appreciate in advance the help and assistance to my query.
Old 05-11-2015, 03:07 AM   #2
Senior Member
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
The second field in an fstab line is the place where things get mounted into the existing filesystem. And as you noticed correctly if you mount two things in the same place you only see the last added one. So you need a second directory for the second hdd. Did you make the directory /media1/public1 allready?

I don't think that UUID will help much here due to you mounting network drives.
To see why things fail you have to take a look at the /var/log/syslog file or the message file. Or hit dmesg|less and search for smb, samba or cifs errors. Or try to mount them by hand and see what it errors out. Or have a second terminal with tail -f /var/log/messages.
1 members found this post helpful.
Old 05-11-2015, 03:10 AM   #3
LQ Guru
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 10,078

Rep: Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981Reputation: 2981
you can try to mount by hand:
mount /media/public1
mount /media/public
and also you can try to umount them.
Please check if that works and post the output.
Old 05-11-2015, 09:02 AM   #4
LQ Newbie
Registered: May 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled

Thanks Zhjim... you are correct in the behavior of the mount point being the same - the last mount only shows as mounted as you said. I also did make the directory /media1/public1 for the second mount and prior to testing assumed it would work, but oddly it did not and neither drive mounted.

At any rate I did get it working. For me, the problem seemed to be the area in the filesystem in which I placed the mount point. After trying various scenarios any place I placed the mount points before my /home directory I could only get one drive to mount, even when setting up 2 separate directories in the case of /media/public and /media1/public1 I couldn't get any to mount.

I changed my mount points to the Public folder in my home directory /home/vcandy/Public/HDD1 and /home/vcandy/Public/HDD2 and it resolved the issue.

I wouldn't be surprised if this is a permissions issue, for the small amount of time I have been tinkering with Linux many of the issues seem to stem from my ignorance of permissions.

I am learning... Appreciate the support.

Old 05-11-2015, 10:28 AM   #5
Senior Member
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Great you have it solved. Please mark thread as appropiate.

I'd wonder if the culprit really is the mount point within the filesystem hierachry but if the new path suites all should be good.
Normaly all binds that happen due to /etc/fstab are done with root permission so there should be no problem. At least when it comes to mounting. User access sure uses the permissions of the according directories.

If you have some time, maybe dig into logs some more to see what might be the error with the old mount path


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto mount external USB hard drive donmaz Linux - Newbie 6 10-03-2012 05:08 PM
How to auto mount USB drives in terminal sdfi Debian 2 11-04-2011 09:37 PM
How to auto mount usb drives as a normal user basheer Slackware 3 10-24-2009 11:26 PM
Why won't my usb hard drive auto mount when i plug it in xmrkite Linux - Hardware 15 10-01-2008 02:57 PM
using autofs to auto mount my usb drives DesertWolf0132 Slackware 8 07-30-2004 11:27 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:08 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration