Wise people learn when they can; fools learn when they must - Arthur Wellesley

Friday, 25 November 2016

LINUX-5 DISK & FILE SYSTEM OPERATIONS




LINUX-5 DISK & FILE SYSTEM OPERATIONS

What we are about to learn,
·         Prtitioning
·         MBR/GPT Partitions
·         View partition table
·         Disk types
·         Creating Partitions with FDISK/GDISK
·         Deleting Partition
·         Creating File System
·         Mounting / Unmounting
·         Permanent Mount
·         Disk Buffer/Cache
·         Adding Swap Partitions
·         Adding Swap Files
·         Making Swap Partitions/Files Permanent
·         Automatic Mounting (Fields in /etc/fstab)
·         Various Mount Options in /etc/fstab


Disk partitions are subdivision of whole disk space. Partition info is fetched from Partition Table. The traditional table is one which is found under MBR (Master Boot Record). Newer one is GPT (Globally Unique Identifier Partition Table).

PARTITIONING TOOLS:

PARTED: text based tool supports MBR/GPT
GPARTED: graphical version of parted
FDISK: conventional linux tool,does not support GPT.
GDISK: version of fdisk supports GPT but not MBR.

PARTITION TABLE:

#parted -l
#fdisk -l
#fdisk -l /dev/sda
#fdisk -l /dev/sdb

MBR table contains following partitions,

PRIMARY
EXTENDED
LOGICAL

Primary partitions are normal subdivision of disk, basic MBR has a limit of 4 primary partitions, so if we want more than 4 partitions then we should mark one partition as an EXTENDED, next we need to subdivide the Extended partition into LOGICAL partitions.

View partition table info,

[root@rhel7-server ~]# cat /proc/partitions

Force the kernel to reload the partition table,

[root@rhel7-server ~]# blockdev --rereadpt /dev/sde
[root@rhel7-server ~]# blockdev --rereadpt /dev/sdb
BLKRRPART: Device or resource busy

DISK DEVICE TYPES:
/dev/sda   scsi drives, used for scsi/sata HDD’s.
/dev/had   IDE disk device
/dev/vda   disk in KVM uses virtio disk drives.
/dev/xvda  disk in xen virtual machine uses xen virtual disk driver.

CREATING MBR PARTITION WITH FDISK:

[root@rhel7-server ~]# fdisk /dev/sde
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x754ea700.

Command (m for help): p  ç

Disk /dev/sde: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x754ea700

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n ç
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p ç
Partition number (1-4, default 1): 1 ç
First sector (2048-41943039, default 2048):
Using default value 2048
Last sector,+sectors or +size{K,M,G} (2048-41943039,default 41943039):+500M ç
Partition 1 of type Linux and of size 500 MiB is set

Command (m for help): p ç

Disk /dev/sde: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x754ea700

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048     1026047      512000   83  Linux

Command (m for help): t ç
Selected partition 1
Hex code (type L to list all codes): 83 ç
Changed type of partition 'Linux' to 'Linux'

Command (m for help): p ç

Disk /dev/sde: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x754ea700

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048     1026047      512000   83  Linux

Command (m for help): w ç
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

[root@rhel7-server ~]# partprobe /dev/sde

[root@rhel7-server ~]# fdisk -l /dev/sde

Disk /dev/sde: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x754ea700

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048     1026047      512000   83  Linux

[root@rhel7-server ~]# cat /proc/partitions
major minor  #blocks  name

   2        0          4 fd0
   8        0   20971520 sda
   8        1     716800 sda1
   8        2    2097152 sda2
   8        3    1048576 sda3
   8        4          1 sda4
   8        5   15360000 sda5
   8       16   20971520 sdb
   8       17    1048576 sdb1
   8       32   20971520 sdc
   8       48   20971520 sdd
   8       64   20971520 sde
   8       65     512000 sde1
  11        0    4139008 sr0

CREATING GPT PARTITIONS WITH GDISK:

If disk is configured with GUID partition table, or it is a new disk that does not contain anything, and has a size greater than 2 TB, Then we need to use “gdisk” utility.

