RedHat LVM Error

hello guys,

I just had some issues with a script it is giving some errors or warning like

[Ensure that data and catalog directories do not exist on the following logical volumes: [33m[WARN]    LV name root

what do i need to do to remove this directory from the existing logical volume
Thanks

You should list the exact information about the volumes you are referring to.

root@NRCADR IMDataRepository_vertica9]# vgs
  VG   #PV #LV #SN Attr   VSize  VFree
  rhel   1   5   0 wz--n- 58.00g 4.00m

*******************************************************************************************
*******************************************************************************************

[root@NRCADR IMDataRepository_vertica9]# fdisk -l

Disk /dev/sda: 68.7 GB, 68719476736 bytes, 134217728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000b45d6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     2099199     1048576   83  Linux
/dev/sda2         2099200   123748351    60824576   8e  Linux LVM

Disk /dev/mapper/rhel-root: 17.2 GB, 17179869184 bytes, 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/rhel-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/rhel-home: 17.2 GB, 17179869184 bytes, 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/rhel-var: 17.2 GB, 17179869184 bytes, 33554432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/rhel-tmp: 8589 MB, 8589934592 bytes, 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

*******************************************************************************************
*******************************************************************************************

[root@NRCADR IMDataRepository_vertica9]# lvs
  LV   VG   Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home rhel -wi-ao---- 16.00g
  root rhel -wi-ao---- 16.00g
  swap rhel -wi-ao----  2.00g
  tmp  rhel -wi-ao----  8.00g
  var  rhel -wi-ao---- 16.00g

*******************************************************************************************
*******************************************************************************************

[root@NRCADR IMDataRepository_vertica9]# df -h
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root   16G  8.1G  6.8G  55% /
devtmpfs               5.8G     0  5.8G   0% /dev
tmpfs                  5.8G   88K  5.8G   1% /dev/shm
tmpfs                  5.8G   17M  5.8G   1% /run
tmpfs                  5.8G     0  5.8G   0% /sys/fs/cgroup
/dev/sda1              976M  143M  767M  16% /boot
/dev/mapper/rhel-tmp   7.8G  1.1G  6.4G  14% /tmp
/dev/mapper/rhel-var    16G  543M   15G   4% /var
/dev/mapper/rhel-home   16G   45M   15G   1% /home
tmpfs                  1.2G   36K  1.2G   1% /run/user/0
/dev/sr0               3.6G  3.6G     0 100% /run/media/root/RHEL-7.3 Server.x86_64

*******************************************************************************************
*******************************************************************************************

[root@NRCADR IMDataRepository_vertica9]# file -sL /dev/mapper/rhel-root
/dev/mapper/rhel-root: Linux rev 1.0 ext4 filesystem data, UUID=709c82ab-9f8b-41e4-a4d0-e81c74c1a66b (needs journal recovery) (extents) (64bit) (large files) (huge files)

thanks

Has this box been abruptly powered off (power failure or kernel panic ?)

That would be the reason for error regarding journal recovery.
Course of action would be to boot rescue / live, active the root volume group and run a fsck on root logical volume.

Or do a clean reboot, and it should run fsck automatically during boot.

As for the error in the first post, well, looks like data and catalog directories of <insert application> exist, so you need to delete those before rerun.

Hope that helps
Regards
Peasant.