Skip to content

WA6. Exploring the OS File System

Problem

  • Use the link https://linuxhint.com/determine-file-system-type-linux and follow along to explore your file system.
  • Choose at least two methods of exploring your file system.
  • Take screenshots for each method and discuss what you did and noticed while exploring the file system using each method.

Solution

  • This text will quickly summarize the information presented in the link above, If you are not interested in the summary, you can skip to the background section.

Background

  • File system format is way to organize files onto the physical storage device, that facilitates searching, reading, and writing files.
  • Some of the most common file systems are Ext4, Btrfs, XFS, ZFS, FAT32, and NTFS.
  • Knowledge of the file system form helps in Mounting the file system in the correct way and Diagnosis or troubleshooting of issues.

Methods to determine the file system type

  • Unfortunately, I do not posses a Linux machine; and the VM was not compatible with my machine. So I lunched a temporary linux machine on the cloud using AWS.
  • I also included my findings on the macOS machine; just in case you are interested; otherwise, you can skip to the macOS section.
  • On Linux:
    • Using df command
    • Using lsblk command
  • On macOS (optional):
    • Using diskutil command
    • Using mount command

On Linux

  • The SSH online session for the fresh EC2 instance is shown below:

ssh-session

  • The df command is used to display the amount of disk space available on the file system containing each file name argument. If no file name is given, the space available on all currently mounted file systems is shown.
  • We notice a bunch of partitions on the disk, some of them with tmpfs, devtempfs, and the largest parton is of type xfs.
  • According to thelinux documentation, tmpfs is a file system that stores its contents in memory. It is a temporary file system that is used to store data that is not needed after a reboot.
  • Because the instance is just launched (The OS installation is not stable yet), it is expected to have a lot of tmpfs partitions; also, there may be some files needed to store the SSH session history in the devtempfs partition.
  • XFS supports metadata journaling, highly scalable and can be used to store large files (RedHat, n.d.).
  • The output of the df command is shown below:

df-command

  • The lsblk command is used to list information about all available or the specified block devices.
  • We see that the xfs partition is mounted on the /dev/xvda1 device, then there is the Swap partition.
  • The xfs conforms to the findings of the df command, however, the Swap partition is not mentioned in the df command output.
  • The output of the lsblk command is shown below:

lsblk-command


On macOS (optional)

  • The diskutil command is used to display information about the disk, including the file system type.
  • The output of the diskutil command is shown below:

mount-command

  • The mount command is used to display the list of currently mounted file systems. The output of the mount command is shown below:

diskutil-command

  • We notice the file type of all partitions is APFS.
  • According to (Apple, n.d.), APFS is the default file system for macOS 10.13 and later; features strong encryption, space sharing, snapshots, fast directory sizing and improved file system fundamentals.

References