1 00:00:06,932 --> 00:00:10,020 - So now that we've created our partitions 2 00:00:10,020 --> 00:00:11,730 let's create some file systems. 3 00:00:11,730 --> 00:00:14,543 First we are going to have a look at ext4. 4 00:00:14,543 --> 00:00:16,740 There are three utilities that matter 5 00:00:16,740 --> 00:00:19,976 or only just two mkfs.ext4 is a utility 6 00:00:19,976 --> 00:00:23,790 that you use to create an ext4 file system. 7 00:00:23,790 --> 00:00:26,070 And then there is tune2fs 8 00:00:26,070 --> 00:00:29,520 which can be used to tune ext4 properties. 9 00:00:29,520 --> 00:00:32,910 The name of this utility is funny: Tune2fs. 10 00:00:32,910 --> 00:00:34,920 It contains the letters E2, 11 00:00:34,920 --> 00:00:36,778 and E2 that is ext2. 12 00:00:36,778 --> 00:00:40,050 And that is because this utility goes all the way 13 00:00:40,050 --> 00:00:42,327 down to the ext2 period, 14 00:00:42,327 --> 00:00:46,200 which was the original file system that was introduced 15 00:00:46,200 --> 00:00:48,043 with Linux in 1992. 16 00:00:48,043 --> 00:00:49,980 Many of the utilities that come 17 00:00:49,980 --> 00:00:53,250 with ext4 still are from that period. 18 00:00:53,250 --> 00:00:54,720 And if you wanna know what you can do 19 00:00:54,720 --> 00:00:58,448 with ext4 properties, try tune2fs-l, 20 00:00:58,448 --> 00:01:01,950 that will list all the properties that are currently used. 21 00:01:01,950 --> 00:01:02,783 Let me show you. 22 00:01:04,520 --> 00:01:08,730 All right, so let me start with lsblk. 23 00:01:08,730 --> 00:01:12,769 I'm going to work on sdb1, mkfs dot tap, tap. 24 00:01:12,769 --> 00:01:16,187 It's always a good idea to use tap completion. 25 00:01:16,187 --> 00:01:20,100 This is showing what you have available and we can see 26 00:01:20,100 --> 00:01:23,335 on this center S system that I have all the exts, 27 00:01:23,335 --> 00:01:25,950 vfat as well as xfs. 28 00:01:25,950 --> 00:01:28,350 Well ext4 is what we wanna do here. 29 00:01:28,350 --> 00:01:31,470 It's the most recent version of ext file system 30 00:01:31,470 --> 00:01:35,905 and there's no reason to use ext2 or ext3 nowadays. 31 00:01:35,905 --> 00:01:37,937 I do advise you use minus, minus help 32 00:01:37,937 --> 00:01:41,036 for an overview of all the different options. 33 00:01:41,036 --> 00:01:43,920 There are specific options that you can set, 34 00:01:43,920 --> 00:01:45,180 but in most cases, 35 00:01:45,180 --> 00:01:48,769 apart from the volume label and the UUID, 36 00:01:48,769 --> 00:01:52,590 there's no real reason to set any of these options. 37 00:01:52,590 --> 00:01:55,296 So just mkfs dot ext4 38 00:01:55,296 --> 00:01:59,340 on dev sdb1 will do. 39 00:01:59,340 --> 00:02:00,240 And there we go. 40 00:02:00,240 --> 00:02:02,642 And now it's already formatted. 41 00:02:02,642 --> 00:02:03,900 That means that 42 00:02:03,900 --> 00:02:07,020 at this point I can mount it, mount dev sdb1 43 00:02:07,020 --> 00:02:09,458 on slash mnt using slash mnt 44 00:02:09,458 --> 00:02:11,550 because that directory was designed 45 00:02:11,550 --> 00:02:12,990 as a temporary mount point. 46 00:02:12,990 --> 00:02:16,786 And as you can see, that is working. 47 00:02:16,786 --> 00:02:18,279 Going to U-mount it 48 00:02:18,279 --> 00:02:23,279 and I want to show you tune2FS-L on dev SDB1, 49 00:02:24,660 --> 00:02:27,420 which is showing all the different options that can be set 50 00:02:27,420 --> 00:02:28,743 on the file system. 51 00:02:29,880 --> 00:02:31,139 This is coming 52 00:02:31,139 --> 00:02:34,320 from what we call the file system super block. 53 00:02:34,320 --> 00:02:36,960 And in the super block all these options are stored. 54 00:02:36,960 --> 00:02:38,490 So that contains information 55 00:02:38,490 --> 00:02:40,283 like when was it last mounted, 56 00:02:40,283 --> 00:02:42,466 which features are supported 57 00:02:42,466 --> 00:02:46,593 do we have specific mount options and many, many more. 58 00:02:47,490 --> 00:02:48,450 As I just told you, 59 00:02:48,450 --> 00:02:51,651 it's nice to see that these options are available. 60 00:02:51,651 --> 00:02:53,314 But where, in the past, 61 00:02:53,314 --> 00:02:55,781 sometimes specific options were used 62 00:02:55,781 --> 00:02:58,500 to have your file system behave differently, 63 00:02:58,500 --> 00:03:01,950 nowadays the file systems normally contain everything 64 00:03:01,950 --> 00:03:05,733 that you need and these options are, are rarely used.