Link to home
Start Free TrialLog in
Avatar of aloknet21
aloknet21Flag for India

asked on

How can mount nfts partition permanent in linux?

How can mount nfts partition permanent in linux?
Avatar of razorwoods1
razorwoods1

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)

Avatar of Kerem ERSOY
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/
I mean "/etc/mtab so that .." not "/etc/mtabso"

Cheers,
K.
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
Yeah guys you're right it should be  /etc/fstab sorry my bad. Developing a kernel module lately and kinda brain-dead :)
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...


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.
@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/

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



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).
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

@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.
ASKER CERTIFIED SOLUTION
Avatar of darrickhartman
darrickhartman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial