LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-26-2010, 07:46 PM   #1
scc
LQ Newbie
 
Registered: Jan 2010
Posts: 1

Rep: Reputation: 0
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 07:48 PM.
 
Old 01-27-2010, 05:22 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
use dd to copy the mbr and copy the rest with cp.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot copy data from a second disk Papa Echo Linux - Newbie 13 01-27-2010 01:24 AM
Copy of IBM Server hard disk data to Another USB External Hard disk mazharcdn Linux - Server 2 09-02-2009 01:41 AM
Copy data from one hard disk to another hard disk vino87 Linux - Desktop 4 08-07-2009 12:37 AM
LVM - recovering data after a disk failure. bogaurd Linux - Software 2 12-19-2005 12:34 PM
Cannot Copy files from DVD data disk bear2x Linux - Hardware 4 06-23-2005 11:03 AM


All times are GMT -5. The time now is 07:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration