LinuxQuestions.org
Review your favorite Linux distribution.
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 01-25-2011, 04:33 PM   #1
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Rep: Reputation: 32
Question How to mount network ntfs drive on linux server and add it on FSTAB


Hello everyone,

I need help mounting network NTFS drive on my linux server. I am using CentOS 5.5 OS. I already install ntfs-3g rpm, but I don't know the command to mount network NTFS drive. I also want to mount it on my fstab file, so whenever it reloads, it can automatically mount on the specific folder.


Best regards,

Rahil Maknojia.
 
Old 01-25-2011, 04:37 PM   #2
fordeck
Member
 
Registered: Oct 2006
Location: Utah
Posts: 520

Rep: Reputation: 61
Have you tried something like this:

Code:
mount.cifs //server/share ~/mount_point/ -o username=user_here
Regards,

Fordeck
 
1 members found this post helpful.
Old 01-25-2011, 05:19 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Quote:
Originally Posted by rahilmaknojia View Post
the command to mount network NTFS drive
Contradiction in terms. NTFS is not a network filesystem. In all likelihood, you mean a CIFS/SMB network share, or you mean an NTFS partition on a dual-boot host. Please clarify.

--- rod.
 
Old 01-25-2011, 05:48 PM   #4
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by theNbomr View Post
Contradiction in terms. NTFS is not a network filesystem. In all likelihood, you mean a CIFS/SMB network share, or you mean an NTFS partition on a dual-boot host. Please clarify.

--- rod.
I am sorry. Well, I have a linux server installed on the Virtual box; and my base machine is running on Windows 7 OS. So basically what I want to do is that I want to map my windows 7 NTFS drive on linux server which is CentOS.
 
Old 01-25-2011, 07:09 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Okay, yet another possibility. I'm not very acquainted with the ins and outs of virtual OS's, but I'm going to guess that the host OS isn't going to expect there to be another OS using it's drive. Therefore, your most probable solution would be to create a network share in the Windows OS, and mount it with the Linux guest OS's SMB/CIFS. For that, start out with (as root):
Code:
mount -t cifs  //the/windows/sharename  /the/linux/mountpoint
Then, you will want to
Code:
man mount.cifs
man mount
man fstab
Those should give you the information to fill in the details and refine the mount. In /etc/fstab, you will probably end up with an entry something like:
Code:
//servername/sharename /mnt/sharename  cifs uid=linuxUsername,gid=linuxGroupname,user=windowsUser,rw,directio,credentials=/etc/samba/smb.creds 0 0
Make a credentials file, readable only by root, so you don't have to type in passwords at boot time (depending on the requirements of the share).

If someone knows how to mount the NTFS drive directly, I hope they speak up.

--- rod.
 
1 members found this post helpful.
Old 01-25-2011, 07:14 PM   #6
warhawk
LQ Newbie
 
Registered: Jan 2011
Location: Houston
Distribution: CentOS5.5
Posts: 2

Rep: Reputation: 1
The drive on the base machine was shared via network already, we were just trying to mount the network drive onto CentOS. This is the command we just used and it worked, thanks all.

Code:
mount.cifs //IP_address/Folder_name  /mnt -o username=user_name
 
1 members found this post helpful.
Old 01-25-2011, 07:31 PM   #7
warhawk
LQ Newbie
 
Registered: Jan 2011
Location: Houston
Distribution: CentOS5.5
Posts: 2

Rep: Reputation: 1
Quote:
Originally Posted by theNbomr View Post
Code:
//servername/sharename /mnt/sharename  cifs uid=linuxUsername,gid=linuxGroupname,user=windowsUser,rw,directio,credentials=/etc/samba/smb.creds 0 0
I am having trouble understanding this command, mostly the last part of it. What is "directio" and everything that comes after that? Also what is the uid and gid?

Thanks
 
Old 01-27-2011, 03:08 PM   #8
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by warhawk View Post
I am having trouble understanding this command, mostly the last part of it. What is "directio" and everything that comes after that? Also what is the uid and gid?

Thanks
Well, I'm not sure, Warhawk. I think lets wait for someone to reply.
 
Old 01-27-2011, 03:27 PM   #9
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
All of the comma-separated items in the entry are the options passed to mount.cifs (standard fstab stuff). Many are optional, and most require local customization. All are explained in the man page for mount.cifs, along with the numerous other possible options.
--- rod.

Last edited by theNbomr; 01-27-2011 at 03:29 PM.
 
Old 01-28-2011, 01:24 AM   #10
rahilmaknojia
Member
 
Registered: Dec 2007
Distribution: RHEL6, CentOS6.3
Posts: 188

Original Poster
Rep: Reputation: 32
Quote:
Originally Posted by theNbomr View Post
All of the comma-separated items in the entry are the options passed to mount.cifs (standard fstab stuff). Many are optional, and most require local customization. All are explained in the man page for mount.cifs, along with the numerous other possible options.
--- rod.
Okay, l ll try this next morning and see if it works. I have a question I will post back.
 
  


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] How did I mount this network drive if it's not in /etc/fstab? martdj Linux - Newbie 4 11-03-2010 05:05 AM
mount network ntfs drive o2bfishn Slackware 4 09-05-2007 05:33 AM
how to mount ntfs drive in Linux shueib Linux - Newbie 1 10-21-2005 10:08 AM
mount network drive fstab/umask? J.Q. Monkey Linux - Newbie 3 02-24-2004 12:49 PM
Setting up r/w NTFS mount in fstab kpw Linux - General 7 01-31-2002 05:52 PM

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

All times are GMT -5. The time now is 12:11 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