LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to mount network ntfs drive on linux server and add it on FSTAB (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-mount-network-ntfs-drive-on-linux-server-and-add-it-on-fstab-858645/)

rahilmaknojia 01-25-2011 04:33 PM

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.

fordeck 01-25-2011 04:37 PM

Have you tried something like this:

Code:

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

Fordeck

theNbomr 01-25-2011 05:19 PM

Quote:

Originally Posted by rahilmaknojia (Post 4237624)
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.

rahilmaknojia 01-25-2011 05:48 PM

Quote:

Originally Posted by theNbomr (Post 4237665)
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.

theNbomr 01-25-2011 07:09 PM

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.

warhawk 01-25-2011 07:14 PM

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

warhawk 01-25-2011 07:31 PM

Quote:

Originally Posted by theNbomr (Post 4237743)
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

rahilmaknojia 01-27-2011 03:08 PM

Quote:

Originally Posted by warhawk (Post 4237760)
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.

theNbomr 01-27-2011 03:27 PM

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.

rahilmaknojia 01-28-2011 01:24 AM

Quote:

Originally Posted by theNbomr (Post 4239928)
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.


All times are GMT -5. The time now is 07:08 PM.