On Fri, 2007-09-07 at 23:13 +0800, Kuang-Chun Cheng wrote:
Hi,
I have CentOS 5.0 which use an old hard disk. And recently I found there are some bad sector on it ... I try to backup my data to other CentOS 5.0 box ....
What I did is. I remove the old HD (with bad sector) and install it as a slave IDE on a working CentOS 5.0 ... I try to mount the old HD as /mnt/oldDisk but since it's a LVM, the "mount -t ext3" doesn't work.
I'm new to LVM ... could someone help me on this.
Also, there is a problem I found. Both HD have the same VG called /dev/VolGroup00 ...
server:[root]/dev> pvscan PV /dev/hdb2 VG VolGroup00 lvm2 [76.22 GB / 0 free] PV /dev/hda2 VG VolGroup00 lvm2 [76.22 GB / 0 free] Total: 2 [152.44 GB] / in use: 2 [152.44 GB] / in no VG: 0 [0 ]
where the /dev/hdb2 is the old one with bad sector ... and it's unmounted. The /dev/hda2 is the root filesystem of the working CentOS 5.0
Regards KC
<snip sig stuff>
Put it back in the original box, use lvm export, put in the new box, lvm import. I have successfully done it like you started, but I had to jigger and rename the "foreign" HD, IIRC. I'd have to experiment to recall what/how I did it then.
BTW, don't be afraid to RTFM on LVM. There's lots of useful stuff.
HTH -- Bill