<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dikapediav2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Fstab</id>
	<title>Fstab - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://dikapediav2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Fstab"/>
	<link rel="alternate" type="text/html" href="https://dikapediav2.com/wiki/index.php?title=Fstab&amp;action=history"/>
	<updated>2026-05-15T09:15:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://dikapediav2.com/wiki/index.php?title=Fstab&amp;diff=83&amp;oldid=prev</id>
		<title>Ardika Sulistija: Created page with &quot;ADD NOTES: https://xan.manning.io/2017/05/29/best-practice-for-mounting-an-lvm-logical-volume-with-etc-fstab.html  &lt;b&gt;/etc/fstab&lt;/b&gt; - static information about the filesystems (aka file system table)   The  file  fstab  contains descriptive information about the filesystems the system can mount.  &lt;b&gt;fstab&lt;/b&gt; is only read by programs, and not written; It is the duty of the system administrator to properly create and maintain this  file.  The order of records in fstab is...&quot;</title>
		<link rel="alternate" type="text/html" href="https://dikapediav2.com/wiki/index.php?title=Fstab&amp;diff=83&amp;oldid=prev"/>
		<updated>2024-08-27T00:17:57Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;ADD NOTES: https://xan.manning.io/2017/05/29/best-practice-for-mounting-an-lvm-logical-volume-with-etc-fstab.html  &amp;lt;b&amp;gt;/etc/fstab&amp;lt;/b&amp;gt; - static information about the filesystems (aka file system table)   The  file  fstab  contains descriptive information about the filesystems the system can mount.  &amp;lt;b&amp;gt;fstab&amp;lt;/b&amp;gt; is only read by programs, and not written; It is the duty of the system administrator to properly create and maintain this  file.  The order of records in fstab is...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;ADD NOTES: https://xan.manning.io/2017/05/29/best-practice-for-mounting-an-lvm-logical-volume-with-etc-fstab.html&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;/etc/fstab&amp;lt;/b&amp;gt; - static information about the filesystems (aka file system table)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The  file  fstab  contains descriptive information about the filesystems the system can mount.  &amp;lt;b&amp;gt;fstab&amp;lt;/b&amp;gt; is only read by programs, and not written; It is the duty of the system administrator to properly create and maintain this  file.  The order of records in fstab is important because &amp;lt;b&amp;gt;fsck(8)&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;[[Mount|mount]](8)&amp;lt;/b&amp;gt;, and &amp;lt;b&amp;gt;umount(8)&amp;lt;/b&amp;gt; sequentially iterate through fstab doing their thing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file systems specified in this file get mounted automatically as the system boots up. Primary way for the system to automatically mount files. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Fstab Examples====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With block device name:&lt;br /&gt;
 # /etc/fstab: static file system information.&lt;br /&gt;
 # &amp;lt;file system&amp;gt;         &amp;lt;mount point&amp;gt;   &amp;lt;type&amp;gt;  &amp;lt;options&amp;gt;       &amp;lt;dump&amp;gt;  &amp;lt;pass&amp;gt;&lt;br /&gt;
 proc                    /proc           proc    defaults        0       0&lt;br /&gt;
 /dev/sda1               /               ext3    defaults        0       0&lt;br /&gt;
 /dev/sda2               swap            swap    defaults        0       0&lt;br /&gt;
 /dev/sda3               /var            ext3    defaults        0       0&lt;br /&gt;
 /dev/sdb1               /home           ext3    defaults        0       0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With UUID (my RHEL 7 instance):&lt;br /&gt;
 $ cat /etc/fstab&lt;br /&gt;
 # /etc/fstab&lt;br /&gt;
 # Created by anaconda on Wed Oct 17 12:18:06 2018&lt;br /&gt;
 # &lt;br /&gt;
 # Accessible filesystems, by reference, are maintained under &amp;#039;/dev/disk&amp;#039;&lt;br /&gt;
 # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info&lt;br /&gt;
 #&lt;br /&gt;
 UUID=88fd4d41-c180-4721-80c6-535249a4a2bb /                       xfs     defaults        0 0&lt;br /&gt;
 UUID=8d978988-9373-4f8d-9c73-2896d4a4c334 /var/log/important_app_logs ext4 defaults 0 0&lt;br /&gt;
 UUID=f5367baf-5afd-4d52-afa7-d8840b69fe7b /home/ec2-user ext4 defaults 0 0&lt;br /&gt;
 UUID=80c3e45d-cb48-49a1-9ccc-215876091a7b /home/ardika ext4 defaults 0 0&lt;br /&gt;
&lt;br /&gt;
* Using UUID (Universally Unique Identifier) is the ideal way to specify the file systems for mounting, because the system can load the file systems/partition in a different order. Potentially messing the order around (sda, sdb, sdc is not always the same drive, or same order).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
My Prod env:&lt;br /&gt;
 $ cat /etc/fstab&lt;br /&gt;
 #&lt;br /&gt;
 UUID=afcf1342-1d40-41bd-bde9-e4ea5d87e3b6     /           xfs    defaults,noatime  1   1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Fstab Contents====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;b&amp;gt;Block device name&amp;lt;/b&amp;gt;, &amp;lt;b&amp;gt;Label&amp;lt;/b&amp;gt;, or &amp;lt;b&amp;gt;UUID&amp;lt;/b&amp;gt;.&lt;br /&gt;
* The &amp;lt;b&amp;gt;mount point&amp;lt;/b&amp;gt; (root mount point, and whatever else you got).&lt;br /&gt;
* The &amp;lt;b&amp;gt;file system type&amp;lt;/b&amp;gt; (ext2, ext3, ext4, xfs, etc.) &lt;br /&gt;
* &amp;lt;b&amp;gt;Options&amp;lt;/b&amp;gt;: (To list multiple option flags, separate by commas, no space.)&lt;br /&gt;
** &amp;lt;b&amp;gt;auto/noauto&amp;lt;/b&amp;gt;: auto mount on boot (or whenever mount -a is ran) or not.&lt;br /&gt;
** &amp;lt;b&amp;gt;exec/noexec&amp;lt;/b&amp;gt;: execute binaries or not&lt;br /&gt;
** &amp;lt;b&amp;gt;ro/rw&amp;lt;/b&amp;gt;: read only, read-write&lt;br /&gt;
** &amp;lt;b&amp;gt;sync/async&amp;lt;/b&amp;gt;: Sync forces writing to occur immediately on execution of the command. Ideal for floppies and USBs but not internal drives. Async allows to execute over an elapsed time period. &lt;br /&gt;
** &amp;lt;b&amp;gt;Nouser/user&amp;lt;/b&amp;gt;: allow user to have mounting/unmounting privileges.&lt;br /&gt;
** &amp;lt;b&amp;gt;Default&amp;lt;/b&amp;gt;: default setting are defined per file system at the file system level.&lt;br /&gt;
* Binary value “0” for false, “1” for true, for &amp;lt;b&amp;gt;dumping&amp;lt;/b&amp;gt;. (outdated method of back up, recommend to leave as 0)&lt;br /&gt;
* Last option is a numeric value for “&amp;lt;b&amp;gt;passing&amp;lt;/b&amp;gt;”. This tells the system the order in which to fsck, or perform a file system check. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Using /etc/fstab====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have made a new entry in /etc/fstab, you can test if the automatic mount will be successful by running the &amp;lt;b&amp;gt;[[Mount|mount]]&amp;lt;/b&amp;gt; command:&lt;br /&gt;
 $ sudo mount -a&lt;br /&gt;
&lt;br /&gt;
-a, --all&lt;br /&gt;
: Mount  all  filesystems  (of the given types) mentioned in fstab (except for those whose line contains the noauto keyword).  The filesystems are mounted following their order in fstab. Be sure to unmount the file system first before running it or else you will get an error saying &amp;quot;already mounted&amp;quot; or something like that. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Using init=/bin/bash when system is booting to Emergency Mode====&lt;br /&gt;
----&lt;br /&gt;
This method works on a workstation.&lt;br /&gt;
&lt;br /&gt;
You can use this method if a user has misconfigured an /etc/fstab entry.&lt;br /&gt;
&lt;br /&gt;
# On boot/grub menu, select &amp;quot;e&amp;quot; to edit the kernel boot line. At the end of the line, add &amp;quot;&amp;lt;b&amp;gt;init=/bin/bash&amp;lt;/b&amp;gt;&amp;quot;. Ctrl-X to continue the boot process.&lt;br /&gt;
# After the above was done, you end up at a shell prompt.&lt;br /&gt;
# The root filesystem is read-only, so we had to remount it with rw permissions by running: &amp;quot;&amp;lt;b&amp;gt;mount -o remount,rw /&amp;lt;/b&amp;gt;&amp;quot;&lt;br /&gt;
# Edit /etc/fstab as needed.&lt;br /&gt;
# Reboot system&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
References:&amp;lt;/br&amp;gt;&lt;br /&gt;
[+] https://www.howtogeek.com/howto/38125/htg-explains-what-is-the-linux-fstab-and-how-does-it-work/&lt;/div&gt;</summary>
		<author><name>Ardika Sulistija</name></author>
	</entry>
</feed>