Pb LVM

Erreur Device /dev/sda excluded by a filter.

Device /dev/sda excluded by a filter.

Solutions

Solutions

dd if=/dev/zero of=/dev/sda count=1 bs=512

Ou (à tester)

sgdisk --zap-all -- /dev/sda

Erreur /dev/sdb: open failed: No medium found

# vgs
/dev/sdb: open failed: No medium found
VG #PV #LV #SN Attr VSize VFree
vg_data 1 1 0 wz--n- <931.51g 930.55g
vgos 1 4 0 wz--n- <237.52g 79.82g
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
└─sda1 8:1 0 931.5G 0 part
└─vg_data-data 254:5 0 976M 0 lvm
nvme0n1 259:0 0 238.5G 0 disk
├─nvme0n1p1 259:1 0 488M 0 part /boot
├─nvme0n1p2 259:2 0 488M 0 part /boot/efi
└─nvme0n1p3 259:3 0 237.5G 0 part
├─vgos-root 254:0 0 46.6G 0 lvm /
├─vgos-swap 254:1 0 15.3G 0 lvm [SWAP]
├─vgos-var 254:2 0 55.9G 0 lvm /var
└─vgos-home 254:3 0 40G 0 lvm /home

Dans notre cas nous avons un /dev/sdb fantome

# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
fdisk: cannot open /dev/sdb: No medium found

Solution

Solution temporaire

# mv /dev/sdb .
# vgs
VG #PV #LV #SN Attr VSize VFree
vg_data 1 1 0 wz--n- <931.51g 930.55g
vgos 1 4 0 wz--n- <237.52g 79.82g

Erreur Locking type -1 initialisation failed

Voir :

https://access.redhat.com/solutions/68745

http://www.ceus-now.com/how-to-deal-with-gentoo-failing-to-boot-due-to-locking-type-initialisation-failed-on-checkroot/

Solution

Vérifier si /var n'est pas monté en lecture seul (voir locking_dir dans lvm.conf)

Utiliser l'option --ignorelockingfailure

Exemple 1

vgchange --ignorelockingfailure -P -a y

Exemple 2

pvs --config 'global { locking_dir = "/tmp" }

Err Device mismatch detected

Source : https://documentation.commvault.com/commvault/v11_sp16/article?p=31713.htm

Cause

If the virtual machine where a File Recovery Enabler for Linux is installed is based on the same VM template or image as the guest virtual machines or instances that the FREL is browsing, then live browse of files and folders on the guest VMs might fail as a result of UUID conflicts with physical volumes (PVs) on the FREL.

Resolution

To resolve this issue, change the UUIDs of the PVs on the FREL:

List all the physical volumes:

pvs -o --noheadings

Change the UUID for each PV listed in step 1.

pvchange -f --uuid pv_name --config "global {activation=0}"

List all the volume groups:

vgs -o vg_name,vg_uuid,pv_name --noheadings

Run the following commands to change the UUIDs and rename each of the volume groups listed in step 3 and activate the changed configuration:

vgchange --uuid vg_name --config "global {activation=0}"
vgrename old_vg_name new_vg_name
vgchange -ay new_vg_name

Autres RO FS

touch /plop

touch: ne peut faire un touch sur `/plop': Système de fichiers accessible en lecture seulement

blockdev --setrw /dev/sda mount -o remount,rw /

mount: périphérique de type bloc/dev/VolGroup00/LogVol00 est protégé en écriture, on le monte en lecture seulement

pvdisplay

Locking type -1 initialisation failed.

Exemple de commande en lien, à tester

vgchange --ignorelockingfailure -P -a y vgchange -a y VolGroup-1 blockdev --rereadpt /dev/sda

A voir aussi

/etc/lvm/lvm.conf locking_type = 1 locking_dir = "/var/lock/lvm"
lvchange -p rw lvm vgchange -ayl --ignorelockingfailure lvm vgmknodes --ignorelockingfailure if touch -c / >& /dev/null