Outils pour utilisateurs

Outils du site


tech:pb_lvm

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:pb_lvm [2025/05/31 22:26] Jean-Baptistetech:pb_lvm [2026/06/07 19:12] (Version actuelle) – modification externe 127.0.0.1
Ligne 1: Ligne 1:
 +<!DOCTYPE markdown>
 +{{tag>Brouillon Pb LVM CA}}
 +
 +# Pb LVM
 +
 +## Erreur Device /dev/sda excluded by a filter.
 +
 +~~~
 +Device /dev/sda excluded by a filter.
 +~~~
 +
 +
 +### Solutions
 +
 +Solutions
 +~~~bash
 +dd if=/dev/zero of=/dev/sda count=1 bs=512
 +~~~
 +
 +Ou (à tester)
 +~~~bash
 +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       0 wz--n- <931.51g 930.55g
 +  vgos      1     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:   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:   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       0 wz--n- <931.51g 930.55g
 +  vgos      1     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
 +~~~bash
 +vgchange --ignorelockingfailure -P -a y
 +~~~
 +
 +Exemple 2
 +~~~bash
 +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.
 +~~~bash
 +pvchange -f --uuid pv_name --config "global {activation=0}"
 +~~~
 +
 +
 +List all the volume groups:
 +~~~bash
 +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:
 +~~~bash
 +vgchange --uuid vg_name --config "global {activation=0}"
 +~~~
 +
 +~~~bash
 +vgrename old_vg_name new_vg_name
 +~~~
 +
 +~~~bash
 +vgchange -ay new_vg_name
 +~~~
 +
 +
 +
 +### Autres RO FS
 +
 +~~~bash
 +touch /plop
 +~~~
 +
 +~~~
 +touch: ne peut faire un touch sur `/plop': Système de fichiers accessible en lecture seulement
 +~~~
 +
 +~~~bash
 +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
 +~~~
 +
 +~~~bash
 +pvdisplay
 +~~~
 +
 +~~~
 +  Locking type -1 initialisation failed.
 +~~~
 +
 +Exemple de commande en lien, à tester
 +~~~bash
 +vgchange --ignorelockingfailure -P -a y
 +vgchange -a y VolGroup-1
 +blockdev --rereadpt /dev/sda
 +~~~
 +
 +
 +
 +A voir aussi
 +
 +`lvm.conf`
 +~~~ini
 +/etc/lvm/lvm.conf
 +locking_type = 1
 +locking_dir = "/var/lock/lvm"
 +~~~
 +
 +~~~bash
 +lvchange -p rw
 +
 +lvm vgchange -ayl --ignorelockingfailure
 +lvm vgmknodes --ignorelockingfailure
 +if touch -c / >& /dev/null
 +~~~
 +
 +
 +## Pb /dev/mapper missing LV
 +
 +
 +### Solution
 +
 +~~~bash
 +vgscan --mknodes
 +~~~
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki