LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-12-2012, 12:31 PM   #1
profector21
LQ Newbie
 
Registered: Apr 2012
Location: Olathe, KS USA
Distribution: RHEL 6
Posts: 11
Blog Entries: 1

Rep: Reputation: Disabled
Filesystem Mounts to Wrong Place


Hey all. First post so I'll say alittle about me and then more on the first problem. I'm been an Windows Network Administrator forthe last few years, with several year of previous IT work. When it comes to Windows Networks and light programming in VB and C I know enough to get the basic task done and enough to find help when I need it. Recently I bought a new box and Linux RHEL 6. This is my first Linux server in a production enviroment. I've played with a few live distros over the years, but aways when back to Windows because I couldn't seem to find the answers to my questions when I had them. This time though, I'm invested and it's time to learn.

This server's main purpose is to shared files on the network through SAMBA and an FTP. The machine didn't have Gnome installed, so I added that. I wanted a dedicated partition for the file sharing, so I popped in 4 - 500g SAS drive and, using the RAID controller, set them up with in a 1+0 array. Now onto the problem. The filesystem doesn't mount automaticly when the computer reboots. I need to tell it to mount, and when it does mount it's alway in /media/ . I'm guessing that when I was trying to figure how out to mount it the first time I musta have followed a tutorial on mounts thumb drives or floppies maybe.

If anyone could point me in the right direction, that would be great.

I'm also looking for a few books on SAMBA particurly using the windows active directory, Transitioning from Windows to Linux, RHEL for dummies or something like that. If anyone know of a few good one's I'd like the names. Someone suggested I look at Sams Teach your self SAMBA in 24 Hours, but it was published in 1999 and I assume alot has changed since then.
 
Old 04-12-2012, 12:53 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Welcome to the dark side.

When you say "the filesystem" are you talking about a filesystem you built on the RAID you created or about a Windows Share you're trying to mount to Linux with Samba?

On the Linux system there is a file called /etc/fstab that contains the filesystems to mount automatically at boot. Is the filesystem you're trying to mount in this file? If not adding it with appropriate parameters would work. (Once you add it you can simply type "mount <dirname>" and it will read the rest of what it needs from the fstab entry.)

/media is often used for removable media like CD-ROM, DVD or Flash drives so it may be you set this filesystem to mount that way. There is nothing prohibiting mounting anything you want on /media since it is just a directory but it would be atypical to mount other things there.

To mount a filesystem you need a mount point which is simply a directory. You could mount on /media, /media/billybob, or /media/myfilesystem so long as the directory exists. It would be more common to set mountpoint somewhere else if it is not removable media. So you could mount it as /myfilesystem, /my/long/path/name/for/mounting/myfilesystem etc... so long as the full path to the directory exists. As can be seen it can be as short as a subdirectory of root (/) or a long one.

The mkdir command is used to make directories. It even has a -p option to make intervening directories if they don't already exist. On Linux if you want to find out about concepts/commands you can use the "man" command to read manual pages. So if you type "man mkdir" it will give you more details of that command or "man fstab" it will give you more details of expected entries in that file. Also you can type "man -k <anything>" to see if man has any man pages that relate to whatever you're looking for. (e.g. "man mount" shows you details of the mount command but "man -k mount" would show you any man page that references "mount" even if the name of the command is not mount.)

Last edited by MensaWater; 04-12-2012 at 12:55 PM.
 
1 members found this post helpful.
Old 04-12-2012, 01:04 PM   #3
profector21
LQ Newbie
 
Registered: Apr 2012
Location: Olathe, KS USA
Distribution: RHEL 6
Posts: 11

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
I added this line to fstab

/dev/sdb1 /f ext3 defaults 1 2


not sure what the "1 2" means but it was on one of the lines above it. I'll have to wait till this evening to umount it from /media/f and reboot to see if it takes.
 
Old 04-12-2012, 01:39 PM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,344

Rep: Reputation: Disabled
Quote:
Originally Posted by profector21 View Post
I added this line to fstab

/dev/sdb1 /f ext3 defaults 1 2


