- sudo su
- instalamos lvm2
- aptitude install lvm2 ó yum install lvm2
- fdisk -l (para verificar que existen lvm)
- pvscan (escaneo particiones lvm)
- vgscan (detectar grupos LVM)
- vgchange -a y (activa los LVM logicos para poder escanearlos)
- lvscan (para poder ver los volumenes logicos disponibles)
- crear una carpera en la cual montar el volumen logico.
- /mnt/volumen1 o /media/volumen1 según el sistema.
para un caso particular es importante que el sistema no monte en el arranque /dev/sales/reports ya que si esta corrupto no permitira autenticar en el sistema.
- Type root's password
- Edit the /etc/fstab file
- Comment out the line with /dev/sales/repor
- Reboot
Para verificar el estado de los volumenes y comprobar si tenemos errores
- cat /proc/partition
- pvscan
- Fortunately, the meta data and file system on the disk that was /dev/sdc are intact.
- So the recovery is to just put the disk back.
- Reboot the server.
- The /etc/init.d/boot.lvm start script will scan and activate the volume group at boot time.
- Don't forget to uncomment the /dev/sales/reports device in the /etc/fstab file.
Solution 1:
- Since the disk was never removed, leave it as is.
- There were no device UUID errors, so don't attempt to restore the UUIDs.
- This is a good candidate to just try restoring the LVM meta data.
- Run a file system check on /dev/sales/reports. whit e2fsck /dev/sales/reports
vgcfgrestore sales Couldn't find device with uuid '56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu'. Couldn't find all physical volumes for volume group sales. Restore failed.
- Comparing the output of cat /proc/partitions and pvscan shows the missing device is /dev/sdc, andpvscan shows which UUID it needs for that device. So, copy and paste the UUID that pvscan shows for /dev/sdc.
- Restore the LVM meta data
- Run a file system check on /dev/sales/reports.
ls-lvm:~ # pvcreate --uuid 56ogEk-OzLS-cKBc-z9vJ-kP65-DUBI-hwZPSu /dev/sdc Physical volume "/dev/sdc" successfully created
ls-lvm:~ # vgcfgrestore sales Restored volume group sales ls-lvm:~ # vgscan Reading all physical volumes. This may take a while... Found volume group "sales" using metadata type lvm2 ls-lvm:~ # vgchange -ay sales 1 logical volume(s) in volume group "sales" now active
ls-lvm:~ # e2fsck /dev/sales/reports e2fsck 1.38 (30-Jun-2005) /dev/sales/reports: clean, 961/131072 files, 257431/262144 blocks ls-lvm:~ # mount /dev/sales/reports /sales/reports/ ls-lvm:~ # df -h /sales/reports Filesystem Size Used Avail Use% Mounted on /dev/mapper/sales-reports 1008M 990M 0 100% /sales/reports
Tomado de
http://www.novell.com/coolsolutions/appnote/19386.html
http://hotfixed.net/2011/07/25/montar-particiones-lvm-desde-un-livecd/