Wednesday 4 July 2012

Mounting CentOS5 LVM Disk using Ubuntu12.04

Issue: In  CentOs5 hard disk--> /shan LVM file system, i want take backup entire /shan lvm file system to My Ubuntu Machine  ???

CentOs5 harddisk :/dev/sda
Ubuntu hardisk : /dev/sdb

==> i am  login Ubuntu machine---->login Ubuntu,
==>$sudo df -hT
==>$sudo fdisk -l
==>Ubuntu machine check lvm2 install are not. if not go to below steps.....
==>$vgscan ( it shows inactive ext3 lvm filesystem)
==>$vgchange -a y
==>$vgscan (it show active ext3 lvm filesystem)
==>$sudo mount /dev/VolGroup00/LogVol00 /mnt
==>$cd /mnt
know you mounted centos lvm2 filesystem in ubuntu12 and take entire backup.




1. Boot using the live cd. Search for these tools: lvm2. If the cd do not have it, install it.
# apt-get install lvm2


2. To make sure the harddisk is recognised, you can use fdisk
# fdisk -lu


3. Once installed, run pvscan to scan all disks for physical volume. this to make sure your LVM harddisk is detected by Ubuntu
# pvscan


PV /dev/sda2 VG VolGroup00 lvm2 [74.41 GB / 32.00 MB free]Total: 1 [74.41 GB] / in use: 1 [74.41 GB] / in no VG: 0 [0 ]4. After that run vgscan to scan disks for volume groups.
# vgscan


Reading all physical volumes. This may take a while...Found volume group "VolGroup00" using metadata type lvm2


5. Activate all volume groups available. 
# vgchange -a y


2 logical volume(s) in volume group "VolGroup00" now active


6. Run lvscan to scan all disks for logical volume. You can see partitions inside the hard disk now active.
# lvscan


ACTIVE '/dev/VolGroup00/LogVol00' [72.44 GB] inheritACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit


7. Mount the partition to any directory you want, usually to /mnt
# mount /dev/VolGroup00/LogVol00 /mnt


8. You can access the partition in the /mnt directory and can backup your data

No comments:

Post a Comment