From the course: CompTIA Linux+ (XK0-005) Cert Prep

Unlock the full course today

Join today to access over 24,300 courses taught by industry experts.

Repair EXT filesystems

Repair EXT filesystems

- [Instructor] It is inevitable that your file system will need to be repaired at some point. We're going to use our LV data logical volume for this exercise. In order to fix the file system we'll need to break it first. Make sure /dev/vgdata/lvdata is mounted at /media/lvdata. If it is not, then mount it. Now, let's copy a bunch of files to it. For this exercise, it doesn't matter which files so just copy slash. Type in sudo cp -R, for recursive, vf / /media/lvdata and hit Enter. Let that go for a while and then kill the process with Control + C. You need a lot of files in the file system so you have a higher chance of corrupting one of them. Now that we have a lot of files, let's cause some chaos. You don't want to unmount your drive for this because we're actually trying to cause problems. We'll use dd to copy data from /dev/zero to random places on the file system. To do so, type in sudo dd if=/dev/zero,…

Contents