- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Disk Cloning using Linux
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2003 07:18 PM
06-08-2003 07:18 PM
Disk Cloning using Linux
lets say I want to clone a hard disk to another identical disk using Linux. This is how I plan to do it.
1. Setup a system in the following manner
hda : Red Hat 8.0
hdb : Disk I want to clone
hdc : Disk I want to clone to
2. Copy the contents from hdb to hdc using the commands
cp /dev/hdb /dev/hdc
Will this work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2003 07:49 PM
06-08-2003 07:49 PM
Re: Disk Cloning using Linux
dd if=/dev/hdb of=/dev/hdc bs=64k
Depending on available memory, you can increase the bs (blocksize) parameter.
dd is best used when copying disk images. See the dd manpage for more info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2003 07:57 PM
06-08-2003 07:57 PM
Re: Disk Cloning using Linux
I use it as a substitute in Linux to Ignite backups which I use in HP-UX.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2003 11:30 PM
06-08-2003 11:30 PM
Re: Disk Cloning using Linux
Regards,
Sergejs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2003 04:01 AM
06-09-2003 04:01 AM
Re: Disk Cloning using Linux
I would stick on the dd command, which can be not space water if you use the right argument on it. Have a man dd for details, but to be short don't use bs unless you know hdb sector and block size (if so, use it !), and if both disks are the same, and don't use sync to avoir blanc octects and space wasting.
hth
J
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2003 12:08 PM
06-09-2003 12:08 PM
Re: Disk Cloning using Linux
If the disks in the same size you can
use "dd".
If not you can do this (in the end you can
write a script that will do this)
What you need to do is to build the hdc
just like the hdb, you can do it by "sfdisk"
after you need to mount the whole tree of hdb
and hdc and copy the hdb tree to hdc tree
(by cp, cpio, tar or dump)
after you will finish the copy made
put the hdc disk as the hda
but with the rescue disk, mount the whole
tree and install the boot loader (lilo/grub)
If you want to put the disk as hdb/hdc etc.
you will need to change the /etc/fstab for.
Good luck!
Caesar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 02:51 AM
06-11-2003 02:51 AM
Re: Disk Cloning using Linux
fdisk /dev/hdc --> Make same partitions as hdb.
mk(whateverfs you want on your new disk) /dev/hdc[1-X]
mount /dev/hdc[1-X] /mnt/[1-X]
Do this for each of the partition
cd (root of fs to copy from)
find . |cpio -pdumv (destination mountpoint)
if it is a bootable disk:
chroot (directory of where new / is, make sure that new /boot is mounted correctly relative to new / )
edit /etc/fstab (in chrooted env) to fit the new disk names a.s.o.)
edit lilo.conf/grub.conf and run lilo/grub-install.
Rgds Jarle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 05:18 AM
06-11-2003 05:18 AM
Re: Disk Cloning using Linux
dd if=/dev/hdb of=/dev/hdc bs=1024k
because dd will scan whole disk, therefore it may use relatively long time even you only use 10% of the diskspace. to save time insuch situation, you can consider using cpio or tar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 08:55 PM
06-11-2003 08:55 PM
Re: Disk Cloning using Linux
You mean to get an image, I could actually do
tar -cvzf image.tar.gz /dev/hdb
and when I need to clone to another hard drive /dev/hdc
tar -xvzf image.tar.gz - >> /dev/hdc
I just untar the image and output the data to /dev/hdc?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 09:15 PM
06-11-2003 09:15 PM
Re: Disk Cloning using Linux
Share my experience, sometimes i need to clone data or application from our production environment to another test machine, in such case i usually break the disk mirror and use those disks on test environment.
Sometimes, i only to copy the data from production system to test system. if this is the case, i usually use dd to clone whole disk or i use cpio to copy the datafiles only.
Hope the experience could help.
twang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2003 11:11 PM
06-11-2003 11:11 PM
Re: Disk Cloning using Linux
tar -cvzf image.tar.gz /dev/hdb
will give you a gzipped tar file with only the /dev/hdb DEVICE-FILE, not the contents of it.
Rgds Jarle