User Tools

Site Tools


docs:tips_n_tricks:lvm.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docs:tips_n_tricks:lvm.html [12.07.2014 17:24 CEST] – [Get rid of left over /dev/dm-XXX nodes] peterdocs:tips_n_tricks:lvm.html [31.07.2018 11:12 CEST] (current) peter
Line 1: Line 1:
 ====== LVM ====== ====== LVM ======
  
 +{{entry>Linux}}
 +{{entry>LVM}}
 +{{tag>Linux LVM}}
 ===== Get rid of detatched PVs ===== ===== Get rid of detatched PVs =====
  
-After removing a LVM physical device without unounting and deactivating the volumes first, you see this kind of error:+After removing a LVM physical device without unmounting and deactivating the volumes first, you see this kind of error:
  
   ~ # pvs   ~ # pvs
Line 32: Line 35:
 ... and your //lvm// commands are quiet again :-) ... and your //lvm// commands are quiet again :-)
  
-{{entry>Linux}} +===== Boot with /usr etc. on LVM ===== 
-{{entry>LVM}} + 
-{{tag>Linux LVM}}+Recent Ubuntu and Mint distributions seem to have trouble booting systems where relevant filesystems on LVM are referenced by label or uuid instead of ''/dev/''... . 
 + 
 +Tracking this down on Mint 18.2 lead me to the file ''/usr/share/initramfs-tools/scripts/local-block/lvm2'', where ''lvm lvchange'' is only called for devices matching the pattern ''/dev/*/*'' 
 + 
 +//enigmaticPhysicist// on //Ask Ubuntu// regarding [[https://askubuntu.com/questions/551446/cant-find-lvm-root-dropped-back-to-initramfs|Can't find LVM root dropped back to initramfs]] had a solution to this by adding an initrd script: 
 + 
 +<code bash /etc/initramfs-tools/scripts/local-top/forcelvm> 
 +#!/bin/sh 
 +PREREQ="" 
 +prereqs() 
 +
 +   echo "$PREREQ" 
 +
 +case $1 in 
 +prereqs) 
 +   prereqs 
 +   exit 0 
 +   ;; 
 +esac 
 +. /scripts/functions 
 +# Begin real processing below this line 
 + 
 +# This was necessary because ubuntu's LVM autodetect is completely broken. This 
 +# is the only line they needed in their script. It makes no sense. 
 +# How was this so hard for you to do, Ubuntu?!?!? 
 +lvm vgchange -ay 
 +</code> 
 + 
 +__N.B.:__ Ubuntu Bug [[https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1573982|#1573982]] seems to handle this. 
 + 
 +{{entry>booting}} 
 +{{entry>initrd}} 
 +{{tag>booting initrd}}
      
docs/tips_n_tricks/lvm.html.1405178690.txt.gz · Last modified: 12.07.2014 17:24 CEST by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki