How To View Block Devices And File System Under RHEL7 -Tutorial
Under RHEL7 view block devices & filesystem is more or less same as we used to do it under RHEL6. Lets understand some interesting commands to view block devices and filesystem under RHEL7.
lsblk:lsblk command allows you to display a list of available block devices.
lsblk command displays the device name (NAME), major and minor device number (MAJ:MIN), if the device is removable (RM), what is its size (SIZE), if the device is read-only (RO), what type is it (T YPE), and where the device is mounted (MOUNT POINT ). Reember, by default lsblk command shows ouput in tree format. To display the information as an ordinary list, add the -l command line option.
blkid command, as was under RHEL6, in RHEL7 is used to view information about available block devices.
Be default, the blkid command displays available attributes such as its universally unique identifier (UUID), file system type (T YPE), or volume label (LABEL), as in command one, in above snapshot.
Further, you can also use the above command with the -p and -o udev command line options to obtain more detailed information. You need to have root privileges to run the third command in above snapshot.
findmnt:findmnt command allows you to display a list of currently mounted file systems. findmnt command displays the target mount point (TARGET ), source device (SOURCE), file system type (FSTYPE), and relevant mount options (OPT IONS).
Exactly like in RHEL6, here in RHEL7 df command allows you to display a detailed report on the system’s disk space usage. df command displays its name (Filesystem ), size (1K-blocks or Size), how much space is used (Used), how much space is still available (Available), the percentage of space usage (Use%), and where is the file system mounted (Mounted on).
Similar like in RHEL6, the df command in RHEL7 shows the partition size in 1 kilobyte blocks and the amount of used and available disk space in kilobytes. To view the information in megabytes and gigabytes, supply the -h command line option, human-readable format.
Like lsblk command, findmnt lists file systems in a tree-like format. To display the information as an ordinary list, add the -l command line option.
du command allows you to displays the amount of space that is being used by files in a directory. Like df, du command displays the disk usage in kilobytes. To view the information in megabytes and gigabytes, supply the -h command line option and to get the summary information only use -s option.
And lastly, you have the gnome-system-monitor tool in rhel7 viewing block devices & file system.
This tutorial has written by Alok Srivastava. He is the founder of Network Nuts, India's most loved Linux training company.
Post a Comment
Note: only a member of this blog may post a comment.