LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mounting external hard drive in /etc/fstab (https://www.linuxquestions.org/questions/linux-newbie-8/mounting-external-hard-drive-in-etc-fstab-499292/)

Micro420 11-06-2006 10:45 PM

mounting external hard drive in /etc/fstab
 
2 questions:

1) I'm trying to mount an USB external hard drive for a specific user. This is in my etc/fstab

/dev/sdc1 /media/usbdisk ext3 rw,user,uid=500,gid=users,umask=0022 0 0

I keep getting this error:
[17482743.264000] EXT3-fs: Unrecognized mount option "uid=500" or missing value

What am I missing?

Now if I mount it this way, it works fine, but it belongs to root:
sudo mount /dev/sdc1 /media/usbdisk

Then I have to chown the drive and it gets annoying after every reboot. Any ideas?

2) When booting up the computer, the samba shares in my /etc/fstab don't load up. I have to do sudo mount -a

Here is the entry in /etc/fstab
//192.168.1.5/share /mnt/share cifs auto,credentials=/home/username/.smbpasswd 0 0

Never had this problem when using RedHat. It automounted the samba shares for me immediately. Any ideas? I am using Ubuntu 6.06

blackhole54 11-07-2006 05:12 AM

Quote:

Originally Posted by Micro420
I keep getting this error:
[17482743.264000] EXT3-fs: Unrecognized mount option "uid=500" or missing value

That is what I would expect. The uid=, gid=, and umask= options pertain to fat file systems (and maybe some others) which don't have the ability to assign indivual owners, groups, and permissions to individual files and directories. But ext3 has that ability, and so these options aren't used with it. If your usb drive truly has an ext3 fs on it, with the fs mounted, you should be able to chown and chmod /media/usbdisk and any files and directories within it, and those settings should persist between mounts. If it is not persisting, then something else must be changing them back.

Quote:

2) When booting up the computer, the samba shares in my /etc/fstab don't load up. I have to do sudo mount -a

Here is the entry in /etc/fstab
//192.168.1.5/share /mnt/share cifs auto,credentials=/home/username/.smbpasswd 0 0

Never had this problem when using RedHat. It automounted the samba shares for me immediately. Any ideas? I am using Ubuntu 6.06
You can check the startup scripts. Probably mount -a is run in /etc/rc.d/rc.sysinit, but the network is not running at that point. You could add your mount -a command to /etc/rc.d/rc.local which should execute after the network is started.

Ummm ... I was thinking RH when I talked about rc.sysinit and rc.local. Ubuntu may do something different, but the same concepts should apply (unless you're a victim of their new upstart system).


All times are GMT -5. The time now is 06:57 PM.