LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 06: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 06:48 PM.
 
Old 01-27-2010, 04:22 AM   #2
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,596

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


Reply



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 12:24 AM
Copy of IBM Server hard disk data to Another USB External Hard disk mazharcdn Linux - Server 2 09-02-2009 12:41 AM
Copy data from one hard disk to another hard disk vino87 Linux - Desktop 4 08-06-2009 11:37 PM
LVM - recovering data after a disk failure. bogaurd Linux - Software 2 12-19-2005 11:34 AM
Cannot Copy files from DVD data disk bear2x Linux - Hardware 4 06-23-2005 10:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:58 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
Open Source Consulting | Domain Registration