0

Base on http://www.centos.org/docs/5/html/5.2/Cluster_Logical_Volume_Manager/create_linear_volumes.html "When you create a logical volume, the logical volume is carved from a volume group using the free extents on the physical volumes that make up the volume group. Normally logical volumes use up any space available on the underlying physical volumes on a next-free basis. Modifying the logical volume frees and reallocates space in the physical volumes."

I'm having doubt if creating a logical volume on physical volume that have existing data, lvcreate command will delete the data base on this statement "Modifying the logical volume frees and reallocates space in the physical volumes".

I'm trying to recover my logical volume and mounting it to the server. I have my whole problem stated in another question (http://stackoverflow.com/questions/13356555/how-to-mount-logical-volume).

Hope you guys will help me. Any help would be appreciated. Thanks.

Jan Mark
  • 147
  • 1
  • 2
  • 10

1 Answers1

0

lvm is a logical layer mounted on top of physical block allocated devices. It allows you to basically extend your volume across multiple physical disks.

It's a particular way of partitioning the block devices, so yes it takes over how those disks are managed at a higher level then physical voluming.

LVCREATE will will disconnect your data on the physical volumes from the logical layer if you are not just doing a resize. (I'd be careful you have a backup)

If you've lost control of your LV ie destroyed a table entry, you can still forcibly mount the volume RO and possibly recover the contents. You also may be able to repair the volume in question.

If you have lost contact with your data, you can also fully image each disk off to scratch media as files to restore any data lost in your array or logical volume.

this way, you could run multiple passes or repair attempts.

To do this you MUST stop lv, and mdadm and have the drives unmounted in a system.

Let me know if you need a further explanation of how to image off the drives.

CoRe
  • 102
  • 7