In this video, Kevin Dankwardt continues his demonstration of special options for making and mounting file systems. In this video he demonstrates special features of XFS and Btrfs.
- [Instructor] Now, we'll show some special options for XFS and btrfs, and even see an example of debugging a mount problem. Now, let's try XFS. So, let's make sure that our device file d1 is not mounted anywhere. Let's format that, and let's use a special option where XFS that separates the log from the data.
So we'll put the data on one partition, and we'll put the log on another one. Let's put the data on number two. Make sure that's not mounted. We're going to use d1 and d2. Put the log on one and the data on the other. So, they're both unmounted. That's good. We're going to mkfs type xfs, because that's what supports this, and we'll use the force option, because we already have a file system there and it would complain if it saw one. The log device, we're going to say, is dev sdd1, and we're going to say the size of that log is 1,000 blocks.
Then, the regular partition that we're going to format with that XFS where the data will go will be dev sdd2. There you go, it reported that. Doesn't look like it complained at all. Great. So we need a place to mount that. Make some kind of random name directory there. We're going to mount, and we've got to tell it now that the log device is separate.
If we just try to mount sdd2, it's not going to be happy. So we've got to use the option log device equals dev sdd1, and we're going to mount sdd2, and we're going to put it on tmp xf1. There we go. So now, all the logging stuff will go to a different partition. If that was a separate disk, a separate controller and so forth, maybe that would help performance.
Now, let's try btrfs, and let's see how we can set up RAID with btrfs. We're going to set up RAID 5, so we're going to need three partitions. Let's make sure none of those are mounted. 123 with the square brackets. That should match them all. One and three were not mounted, and two must have been so it got unmounted. That's good. Remember, the btrfs RAID support might be unreliable, so be careful.
Double-check, if you're going to use it, that it has progressed to the point of being reliable. We've got to do a mkfs type btrfs. Force that. Data's going to be raid5. Metadata's going to be raid5. Then, we give device files, those three.
All right, so there's a bunch of output there. All right. Put them all together, and let's make a directory where to mount it. Let's use a couple fancy options for btrfs. There is a autodefrag, which affects how allocation happens, and there's a check integrity, which might take some time. Okay.
What happened there? We put it on one, two, three. Let's see what dmesg says. Ah. We can't do the check integrity on this system. There we go. So let's take that one off on this system here. Let's put this back to 1.
There we go. Little bit of debugging there for you, too. It told us to check out dmesg, and we did, and we see that btrfs code in the kernel is what shows up in dmesg. We see it complaining about we actually didn't have the support built in here for check integrity. This is a CentOS 7 system. A little bit of info for you there. All right, there you go, some cool file system features.
- Partitioning storage
- Creating, mounting, and unmounting file systems
- Formatting file systems
- Making volumes with LVM
- Adding storage security
- Managing swap spaces
- Backing up and recovering Linux storage systems
- Working with networked file systems like NFS and SSHFS