not sure what the "1 2" means but it was on one of the lines above it. I'll have to wait till this evening to umount it from /media/f and reboot to see if it takes.
The line in fstab means:
"mount the filesystem on device /dev/sdb1 in folder /f, assume the filesystem is ext3, use the default settings for ext3 (do not activate any special features like quotas or ACLs), the file system should be backed up by dump, and fsck should check the filesystem at boot (priority 2)"
Unless you're actually using dump for backups (highly unlikely), the dump field should be 0. See man fstab for more detailed informastion.

Also, you don't have to reboot to see if it works. mount -o remount /f will read fstab and remount the device currently mounted on /f using the new settings. Again, the man pages have some useful information (man mount).
 
1 members found this post helpful.
Old 04-12-2012, 04:21 PM   #5
profector21
LQ Newbie
 
Registered: Apr 2012
Location: Olathe, KS USA
Distribution: RHEL 6
Posts: 11

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
That did the trick. I wasn't able to use mount -o remount /f. When I tried it told me that it was busy, I think it was samba keeping it busy. But after I rebooted it mounted correctly. I actaully had the filesystem wrong it is ext4. And I removed the dump.

Regarding the mount options, is this where I can add an option that will allow me to save folder permissions that a Windows computer changed using samba? I've joined the domain and can use active directory permissions to access samba shares, but if I try to change the share permissions using a Windows computer I get a message telling me access is denied. Perhaps this should be a new thread?
 
Old 04-12-2012, 04:32 PM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,344

Rep: Reputation: Disabled
On Windows systems, file permissions are stored in ACLs in the NTFS file system. (You knew that, right?)

The various file systems supported by the Linux kernel do have ACL support, but as you've deduced, these features need to be activated by specifying the right parameters during mount. This can be done manually or in fstab.

And yes, a new thread would probably be a good idea.

Last edited by Ser Olmy; 04-12-2012 at 04:35 PM.
 
1 members found this post helpful.
Old 04-12-2012, 04:48 PM   #7
profector21
LQ Newbie
 
Registered: Apr 2012
Location: Olathe, KS USA
Distribution: RHEL 6
Posts: 11

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Thanks for the help. That one worked out too.

I found a post that read

Quote:
if you have ext3/4, enable acl and user_xattr on mount end (mount -o
acl,user_xattr,remount /usr/local/data),

on global:
nt acl support = yes (this is the default since 2)

on a share, enable:
inherit acls = yes
Updated the fstab and smb.conf files with the correct options and it worked.

I did know the NTFS stored the permissions, but I didn't know about the Access Control Lists
 
Old 04-12-2012, 06:14 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Here's the RHEL6 Deployment manual http://www.linuxtopia.org/online_boo..._6_deployment/ & if you go up the path, you'll see a load of RHEL6 manuals and others eg most of the info on RHEL 5 is still relevant.

See also
http://linux.die.net/man/ - nice searchable html version of manpages
http://rute.2038bug.com/index.html.gz - a good cmd line tutorial for Linux (mostly RHEL based); a bit old but still good
 
1 members found this post helpful.
Old 04-13-2012, 08:15 AM   #9
profector21
LQ Newbie
 
Registered: Apr 2012
Location: Olathe, KS USA
Distribution: RHEL 6
Posts: 11

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
Thank you. I'm sure I'll be using those links. While I am now able to save domain permissions for samba shares, samba doesn't appear to be using them. So I'll start a new thread on that if I can't get it figured out in the next day or so.
 
  


Reply



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
[SOLVED] Mplayer place in KDE, lost icon, wrong place. firekage Slackware 4 01-24-2012 02:23 PM
NFS mounts read-only filesystem only Quip11 Linux - Networking 1 10-30-2011 12:45 PM
Root Filesystem (/) Mounts as Read-only emkelly Red Hat 2 12-09-2009 02:08 PM
grub mounts wrong partition linuxer12 Linux - General 10 11-07-2007 03:09 AM
IPod mounts to wrong place, gtkpod can't read DB. dark_prancer Linux - Hardware 1 09-24-2005 09:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:39 AM.

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