104.3 Control mounting and un-mounting of Filesystem

Manually mount and un-mount filesystems

  • The mount and umount commads attach and detach filesystems to a mountpoint directory
  • Mount checks for filesystem entries
  • Filesystems can be mounted using a label

Configure file system mounting on bootup

  • The /etc/fstab cile contains information about filesystem use by the mount command.
  • Filesystem maintenance also includes updating ‘fstab’ file
  • The order of filesystem being mounted is significant

Field definitions for /etc/fstab

  • What will be mounted
    • Where will be mounted
    • Which filesystem type
    • Which options will be used
    • Will the ‘dump’ command be used to backup filesystem
    • Which order should filesystem be checked at boot time.

Configure user mountable removable filesystems

  • Allowing regular users to mount removable media may be convenient, but requires security considerations.
  • User-mounted filesystems will default to noexec unless exec is specified after the user option
  • Specifying noatime eilll disable access time recording

Using noatime may improve performance

  • sudo mkdir -p /media/user/usb
    • sudo chown user1 /media/user1/usb
    • sudo chmod 0777 /media/user1/usb
    • dmesg | grep -i usb
    • /dev/sdc1 /home/storage user, umask-000, utf8, noauto 0 0
      • etc/fstab definition for usb
    • sudo mount /media/user1/usb

mount -a

Re read the /etc/fstab file and mount any directories listed

Leave a comment

Your email address will not be published. Required fields are marked *