Unable to pass the persistence check for mounting a logical volume in the Linux code challenge

As a participant in the Linux code challenge, I have written a script for the first lab page to create and mount a logical volume in the system. The script should ensure that the mount point is persistent across reboots with the correct default options, which are:

  • Mount point: /mnt/dba_storage
  • LV Path: /dev/dba_storage/volume_1
  • LV Name: volume_1
  • VG Name: dba_storage
  • Mount point has “read/write” access
  • “volume_1” has “XFS” filesystem

My solution was to add the following line to the /etc/fstab file:
/dev/dba_storage/volume_1 /mnt/dba_storage xfs rw 0 0
by running the following command:
echo “/dev/dba_storage/volume_1 /mnt/dba_storage xfs rw 0 0” >> /etc/fstab

However, the check for persistence does not pass, and the task is not completed.

Expected Results:
The mount point should be persistent across reboots with the correct default options, and the check should pass.

Actual Results:
The check for persistence does not pass, and the task is not completed.

I also have this problem
but I directly add the line
/dev/dba_storage/volume_1 /mnt/dba_storage xfs defaults 0 0
via sudo vi /etc/fstab

Please refer to the solution here

add the /mapper after /dev it will solve the problem

update the line as follows :

/dev/mapper/dba_storage/volume_1 /mnt/dba_storage xfs defaults 0 0

lvm volume are in two locations /dev/<mount_point> as well as /dev/mapper/<mount_point>