From the course: Linux System Engineer: Advanced Disk Systems and System Backup

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Create EXT file systems

Create EXT file systems

From the course: Linux System Engineer: Advanced Disk Systems and System Backup

Start my 1-month free trial

Create EXT file systems

- [Instructor] The standard tool to format file systems is mkfs. Mkfs is actually a front end for other tools. To get an idea of what these tools are, let's get a listing of all files that start with mk in /sbin. In a terminal, type in ls /sbin/mk* and hit enter. Here we see commands for formatting ext2, ext3, and ext4, btrfs, xfs, vfat, and a few more. When we call mkfs with the -t option and specify a file system, it just calls the appropriate tool. Now let's reformat our lvdata logical volume. First, unmount it. Type in clear, then type in sudo umount /dev/vgdata/lvdata and hit enter. Type in your password if prompted. Now verify with df. Type in df, and /dev/vgdata/lvdata should not be in the list of mounted volumes. Now let's format it with a default file system by not specifying a file system on the command line. Type in clear, and then type in sudo mkfs /dev/vgdata/lvdata and hit enter. We'll verify with lsblk -f which will show us the file system used. Type in clear, and then…

Contents