Interview Questions on Linux Filesystems with Answers

1. What is the filesystem used in Rhel 5 and Rhel 6?
Show/Hide Answer

2. What is the difference between ext3 and ext4 filesystem?
Show/Hide Answer

3. What is the command used to check any hardware changes made on the system in Linux?
Show/Hide Answer


4. Is it possible to increase swap partition? If yes then how?
Show/Hide Answer

5. What is a swap partition ? What is the recommended swap partition for 8 GB RAM?
Show/Hide Answer

6. What is the procedure you follow to extend a LVM partition?
Show/Hide Answer


7. What is the command to view all the available partitions on the system?
Show/Hide Answer

8. What is the command to view all the mounted partitions on the system?
Show/Hide Answer


9. What is the use of mtab directory?
Show/Hide Answer

10. How do you make permanent changes to any file inside /proc directory?
Show/Hide Answer


11. What is the default mode when you enter single user mode?
Show/Hide Answer

12. Explain the procedure to fix a case when a system is unable to boot due to improper entry in fstab
Show/Hide Answer

13. What does the last two sections define in fstab file?
Show/Hide Answer

14. What is the command to display all the logical volume available in the system?
Show/Hide Answer


15. How do you mount a windows share on Linux? Is it possible?
Show/Hide Answer

16. What is the difference between NFS share and a Samba share?
Show/Hide Answer

17. What is the default permission applied on the user when you mount a NFS permission on any local directory in your system?
Show/Hide Answer

18. What is the command to view all the kernel parameters?
Show/Hide Answer

19. What is . and .. in very directory of Linux system?
Show/Hide Answer

20. What is the command to view all the variables in your system?
Show/Hide Answer

21. How can you make a custom environment variable permanent so that it works even after reboot?
Show/Hide Answer

5 thoughts on “Interview Questions on Linux Filesystems with Answers”

  1. great post indeed!! (y)

    About Journaling:

    If a system crashes, sometimes the loss of data occurs. Files written (created or modified), during a system crash, can be corrupted if not closed when the system shuts down. Using a journal allows data recovery of files and the data within it.

    What occurs during the journaling process is that a user submits a change to a file. The first thing the file system does is to mark the changes in a 'journal', or a separate file used specifically for journaling.

    There are three types of Journaling: writeback, ordered and data.

    1. Writeback
    Here, only the metadata is journaled and data is written to the file on the disk. In a crash, the file system is recoverable, but the physical data can be corrupted. File system recovery is the worst, but the performance is the best.

    2. Ordered (default)
    This mode is the reverse of writeback. The physical data is written first before the metadata is journaled. The ordered mode allows the data and file system to be uncorrupted if a system crashes before the journal is written. File system recovery is medial.

    3. Data
    In the data mode, the metadata and file contents are journaled. System performance can be poorer than the other two modes, but the fault tolerance is much better.

    Reply
  2. good work. its good to expalin more examples with practicals on .bash_profie file. much more info of journaling feature.

    Reply
  3. Dear All,

    Is it possible to reduce size of "/var"(LVM) mount point which is mounted on a running Linux machine ?
    Please explain the detailed process...
    Thanks in advanced !!!!

    Reply
  4. Hi MohiT,
    yes it's possible, df -h /var
    1. umount /var
    2. e2fsck -f /dev/mapper/vg_name-LogVol00
    3. resize2fs /dev/mapper/vg_name-LogVol00 10G (reduce size 10G)
    4. lvreduce -L 10G /dev/mapper/vg_name-LogVol00
    5. e2fsck -f /dev/mapper/vg_name-LogVol00

    Mount the file system and verify its size.
    mount /home

    Hopefully will help you!

    Reply

Leave a Comment