LVM data copy to different disk
hello all!
i've got a CentOS 5.4 box and the following disks connected:
# parted /dev/sda print
Model: ATA WDC WD1600BEKT-0 (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 107MB 107MB primary ext3 boot
2 107MB 160GB 160GB primary lvm
# parted /dev/sdb print
Model: ATA WDC WD1200BEVT-0 (scsi)
Disk /dev/sdb: 120GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 32.3kB 107MB 107MB primary ext3 boot
2 107MB 120GB 120GB primary ext3 lvm
the OS, data and programs are on /dev/sda.
I'd like to copy the full directories and files to the newly added /dev/sdb wich has, as you can see, less space.
Also note that /dev/sda has only about 3.6Gigs uses, so it will no doubt easily go into /dev/sdb.
How can i do the full copy, and yet make /dev/sdb bootable just like /dev/sda (just as if it was cloned by Ghost) ?
I've checked dd, but AFAIK, it needs that both source and target devices be the same in size.
TIA
SCC
Last edited by scc; 01-26-2010 at 06:48 PM.
|