Linux File System Types

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this lesson we're going to review several commonly used Linux file system types now understand that whenever the Linux kernel needs to conduct an i/o operation an input operation or an output operation to one of your system storage devices the kernel needs to know where that data is stored how it can access it and also where it's safe to write other new information this is the job of the file system the file system reliably stores data on the storage device and organizes it in such a way that it can be found easily so when you use a file browser or maybe a CD command at the command prompt to navigate through directories within the file system and then open up a file it's the file system that makes this entire process possible so let's begin by talking about the ext2 file system ext2 stands for second extended file system and it is probably one of the oldest Linux file systems that's still available it has introduced a long time ago in 1993 I believe and it stores data in the standard hierarchical fashion that's used by most other file systems data is stored in files files are stored in directories and a given directory can contain either files or other directories which we call sub directories now the maximum size for a file on an ext to file system is two terabytes and the maximum size for an ext to volume is 4 terabytes it supports file names that are up to 255 characters long and it supports our Linux permissions and also supports file compression now the xt2 file system is a fantastic file system that's been around a long long time long enough for most of its bugs to be worked out in fact I dare say it's probably the most widely used Linux file system that's ever been implemented just because it's been around for so long however you need to be aware of the fact that EXT 2 has one key weakness that has led to the development of other Linux file systems and this is the fact that the ext2 file system takes a very long time to recover if the system shuts down abruptly now when shutting down the Linux system the operating system needs to first cleanly dismount the filesystem this ensures that all pending filesystem transactions are actually committed to disk before the system shuts off now the problem arises when the system shuts down without completing this clean dismount procedure for example let's suppose we have a power outage and the Linux system shuts off suddenly without going through the proper shutdown procedure when this happens it's possible that there were pending disk transactions waiting that weren't actually completed now in order to keep this from happening you do need to use a UPS and you're using one right if not I dare I suggest that you do so I lost data once on an ext to file system due to a power outage and it was a bad thing because I didn't have a UPS hooked up and I've sworn to never ever ever let that happen again if this happens in order to clean up the file system afterwards the ext2 file system will automatically run a program called e to F SDK which stands for the XT 2 file system check it'll run this program the next time the system starts up and this utility will try to fix any problems that were created when the system went down without properly dismounting the hard disk drives first and if it finds any files that are unallocated or unclaimed blocks of data it will take that information and it will write it to a special directory you'll see in the file system called lost + found by doing this EXT 2 tries to ensure that the data integrity is maintained in the event of a improper shutdown now this all sounds good right but it's still got a problem and that is the fact that the e 2 file system check utility will analyze the entire file system when this happens not just the few files that were in the process of being modified when the system went down uncleanly now on a very basic minimal Linux system this can take a while 10 to 15 minutes but on an extensive system like a linux server that has lots of filesystem data this process can take hours and if you think about it from the system administrators perspective it's bad enough that the system went down unexpectedly in the first place now you've got to wait hours for the system to get back up and running again your end users and your managers are not going to be happy now because of this very issue other Linux I'll systems have been developed and are pretty much completely replacing ext2 although you still might run into an ext2 system here and there the first of these is ext3 really ext3 as you can see by its name is just an updated version of ext2 ext3 stands for third extended file system in fact ext2 and ext3 are so similar that most of the file system utilities used by EXT 2 are also used by ext3 and in fact you can easily upgrade n EXT to file system the EXT 3 or you can go the other direction if you wanted to you could downgrade an ext3 file system back to EXT 2 now you probably would never want to do this because the ext3 file system offers one key advantage that makes it highly preferable over ext2 and that is the fact that it uses journaling remember that the key disadvantage of EXT 2 is the fact that it had to check the entire file system if the system went down uncleanly journaling eliminates this problem the journaling process is shown here before committing a transaction to the hard disk drive such as saving a file the ext3 file system will record that transaction to the journal and mark it as pending or incomplete in this case we need to write data to a file named schedule dot ODT then after that process is actually complete after that save process in this case to schedule DT is done then the ext3 file system marks the transaction as completed so in essence the journal says here's what I'm going to do and tracks whether or not that actually got done by doing this the ext3 file system can keep a log of the most recent file transactions and whether or not they were actually completed using a journal if an event occurs like a power outage that causes the system to go down uncleanly without properly dismounting the disk then the ext3 file system will replay that journal when the system comes back up and this allows the file system to verify the data on the disk and bring it back into a consistent state if possible you the information stored in the journal now unlike ext2 ext3 file system doesn't need to check the entire file system this is the key benefit of ext3 / ext - because ext3 maintains a log of the most recent transactions within the journal the xt3 file system simply has to check the transactions within the journal that are listed as incomplete therefore using journaling the disk recovery time after an improper shutdown takes dramatically less time than what we saw using EXT - instead of taking hours the xt3 file system can replay the journal only a few seconds maybe even a few minutes if necessary and even if the file system is very large and the system is back up and running again now the disadvantage of ext3 is the fact that the journaling process does use up more system memory and it does slow down the disk i/o process slightly however because it does such a better job of ensuring data integrity and it does it faster most system administrators prefer ext3 by far and away / ext - even though it does slightly decrease overall disk performance next let's look at the Reiser file system now the Reiser file system is an alternative to the ext3 file system and like ext3 Reiser uses journaling to make crash recovery fast however the two are not compatible Reiser is a completely different file system from ext2 and ext3 and it uses a completely different internal structure now this internal structure is optimized to allow bigger file sizes and bigger volume sizes as you can see riser allows a maximum file size of 8 terabytes and a maximum volume size of 16 terabytes and it's reputed to be faster than EXT 2 or ext3 you should also be familiar with the ext4 file system the xt 4 was released in late 2008 and as you might guess from its name fourth extended file system it's really just an updated version of ext3 and just as ext3 is backwards compatible with ext2 ext3 compatible of ext3 and well the XT 2 for that matter now the ext4 file system supports volume sizes up to 1 exabyte in size and files can be up to 16 terabytes in size you can have a maximum of 4 billion files in an ext4 file system and as with EXT 2 and 3 the maximum file name length is 255 characters and just as with ext3 ext4 also uses a journal now ext4 incorporates additional functionality with the journal itself ext4 uses checksums to verify the integrity of the journal file this helps improve the overall reliability of the system because if you think about it that journal file is probably the most heavily used files on the hard disk drive and if it gets corrupted you've got real problems using checksums helps ensure that that file does not get corrupted so with this in mind let's shift gears and look at the butter filesystem or butter FS now butter FS is a newer Linux file system that really is totally and radically different from the other file systems that we talked about previously in this lesson now the butter FS uses a newer type of storage technology called copy-on-write it really allows us to create a filesystem on Linux that is very similar to the NSS filesystem that's found on Novell products as well as the storage space technology that's found on later versions of Windows using copy-on-write technology butter FS allows us to implement some features that are not found in the earlier Linux file systems that we just talked about specifically storage pools and storage snapshots really the butter FS filesystem provides an alternative to the traditional process of creating disk partitions and installing a filesystem on those partitions with butter FS what you instead do is create a storage pool composed of all the storage space on the storage devices on your system and if you're looking at this thing that looks like LVM you're right it's very similar to LVM but it includes features that LVM does not include once we've allocated our storage devices to a storage pool we then can define storage volumes from the storage pool and then we can mount those storage volumes at various mount points in our Linux file system now this system provides a great deal of flexibility with the storage space on your system for example let's suppose we've defined a storage volume that's mounted in /home which is where all of our users home directories reside and where they store all of their large video files that they've downloaded from the internet and it's very common to run out of space in slash home using butter FS if we want to add capacity all we have to do is install a new hard drive in the system then allocate its space to the pool where the volume mounted in slash home lives and when you do the slice of the volume is automatically increased you didn't have to back up to any data you didn't have to resize partitions either have to our data as you would have had to do if you were working with traditional partitions in addition to storage volumes but RFS also provides snapshot functionality and snapshots do a great job of protecting your data essentially what snapshots do is take pictures if you will of what your data looked like at specific intervals and saves it on a separate media for example we have snapshot one snapshot two and snapshot three of storage volume one this way if a file ever gets lost from the storage volume or gets corrupted for some reason we can come over here to the appropriate snapshot file say snapshot number two grab the file that we need to restore and drop it back into the file system on the storage volume basically it allows us to restore that lost file in just a matter of seconds instead of having to restore it from tape or from some other backup medium so which file system should you use well it depends upon your personal preferences and the needs of your particular linux deployment now my choice for many years was the Reiser file system however lately ext4 has been my file system of choice but I'm really liking the looks of the newer butter file system now there are many other file systems that you could use with Linux if you wanted to for example you can use the XFS file system from Silicon Graphics or you can even use the V fat or NTFS file systems from the whip from windows although be aware that NTFS support is there but it's not a hundred percent baked yet and you're better off using a standard Linux file system well that's it for this lesson this lesson we discussed the Linux file system types that you can use we looked at ext2 we looked at ext3 riser ext4 and then we ended this lesson by talking about the butter filesystem
Info
Channel: The Linux Man
Views: 104,222
Rating: 4.9438539 out of 5
Keywords: Linux, Coding, File System Types, File System, Testout, File, System, Tutorial, Tutorials
Id: g7OkSvioFlU
Channel Id: undefined
Length: 13min 54sec (834 seconds)
Published: Thu Nov 24 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.