0

This is a follow-up on this question: How to run fsck with LVM

I have a RHEL 9 server which uses LVM on /dev/sda3. There are several LVs on a single VG.

After booting in maintenance mode (rd.break kernel option at GRUB boot line), I'd like to run a fsck on all partitions.

However, /dev/mapper/ and /dev/myvg/ only list the root and swap LVs, which are the only ones mentioned in rd.lvm.lv= in the kernel options.

A xfs_repair /dev/sda3 returns an error

Cannot open /dev/sda3: Device or resource busy.

How can I find (and do a fs check) the other LVs?

6
  • 1
    Do the other LVs show up in lvs’ output? Does it help if you run vgchange -a y? Commented Jun 25 at 12:54
  • These commands are not found on my system in maintenance mode. Commented Jun 25 at 13:02
  • You might need to specify the path — /usr/sbin/lvs and /usr/sbin/vgchange. Commented Jun 25 at 13:12
  • No, they are not present in /usr/sbin/ Commented Jun 25 at 13:29
  • OK, so what is result of echo "$PATH" please Commented Jun 25 at 13:58

1 Answer 1

2

xfs_repair /dev/sda3 does not work if /dev/sda3 is an LVM physical volume. A filesystem (or a filesystem tool) needs a block device to work with, that is an LVM logical volume.

If /usr/sbin/vgchange does not exist, try /usr/sbin/lvm vgchange.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.