Post

Linux Plus-Managing Linux Filesystem

image

Overview

Filesystems

  • Create and manage filesystems
    • ext4
    • xfs
    • btrfs
  • Mount filesystems

###

  1. Gain root privileges
  2. Using luksOpen to decrypt the device
  3. Searching “mount count”

image

  1. Format loop1p2 partition with xfs
  2. Defrag a filesystem while the system is online …

Managing EXT4 Filesystemms

  • The filesystem already exists
  • We can read the filesystem settings
  • Configure the volume label

image

Managing XFS Filesystems

  • Add a filesystem to the second partition
  • Using the xfs toolset to read the filesystems settings
  • Demonstrating the dynamic nature of XFS to defrag the existing root filesystem

image

Managing btrfs on openSUSE

  • Install btrfs
  • Add new disk files
  • Add btrfs filesystem to one disk and mount it
  • Checking the filesystem, and view its size
  • Add another disk and check the filesystem grew while still online

image

Working with Mount and Unmount

  • Using the mount command
  • Using the umount command
  • Checking the UUID using blkid
  • Persisting mounts in the /etc/fstab

image

Summary

  1. Check the size of the file (df) or directory (du)
1
df, du
  1. mkfs - create a filesytem, such as xfs, ext4 and btrfs (option -t - to specify the type of filesystem)
    1
    
    mkfs -t xfs, ext4, btrfs
    
    • mount / umount
  2. To persist any of the filesystem into the mount point edit /etc/fstab and use the UUID of the filesystem
    1
    
    vi /etc/fstab
    
  3. Gain information of the filesystem
    1
    
    tune2fs, dumpe2fs
    
  4. To defragment the filesystem
    1
    
    xfs_admin, xfs_fsr, xfs_info
    
  5. For Advanced filesystems settings
1
 btrfs #subcommand#
This post is licensed under CC BY 4.0 by the author.