5. Storage Issues Troubleshooting-EX342
According to the exam objectives you will need to be able to identify issues with storage and fix them. The following are the objectives of this section :
Diagnose and troubleshoot file system issues
- Recover corrupted file systems
We will be testing this on our virtual server.
First : Lets prepare our disks
-Add a new hard disk to your VM
-Login to your Linux Systems
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 20G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 19G 0 part
├─centos-root 253:0 0 17G 0 lvm /
└─centos-swap 253:1 0 2G 0 lvm [SWAP]
sdb 8:16 0 10G 0 disk
the disk is now there and it has 10 GB
![](http://linuxvaults.com/content/images/2020/12/image.png)
Let's check the file system after its been corrupted.
Mounting the file system we will have the message wrong file system type.
![](http://linuxvaults.com/content/images/2020/12/image-1.png)
![](http://linuxvaults.com/content/images/2020/12/image-2.png)
To fix the error for XFS file type
We will use the command xfs_repair as follows
![](http://linuxvaults.com/content/images/2020/12/image-5.png)
To fix the error for EXT4 file type
We will use the command e2fsck
![](http://linuxvaults.com/content/images/2020/12/image-3.png)
Lets try to mount it ad view the file system contents
![](http://linuxvaults.com/content/images/2020/12/image-4.png)
- Recover mis-configured or broken LVM configurations
we will create LVM then break it then attempt to identify the issues and fix them.
let's set the disk create another partition for /dev/sdb with 3 Gb
![](http://linuxvaults.com/content/images/2020/12/image-6.png)
We can see now we have sdb3 available
![](http://linuxvaults.com/content/images/2020/12/image-7.png)
We will create a physical volume for sdb3
![](http://linuxvaults.com/content/images/2020/12/image-8.png)
Let's create a logical volume
create the volume group
![](http://linuxvaults.com/content/images/2020/12/image-9.png)
Then create the logical volume
![](http://linuxvaults.com/content/images/2020/12/image-10.png)
View the logical volume information
![](http://linuxvaults.com/content/images/2020/12/image-11.png)
create an xfs file system
![](http://linuxvaults.com/content/images/2020/12/image-12.png)
- Recover data from encrypted file systems
- Identify and fix iSCSI issues