Questions tagged [fstab]

The configuration file /etc/fstab contains the necessary information to automate the process of mounting partitions.

The configuration file /etc/fstab contains the necessary information to automate the process of mounting partitions. In a nutshell, mounting is the process where a raw (physical) partition is prepared for access and assigned a location on the file system tree (or mount point).

* In general fstab is used for internal devices, CD/DVD devices, and network shares (samba/nfs/sshfs). Removable devices such as flash drives *can* be added to fstab, but are typically mounted by gnome-volume-manager and are beyond the scope of this document.
* Options for mount and fstab are similar.
* Partitions listed in fstab can be configured to automatically mount during the boot process.
* If a device/partition is not listed in fstab ONLY ROOT may mount the device/partition.
* Users may mount a device/partition if the device is in fstab with the proper option

SOURCE: https://help.ubuntu.com/community/Fstab

241 questions
214
votes
2 answers

How do I do 'mount --bind' in /etc/fstab?

I'm trying to add mount --bind /proc/ /chroot/mysql/proc to /etc/fstab. How can I do this?
Some Linux Nerd
  • 3,157
  • 3
  • 18
  • 20
172
votes
8 answers

How do you validate fstab without rebooting?

I modified /etc/fstab. I verified the new devices and I can mount them with the mount command. How may I validate the modifications made to /etc/fstab ?
Luc M
  • 2,890
  • 4
  • 25
  • 27
74
votes
1 answer

Explanation of nodev and nosuid in fstab

I see those two options constantly suggested on the web when someone describes how to mount a tmpfs or ramfs. Often also with noexec but I'm specifically interested in nodev and nosuid. I basically hate just blindly repeating what somebody…
Ivan Kovacevic
  • 1,671
  • 3
  • 14
  • 19
60
votes
7 answers

How to change owner of mount point

We have moved mysql data directory to another disk, so now /var/lib/mysql is just a mount point to another partition. We set the owner of the /var/lib/mysql directory to mysql.mysql. But everytime we mount the partition, the ownership changes to…
Arie K
  • 1,583
  • 5
  • 18
  • 27
47
votes
3 answers

Do I need to restart my server after editing fstab and mtab?

I'm just wondering if I need to restart my server after editing fstab and mtab. I changed something in this file manually due to problem with awstats report. I am using ISPConfig 3 with the help of the tutorial from howtoforge. But due to…
jaypabs
  • 773
  • 2
  • 9
  • 15
31
votes
2 answers

fstab filesystem type for NTFS -- 'ntfs' or 'ntfs-3g'?

I have a question about the difference between 'ntfs' and 'ntfs-3g' in the filesystem type field in the /etc/fstab file. My Linux distribution is Xubuntu; I suppose the answer may well vary between distros. My question is basically which is best to…
Joseph
  • 413
  • 1
  • 4
  • 5
24
votes
4 answers

ln -s vs mount --bind

Is there any practical difference between using ln -s or mount --bind? I want to move some folders to another partition, without changing their daemon setting, and wonder what approach I should take. I prefer ln -s as it requires minimum setup (no…
SyRenity
  • 3,159
  • 11
  • 55
  • 79
20
votes
4 answers

/etc/fstab skip on error

Can I set an /etc/fstab with options=auto to be skipped if mounting fails? The manual says, it will break the boot process if an entry with options=auto fails. Without auto, it does not automatically mount the device on boot. So how to make the auto…
ledy
  • 515
  • 1
  • 6
  • 15
18
votes
4 answers

fstab and cifs mounting, possible to store authentication information outside of fstab?

I am currently using cifs to mount some network shares (that require authentication) in /etc/fstab. It works excellently, but I would like to move the authentication details (username/pass) outside of fstab and be able to chmod it 600 (as fstab can…
TJ L
  • 424
  • 3
  • 7
  • 18
17
votes
2 answers

Debugging fstab problems on reboot

After a reboot, some partitions which were mentioned in fstab were not mounted as expected. The format of the line for the partitions which were mounted correctly and those which were not mounted correctly look the same so I am wondering whether…
Stuart Woodward
  • 1,343
  • 4
  • 14
  • 29
16
votes
2 answers

CIFS mount in fstab succeeds on IP, fails on hostname written in /etc/hosts

I wonder why my Ubuntu Server 14.04 LTS has problems resolving a hostname from fstab. I tried to mount the following entry: //NAS-5h2-20/backuppc/ /mnt/backuppc cifs auto,user=THEUSER,password=THEPASSWORD,cifsacl,uid=109 0 0 the…
Nachtexpress
  • 163
  • 1
  • 1
  • 5
14
votes
2 answers

fstab entry to mount NFS with password

i need mount at boot a disk using NFS, to mount manually from console i type: mount //192.168.0.1/NASShare -o username=administrator,password=pass /mnt/NAS To /etc/fstab i added this line: 192.168.0.1:/NASShare /mnt/NAS nfs…
hellb0y77
  • 955
  • 5
  • 11
  • 21
13
votes
2 answers

CIFS mounts hang on read

I have a problem with a bunch of CIFS mounts that look like this: //192.168.10.2/remote-share /home/windows-shared/remote-share cifs defaults,user=xxx,password=xxx,uid=603,gid=603 0 0 This issue occurs after a while, usually after a day when…
12
votes
1 answer

Update crypttab asks for Passphrase for fstrim

This is kind of a continuation of - How to get free space from mounted drive Redhat 7 The problem I am facing is when i run: [root@x011dc01-rhtest /]# fstrim -v / I get the following error: fstrim: /: the discard operation is not…
Anthony Fornito
  • 9,526
  • 1
  • 33
  • 122
11
votes
3 answers

nfs, execution denied

I have server (debian 6) machine (say, ip = 10.13.13.100) with nfs exports /etc/exports /path/to/my/shared/folder 10.13.13.0/24(rw,async,no_sub_tree_check,no_root_squash) There are two users on this machine admin (uid = 1000) and user (uid =…
yakki
  • 123
  • 1
  • 1
  • 6
1
2 3
16 17