• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Search

fstab

AWS XFS Volume Setup

March 31, 2020

Here’s how to setup a XFS volume.

file -s /dev/nvme2n1
mkfs -t xfs /dev/nvme2n1

file -s /dev/nvme2n1 mkfs -t xfs /dev/nvme2n1

Mount to /data.

mkdir /data
mount /dev/nvme2n1 /data

mkdir /data mount /dev/nvme2n1 /data

Add to /etc/fstab.

vim /etc/fstab
#
#
UUID=xxxxxxxxxxxxxxxxxxxxxx /data  xfs  defaults 0 0

vim /etc/fstab # # UUID=xxxxxxxxxxxxxxxxxxxxxx /data xfs defaults 0 0

Filed Under: Cloud, Linux Tagged With: aws, fstab, mount, nvme, volumes, xfs

AWS EFS /etc/fstab

December 23, 2019

To automatically mount a EFS volume after each reboot, you’ll need to add the following format to /etc/fstab.

You can use the DNS name given by AWS.

fs-12345678:/ /mnt/efs efs defaults,_netdev 0 0

fs-12345678:/ /mnt/efs efs defaults,_netdev 0 0

Or the IP address.

10.0.0.22:/ /mnt/efs efs defaults,_netdev 0 0

10.0.0.22:/ /mnt/efs efs defaults,_netdev 0 0

Mount all with fake and verbose.

mount -fav

mount -fav

Filed Under: Cloud Tagged With: automatic, aws, efs, fstab, mount, reboot

NFS Client

June 10, 2019

Services to check.

chkconfig nfs on
service rpcbind start
service nfs start
mount -a

chkconfig nfs on service rpcbind start service nfs start mount -a

If missing, install it.

yum install nfs-utils nfs-utils-lib

yum install nfs-utils nfs-utils-lib

Mount it.

mount -a
mount 192.168.1.200:/home /mnt/nfs/home

mount -a mount 192.168.1.200:/home /mnt/nfs/home

Add to /etc/fstab.

10.10.10.10:/home on /mnt/nfs/home type nfs (rw,noatime,nolock,bg,nfsvers=2,intr,tcp,actimeo=1800,addr=10.10.10.10)

10.10.10.10:/home on /mnt/nfs/home type nfs (rw,noatime,nolock,bg,nfsvers=2,intr,tcp,actimeo=1800,addr=10.10.10.10)

Filed Under: Linux Tagged With: fstab, mount, nfs, nfs-utils, rpcbind

Add nofail

May 1, 2019

The /etc/fstab file allow volumes to be automatically mounted on bootup. Add nofail in your automated mounts to prevent instances from hanging on boot. Nofail makes the instance to boot even if there are errors with the mounted volume.

UUID=aebf131c-6957-451e-8d34-ec978d9581ae  /data  xfs  defaults,nofail  0  2

UUID=aebf131c-6957-451e-8d34-ec978d9581ae /data xfs defaults,nofail 0 2

Filed Under: Cloud, Linux Tagged With: boot, errors, fstab, nofail

Adding a XFS Volume

March 7, 2019

Add a disk volume via cloud console. Then perform the following commands:

# check the new block
lsblk
# format
fdisk /dev/sdc
# create file system
mkfs.xfs -f /dev/sdc1
# get uuid
blkid /dev/sdc1
# vi /etc/fstab
UUID="xxxxxxxxxxxxxxxxxxxxx" /mnt/directory xfs defaults 0 0
# mount
mount -a

# check the new block lsblk # format fdisk /dev/sdc # create file system mkfs.xfs -f /dev/sdc1 # get uuid blkid /dev/sdc1 # vi /etc/fstab UUID="xxxxxxxxxxxxxxxxxxxxx" /mnt/directory xfs defaults 0 0 # mount mount -a

Filed Under: Linux Tagged With: add, fstab, mount, xfs

  • Home
  • About
  • Search

Copyright © 2023