In this video, Kevin Dankwardt solves the challenges and demonstrates how to create a file of a specified size and make it swap space. He then shows how to use rsync for a backup, and how to make a RAID device.
- [Instructor] Alright so let's try out swap and rsync and mirroring, you're supposed to make a swap file. Well you need a file and you need to make it swapish, so let's make a file. Just a 500 mg file, just for something, and then we make swap on it, there we go. And we need to make sure that permission modes are safe on that guy.
And I'm root, so root owns it already so that's okay and then we can do our swapon, great. And we can check status, and sure enough there it is. There we go so that was making a swap file. Now we're supposed to backup etc, change the host file, and then restore. So let's make a directory we can use for backing up etc.
And then let's see how long it takes, we're not going to do it for both, we'll just do our cat mode. That was really fast, what do we got in tmp/eb? We've got everything, okay. So let's edit etc/host, let's add a line. Comment, comment there. Alright so that's the new thing, oh we don't want that, we want to get back the old one would be the idea.
So we can use rsync, and we give the old one and we cat etc/host. And we got the old one back there we go. So that was making a backup and restoring a file we screwed up with using rsync. By the way as assistant administrator, if that's what you're working on you might want to look into using something like git, for maintaining your config files.
So you can version them, it's a little more powerful than rsync, but rsync is handy for all kinds of things. I use it quite a bit. Alright now we want to set up mirroring, with a couple partitions so let's see, mdadm create we'll do verbose here. We'll call it challraid, challenge raid. This will be level one, two raid devices.
And we're going to do sdd two and three on the system. Okay so I'd done that before so it's kind of complaining but just go ahead. That's good, let's see if we can format it. That's not the name I used before so this is a test that the new one worked, yep. And then let's make a directory, where to mount it.
Oh looks good. Now we can unmount it. And we can stop the raid that is those partitions won't be busy anymore. There we go. So that's how we make a raid too. I hope you got that, there you go.
- 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