How do I automount usb drives on server?
I'm trying to use usb drives for samba shares on my server. Having lots of problems but I feel like it's because the drives aren't mounting. This is on Centos 6.5. I just logged onto the gui and one drive popped up eventually and the other I had to mount through disk management. They both mount to /media and that's the path I'm using in my smb.conf and I can't connect to the shares but I feel like this is the problem that they are not mounted unless I log onto the server and then they auto mount after a long delay or I manually mount them. When the server is idle with no log on I imagine the drives are not mounted. Can I just edit fstab to add them?
|
1 Attachment(s)
How do I determine if the mount issue is my problem? When I mount a drive in the gui it is mounted /media/backup. I can access the drive through the gui and it's fine.
Now I am ssh into the server. I Code:
cd /media I tried Code:
mount /media/backup Code:
[mntent]: line 6 in /etc/fstab is bad Code:
smbpasswd -a ryan Unhandled error message: Failed to mount Windows share: Permission denied My smb config looks like this: [backup] path = /media/backup valid users = ryan read only = No guest ok = Yes available = yes browsable = yes create mask = 0777 directory mask = 0777 The frustrating thing is I had this working before with the same drive and same settings on this server. I have since reintalled the OS to start from scratch but set everything up the same |
Check out my 1 blog entry for NTFS-related issue/help. ;)
|
quick update. I am using samba swat to manage the shares to make it as easy as possible. I just added myself to the admin group for the shares and I can mount the share but the folder is empty.
That leads me back to believing that the actually usb drive is not mounted properly on the server. |
Quote:
|
Sorry about "that". I assumed NTFS for "some reason". :(
Make a Code:
sudo /media/some_directory Code:
sudo mount -t auto /dev/sdXn /media/some_directory Code:
sudo mount -t ext4 /dev/sdXn /media/some_directory Code:
/dev/sdXn /media/some_directory ext4 defaults 1 2 if you mounted it manually already in terminal as root (or sudo) you can test the /etc/fstab using Code:
sudo umount /media/some_directory Code:
sudo mount -a Do you know how to find that out? Let us know! |
Quote:
|
Plug the drive in (automount is ok if it does this)
and open terminal and type Code:
mount | grep sd show us the output. John |
My "/media/some_directory" example is "/media/backup" in your case.
|
Quote:
|
Is it now working?
|
Quote:
|
sure thing!
Subscribed with interest.... |
Quote:
Code:
/dev/sdc1 on /boot type ext4 (rw) When I : Code:
lsusb Code:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub |
Code:
lsblk |
All times are GMT -5. The time now is 08:27 AM. |