[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Replace a failed block device with null PV in an LVM VG



	Hi.

On Wed, Mar 24, 2021 at 10:26:49AM +0000, David Pottage wrote:
> Is there a way to assemble the VG and mount those ext4 filesystems in
> such a way that read attempts from the missing PV will return zeros,
> but the rest of the filesystem will work?

Try this:

vgchange --activationmode partial -ay
lvs
# immediately dump logical volume in question somewhere with cat/dd
cat /dev/<vg>/<lv> > lv.img
vgchange -an <vg>
# run fsck -f on a copy of logical volume
fsck -f lv.img
# try mounting it
mount -o loop lv.img /<mountpoint>

Reco


Reply to: