Solved

How can mount nfts partition permanent in linux?

Posted on 2009-05-13
13
1,023 Views
Last Modified: 2013-12-16
How can mount nfts partition permanent in linux?
0
Comment
Question by:aloknet21
  • 5
  • 3
  • 2
  • +3
13 Comments
 
LVL 3

Expert Comment

by:razorwoods1
ID: 24381929
You set this in the /etc/fstab

Something like this:
10.10.10.34:/vol1      /EXPORT   nfs     defaults,nfsvers=3     0  0

(IP address & Mount) (local mount) nfs  (options on the mount) (recover options)

0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24381948
Hi,

First of all you need the ntfs-3g driver to mount NTFS read/write. Th default dirver is read-only. After installing the driver you can either mount your volumes with mount  or you can add them into /etc/mtabso that they will be mounted permannetly and be remounted after reboot.

Here's the page for ntfs-3g:
http://www.ntfs-3g.org/
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24381958
I mean "/etc/mtab so that .." not "/etc/mtabso"

Cheers,
K.
0
 
LVL 9

Expert Comment

by:mgonullu
ID: 24381959
To make the mount permanent you have to add the auto in the /etc/fstab file next to the partition type
for example:

https://help.ubuntu.com/community/Fstab
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24381998
Yeah guys you're right it should be  /etc/fstab sorry my bad. Developing a kernel module lately and kinda brain-dead :)
0
 
LVL 3

Expert Comment

by:razorwoods
ID: 24382155
I'm sorry but KeremE is incorrect , the line I put in for /etc/fstab does not in any way denote read only because of the ' defaults ' setting.

Also I'm assuming you can manually mount via NFS at the command line and just want to know how to make it auto mount on boot and stay mounted.  This would mean he already has the various NFS packages installed and working.

My line is correct as written for this in read/write mode , for RedHat, CentOS, Debian, Fedora, etc...


0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 3

Expert Comment

by:razorwoods
ID: 24382162
Also mgonullu is incorrect about the use of ' auto ' , my line is specifying the type.  Using auto would allow the OS to 'auto' select.  You never want this with NFS.
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24382351
@razorwoods:

> I'm sorry but KeremE is incorrect , the line I put in for /etc/fstab does not in any way denote read only
> because of the ' defaults ' setting.

It has nothing to do with where you put the line since the built-in NTFS driver supports only Read-Only access . There were some patches but ther was a stability problem. This is why I've suggested NTFS-3G. It is simply *NOT* possible to use the built in kernel driver in  production environment for read/write access.

The developer himself comments about why did he wrote NTFS-3G. He is one of the initial developers of Linux Kernel NTFS drivers:

 HOWTO: NTFS with read/write support using the ntfs-3g (easy & safe method)
Introduction :

Support of NTFS partition for linux has always been a problem. Projects exist since many years but was always experimental, and was claim to be not safe. On the 14th of July 2006, a developer of the linux-ntfs team, Szabolcs Szakacsits, revolution this area by releasing a new driver ntfs-3g which claimed to provide full read/write support for all NTFS partition. After months of successful testing by hundreds of thousands of users in beta status, ntfs-3g is now fully stable.

For more information on ntfs-3g : http://www.ntfs-3g.org/

0
 
LVL 3

Expert Comment

by:razorwoods
ID: 24382441
I think the issue here is that he posted this as wanting to mount ' nfts ' , you saw NTFS, and I saw NFS.

If he meant NTFS and just typo'd it , you are correct.

The line would read something like this:

/dev/sda1 /mnt/windows ntfs-3g defaults 0 0



0
 
LVL 7

Expert Comment

by:darrickhartman
ID: 24384314
ntfs-3g is part of the 'FUSE' project.  You may need to install some additional packages depending on your Distro and version of Linux.

In CentOS 5 you would need to enable an additional respository (rpm fusion) and add the following packages:

fuse-2.7.4-1.el5.rf
fuse-ntfs-3g-2009.2.1-1.el5.rf
dkms-fuse-2.7.4-1.nodist.rf

Other systems will require similar packages (but they may already be installed).  Issuing modprobe ntfs-3g should tell you if it's been installed.

The syntax taht razorwoods has in the previos comment is correct then, but for clarification, the '0 0' means that file system will not be checked at boot up.  (you can't, because there is no ntfsck utility to check a ntfs partition at boot at this time).
0
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 24384563
make sure your kernel support ntfs mountpoint by mounting it manually with following command, here hda3 is an example for your it can be different.
once you think its mouted by verifying the files inside the c directory add following entries to to /etc/fstab
/dev/hda1 /mnt/windows            ntfs               rw                                    0 0

Following links should give more reference
http://www.cyberciti.biz/faq/linux-mount-ntfs-or-access-ntfs-partition-from-linux/
http://www.linux-faqs.com/faq/misc/ntfs.php

#mount -t ntfs /dev/hda3 /media/c -rw

#cd /media/c

Open in new window

0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 24402353
@darrickhartmann:

> ntfs-3g is part of the 'FUSE' project.  You may need to install some additional packages depending on
> your Distro and version of Linux.

This is quite wrong. They are unrrelated and diffrent projects in that all ntfs-3g needs is to be compiled with FUSE support. FUSE is smply allowing secuirty with SUID with non-root users.

> In CentOS 5 you would need to enable an additional respository (rpm fusion) and add the following
> packages:

This is also incorrect in that rpm fusion repositories, unlike Fedora Core repositories, CentOS 5 repositories only include some extra update databases and not base or add-on repositories. So to enable ntfs-3G on CentOS 5 the only valid method for the time being is to get it as the NTFS-3G page suggests here::

http://marush.com/category/linux/rpm/rhel5/
 
Cheers,
K.
0
 
LVL 7

Accepted Solution

by:
darrickhartman earned 250 total points
ID: 24403225
@KeremE

You are correct of course.  In any case, to have stable, working, read-write support in Linux, the user needs to use NTFS-3G and NOT the ntfs kernel included module.  

So after installing NTFS-3G, edit the /etc/fstab as KeremE indicated and you should be good to go.  Please assign the points to KeremE.  His answer is correct.  I was only trying to clarify which I botched to some degree.




0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now