Lvm

De Admin -- TALEVAS.
(Différences entre les versions)
Ligne 22 : Ligne 22 :
 
  # df -h |grep DATA
 
  # df -h |grep DATA
 
  50G  180M  47G  1% /mnt/DATA
 
  50G  180M  47G  1% /mnt/DATA
 +
 +
== too many metadata areas for pvresize ==
 +
 +
This "too many metadata areas for pvresize" is telling you that pvresize doesn't know how to resize with metadata at the end of the device. Follow these steps as a workaround. These steps are potentially dangerous but have been tested and worked for me.
 +
 +
 +
 +
  1. vgcfgbackup -v -f /some/file volumeGroup
 +
 +
  2. vgchange -an volumeGroup
 +
  3. pvcreate -ff --metadatacopies 1 --restorefile /some/file --uuid UUID /dev/device
 +
  4. vgcfgrestore -v -f /some/file volumeGroup
 +
  5. pvresize /dev/device
 +
 +
Serrer les fessssssses !!

Version du 21 janvier 2010 à 16:24

Sommaire

LVM

pvcreate /dev/hdb
vgcreate my_volume_group /dev/hda1 /dev/hdb1
lvcreate -L1500 -ntestlv testvg

A ecrire


les volumes ne sont pas available lors du boot

vgchange -a e snapshots


RESIZE FS

# umount /mnt/DATA
# e2fsck -f /dev/vg01/data
# resize2fs -p /dev/vg01/data 50G
# lvresize -L 50G /dev/vg01/data
# mount /mnt/DATA/
# df -h |grep DATA
50G  180M   47G   1% /mnt/DATA

too many metadata areas for pvresize

This "too many metadata areas for pvresize" is telling you that pvresize doesn't know how to resize with metadata at the end of the device. Follow these steps as a workaround. These steps are potentially dangerous but have been tested and worked for me.


  1. vgcfgbackup -v -f /some/file volumeGroup
  2. vgchange -an volumeGroup
  3. pvcreate -ff --metadatacopies 1 --restorefile /some/file --uuid UUID /dev/device
  4. vgcfgrestore -v -f /some/file volumeGroup 
  5. pvresize /dev/device

Serrer les fessssssses !!