** Do not use gdisk on a disk that has been formatted with fdisk or having already fdisk partitions. Gdisk will convert MBR to GPT and obveiously all data gone, and if it is root disk then system will not boot.

[root@rhel7-server ~]# gdisk /dev/sdd
GPT fdisk (gdisk) version 0.8.6

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.

Command (? for help): n ç
Partition number (1-128, default 1):1 ç
First sector (34-41943006, default = 2048) or {+-}size{KMGTP}: ç
Last sector (2048-41943006, default = 41943006) or {+-}size{KMGTP}: +1G ç
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): l ç
Hex code or GUID (L to show codes, Enter = 8300): 8300 ç
Changed type of partition to 'Linux filesystem'

Command (? for help): p ç
Disk /dev/sdd: 41943040 sectors, 20.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 8572F0AE-90EE-4378-AB87-58D8310BD72B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 41943006
Partitions will be aligned on 2048-sector boundaries
Total free space is 39845821 sectors (19.0 GiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         2099199   1024.0 MiB  8300  Linux filesystem

Command (? for help): w ç

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y ç
OK; writing new GUID partition table (GPT) to /dev/sdd.
The operation has completed successfully.

DELETING PARTITION:

[root@rhel7-server tdir2]# fdisk /dev/sdd

Disk label type: gpt


#         Start          End    Size  Type            Name
 1         2048      2099199      1G  Linux filesyste Linux filesystem
 2      2099200      4196351      1G  Linux filesyste

Command (m for help): m ç
Command action
   d   delete a partition
   g   create a new empty GPT partition table
   G   create an IRIX (SGI) partition table
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   w   write table to disk and exit

Command (m for help): d ç
Partition number (1,2, default 2): 2 ç
Partition 2 is deleted

Command (m for help): p ç

Disk /dev/sdd: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: gpt


#         Start          End    Size  Type            Name
 1         2048      2099199      1G  Linux filesyste Linux filesystem

Command (m for help): w ç
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

CREATING FILE SYSTEM:

[root@rhel7-server ~]# mkfs -t xfs /dev/sdd1
mkfs.xfs: /dev/sdd1 appears to contain an existing filesystem (xfs).
mkfs.xfs: Use the -f option to force overwrite.
[root@rhel7-server ~]# mkfs -t xfs -f /dev/sdd1
meta-data=/dev/sdd1              isize=256    agcount=4, agsize=65536 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0
data     =                       bsize=4096   blocks=262144, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal log           bsize=4096   blocks=2560, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

[root@rhel7-server ~]# mkfs.xfs /dev/sde1
mkfs.xfs: /dev/sde1 appears to contain an existing filesystem (xfs).
mkfs.xfs: Use the -f option to force overwrite.

[root@rhel7-server ~]# mkfs.xfs -f /dev/sde1
meta-data=/dev/sde1              isize=256    agcount=4, agsize=32000 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0
data     =                       bsize=4096   blocks=128000, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal log           bsize=4096   blocks=853, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0


MOUNTING PARTITIONS:

[root@rhel7-server ~]# mkdir /tdir2 /tdir3
[root@rhel7-server ~]# mount /dev/sdd1 /tdir2
[root@rhel7-server ~]# mount /dev/sde1 /tdir3
[root@rhel7-server ~]# df -kh
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda5        15G  6.5G  8.2G  45% /
devtmpfs        488M     0  488M   0% /dev
tmpfs           496M   80K  496M   1% /dev/shm
tmpfs           496M  7.2M  489M   2% /run
tmpfs           496M     0  496M   0% /sys/fs/cgroup
/dev/sdb1      1014M   33M  982M   4% /tdir1
/dev/sda3      1014M   33M  982M   4% /home
/dev/sda1       697M  123M  575M  18% /boot
/dev/sdd1      1014M   33M  982M   4% /tdir2
/dev/sde1       497M   26M  472M   6% /tdir3

We need UUID (Universally unique identifier) to mount the partitions permanently that can be fetched by, but before that what is UUID?

Device names can be changed because they depend in the order in which kernel detect them, to overcome this problem UUID is used. The UUID is a type of serial no and each one is different from other.


[root@rhel7-server ~]# blkid /dev/sdd1
/dev/sdd1: UUID="2d6e85e7-9c19-4308-82cb-88b6efc94ff4" TYPE="xfs" PARTLABEL="Linux filesystem" PARTUUID="d40c4121-b4b1-4054-9cb9-a7ecde0fe60c"

[root@rhel7-server ~]# blkid /dev/sde1
/dev/sde1: UUID="82649c45-3d83-4dc5-afbe-d36a1d8deb94" TYPE="xfs"

OR….

[root@rhel7-server ~]# ls -l /dev/disk/by-uuid/ |grep -i sdd1
lrwxrwxrwx. 1 root root 10 Nov 24 18:28 2d6e85e7-9c19-4308-82cb-88b6efc94ff4 -> ../../sdd1

[root@rhel7-server ~]# ls -l /dev/disk/by-uuid/ |grep -i sde1
lrwxrwxrwx. 1 root root 10 Nov 24 18:29 82649c45-3d83-4dc5-afbe-d36a1d8deb94 -> ../../sde1
[root@rhel7-server ~]#

OR….
[root@rhel7-server ~]# udevadm info -q all -n /dev/sdd1 |grep -i uuid
S: disk/by-uuid/2d6e85e7-9c19-4308-82cb-88b6efc94ff4

[root@rhel7-server ~]# udevadm info -q all -n /dev/sde1 |grep -i uuid
S: disk/by-uuid/82649c45-3d83-4dc5-afbe-d36a1d8deb94

PERMANENT MOUNT:
Edit /etc/fstab file like below (make a copy before doing such).

[root@rhel7-server ~]# vi /etc/fstab

#
# /etc/fstab
# Created by anaconda on Sat Oct 22 06:53:38 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=3e83a294-acf9-4b89-8e05-0bfde05b9b26 /                       xfs     defaults        1 1
UUID=d3726caa-e20b-4c73-b505-45119c8694da /boot                   xfs     defaults        1 2
UUID=87eef21b-7f45-4b27-a64e-81c3afa53b96 /home                   xfs     defaults        1 2
UUID=482e9d7c-9213-4ebd-a8fc-3df50baef812 swap                    swap    defaults        0 0
UUID=bb7e1afc-ea95-4d89-a502-6582040e1361 /tdir1        xfs     defaults        1       2
UUID=82649c45-3d83-4dc5-afbe-d36a1d8deb94 /tdir3        xfs     defaults        1       2
UUID=2d6e85e7-9c19-4308-82cb-88b6efc94ff4 /tdir2        xfs     defaults        1       2

UNMOUNTING PARTITIONS:

If it is not entered in “fstab” then simply,

[root@rhel7-server ~]# umount /tdir2
[root@rhel7-server ~]# umount /tdir3

If it is entered in “fstab” then comment (#) those and unmounts them.


DISK BUFFERING / CACHING:

Writing on disk is an operation that is buffered before actual writing on disk.
Let’s say a process is requesting to change data, this activity is recognized by kernel and for us the changes are written to disk. But kernel stores these changes to RAM till it conveniently make the actual changes to the disk.

By using “sync” command we can force kernel any time to write the changes from buffer to disk.

FS-Cache is a persistent local cache that can be used by file systems to take data retrieved from over the network and cache it on local disk. This helps minimize network traffic for users accessing data from a file system mounted over the network (for example, NFS).
FS-Cache does not guarantee increased performance, however it ensures consistent performance by avoiding network congestion.

The kernel a series of mechanism that use RAM to automatically cache blocks read from disk, so if one or more processes repeatedly access a file, the kernel doesn’t have to go to the disk again and again. It can simply read from the cache hence results in saving time & system resources.

ADDING SWAP PARTITIONS:

[root@rhel7-server ~]# fdisk /dev/sde
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): n ç
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p ç
Partition number (2-4, default 2):
First sector (1026048-41943039, default 1026048): ç
Using default value 1026048
Last sector, +sectors or +size{K,M,G} (1026048-41943039, default 41943039): +1G ç
Partition 2 of type Linux and of size 1 GiB is set

Command (m for help): l ç

 0  Empty           24  NEC DOS         81  Minix / old Lin bf  Solaris
 1  FAT12           27  Hidden NTFS Win 82  Linux swap / So c1  DRDOS/sec (FAT-
 2  XENIX root      39  Plan 9          83  Linux           c4  DRDOS/sec (FAT-
 3  XENIX usr       3c  PartitionMagic  84  OS/2 hidden C:  c6  DRDOS/sec (FAT-
 4  FAT16 <32M      40  Venix 80286     85  Linux extended  c7  Syrinx
 5  Extended        41  PPC PReP Boot   86  NTFS volume set da  Non-FS data
 6  FAT16           42  SFS             87  NTFS volume set db  CP/M / CTOS / .
 7  HPFS/NTFS/exFAT 4d  QNX4.x          88  Linux plaintext de  Dell Utility
 8  AIX             4e  QNX4.x 2nd part 8e  Linux LVM       df  BootIt
 9  AIX bootable    4f  QNX4.x 3rd part 93  Amoeba          e1  DOS access
 a  OS/2 Boot Manag 50  OnTrack DM      94  Amoeba BBT      e3  DOS R/O
 b  W95 FAT32       51  OnTrack DM6 Aux 9f  BSD/OS          e4  SpeedStor
 c  W95 FAT32 (LBA) 52  CP/M            a0  IBM Thinkpad hi eb  BeOS fs
 e  W95 FAT16 (LBA) 53  OnTrack DM6 Aux a5  FreeBSD         ee  GPT
 f  W95 Ext'd (LBA) 54  OnTrackDM6      a6  OpenBSD         ef  EFI (FAT-12/16/
10  OPUS            55  EZ-Drive        a7  NeXTSTEP        f0  Linux/PA-RISC b
11  Hidden FAT12    56  Golden Bow      a8  Darwin UFS      f1  SpeedStor
12  Compaq diagnost 5c  Priam Edisk     a9  NetBSD          f4  SpeedStor
14  Hidden FAT16 <3 61  SpeedStor       ab  Darwin boot     f2  DOS secondary
16  Hidden FAT16    63  GNU HURD or Sys af  HFS / HFS+      fb  VMware VMFS
17  Hidden HPFS/NTF 64  Novell Netware  b7  BSDI fs         fc  VMware VMKCORE
18  AST SmartSleep  65  Novell Netware  b8  BSDI swap       fd  Linux raid auto
1b  Hidden W95 FAT3 70  DiskSecure Mult bb  Boot Wizard hid fe  LANstep
1c  Hidden W95 FAT3 75  PC/IX           be  Solaris boot    ff  BBT
1e  Hidden W95 FAT1 80  Old Minix

Command (m for help): 82 ç
8: unknown command
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   g   create a new empty GPT partition table
   G   create an IRIX (SGI) partition table
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)

Command (m for help): t ç
Partition number (1,2, default 2): ç
Hex code (type L to list all codes): 82 ç
Changed type of partition 'Linux' to 'Linux swap / Solaris'

Command (m for help): p ç

Disk /dev/sde: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x754ea700

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048     1026047      512000   83  Linux
/dev/sde2         1026048     3123199     1048576   82  Linux swap / Solaris

Command (m for help): w ç
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

[root@rhel7-server ~]# partprobe /dev/sde
[root@rhel7-server ~]# fdisk -l /dev/sde

Disk /dev/sde: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x754ea700

   Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048     1026047      512000   83  Linux
/dev/sde2         1026048     3123199     1048576   82  Linux swap / Solaris
[root@rhel7-server ~]#

[root@rhel7-server ~]# mkswap /dev/sde2
Setting up swapspace version 1, size = 1048572 KiB
no label, UUID=3447bb4a-a0f4-4b3f-867d-90d2fbe8a193

[root@rhel7-server ~]# free -mth
             total       used       free     shared    buffers     cached
Mem:          990M       709M       280M       7.2M       3.9M       320M
-/+ buffers/cache:       385M       605M
Swap:         2.0G         0B       2.0G
Total:        3.0G       709M       2.3G
 [root@rhel7-server ~]# swapon /dev/sde2
 [root@rhel7-server ~]# free -mth
             total       used       free     shared    buffers     cached
Mem:          990M       710M       280M       7.2M       3.9M       320M
-/+ buffers/cache:       386M       604M
Swap:         3.0G         0B       3.0G
Total:        4.0G       710M       3.3G
[root@rhel7-server ~]#   

ADDING SWAP FILES:

[root@rhel7-server ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda2                               partition       2097148 0       -1
/dev/sde2                               partition       1048572 0       -2

[root@rhel7-server ~]# dd if=/dev/zero of=/swapfile bs=1M count=100
100+0 records in
100+0 records out
104857600 bytes (105 MB) copied, 5.74746 s, 18.2 MB/s
[root@rhel7-server ~]#
[root@rhel7-server ~]# mkswap /swapfile
Setting up swapspace version 1, size = 102396 KiB
no label, UUID=e87d115f-fa7c-4f41-8a6d-0c3a3b561ae4
[root@rhel7-server ~]# swapon /swapfile
swapon: /swapfile: insecure permissions 0644, 0600 suggested.
[root@rhel7-server ~]# swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda2                               partition       2097148 0       -1
/dev/sde2                               partition       1048572 0       -2
/swapfile                               file    102396  0       -3
[root@rhel7-server ~]#

MAKING SWAP PARTITIONS/FILES PERMANENT:

[root@rhel7-server ~]# vi /etc/fstab

#
# /etc/fstab
# Created by anaconda on Sat Oct 22 06:53:38 2016
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=3e83a294-acf9-4b89-8e05-0bfde05b9b26 /                       xfs     defaults        1 1
UUID=d3726caa-e20b-4c73-b505-45119c8694da /boot                   xfs     defaults        1 2
UUID=87eef21b-7f45-4b27-a64e-81c3afa53b96 /home                   xfs     defaults        1 2
UUID=482e9d7c-9213-4ebd-a8fc-3df50baef812 swap                    swap    defaults        0 0
UUID=bb7e1afc-ea95-4d89-a502-6582040e1361 /tdir1        xfs     defaults        1       2
UUID=82649c45-3d83-4dc5-afbe-d36a1d8deb94 /tdir3        xfs     defaults        1       2
UUID=2d6e85e7-9c19-4308-82cb-88b6efc94ff4 /tdir2        xfs     defaults        1       2
/dev/sde2       swap    swap    sw      0       0
/swapfile       swap    swap    sw      0       0

AUTOMATIC MOUNTING (Fields in /etc/fstab):

Make the entry in /etc/fstab

1.  Device/UUID  the device that must be mounted (device name/uuid/labe can used)
2.  Mount Point  the directory/kernel interface where the device need to mount
3.  File System  the FS type
4.  Mount Options mount options
5.  Backup info (for use by dump cmd)  use 1 to enable support to backup using                the dump utility. This may be required for som backup solutions, otherwise select 0.   
6.  Automatic check  the FS integrity test order, tells the FS should checked
    automatically at booting or not, 0 to disable auto check
    (cdrom,swap,proc,nfs). 1 is for root FS and 2 for all other FS that need
    auto check while booting.

UUID=3e83a294-acf9-4b89-8e05-0bfde05b9b26 /                       xfs     defaults        1 1

Mount Options……

Specifies that the mounted FS will use what options to mount, if nothing specified then mounted with “defaults” option (read/write, ennable device files, executables, the set uid bit)

Auto/noauto     =the FS will|will not be mounted automatically.
Acl             =add support for acl
User_xattr      =user extended attributes
Ro              =mount FS with read only
Atime/noatime   =disables/enables access time modifications
Noexec/exec     =denies/allows execution of program files from FS
_netdev         =to mount a NFS. This tells fstab to wait until the network is      
                  available before mounting FS.


No comments:

Post a Comment