Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Am I doing something wrong here?

Posted on 2004-09-26
7
Medium Priority
?
207 Views
Last Modified: 2010-04-20
dd bs=2048 if=/dev/hda1 | split -b 2000m - /mnt/1/1.img

Currently it takes 30 mins for the above command for 20 gigs without th bs paramater. I've tried bs=4096 and bs=2048 but the speed doesn't get affected and stas on 30 mins.

Any ideas how dd can be speeded up?

Thanks
0
Comment
Question by:bunny47
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 2

Expert Comment

by:fulp02
ID: 12154273
You are not going to be able to  You  are moving 20 Gigs . the only
way is you need more memory or a faster processor and faster hard drives
I am sorry i know it sucks but it is pretty much the only way.

Or you can keep moving the bs up and see if that keeps the drive rapidly reading more
0
 

Author Comment

by:bunny47
ID: 12154483
WHy is that, why doesn't the bs= work with a 20 gig drive :-( Is there no way I can make it speed up?



Thanks

0
 
LVL 2

Expert Comment

by:fulp02
ID: 12155036
The Problem Is that your drive is to slow . You can only read as fast as the drive will let
you and write is the same, Now if you had two seperate hard drives in there it would be a diffrent story
you could read from one and write to the other. and that should speed it up a good amount.

Maybe if you had 3 hard drives
two in a software raid and one to back up to that  would increase by at least a quater of the time ,
You could also make cron jobs so it backs up everynight while you are not using your computer personaly
that is what i would do .
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:EinarTh
ID: 12159394
you should look at the hdparm command. Maybe you could tweak the drive a bit....
0
 
LVL 4

Expert Comment

by:bytta
ID: 12245323
It might help to know why you are doing this - maybe some incremental program like rsync would do a better job...
0
 

Author Comment

by:bunny47
ID: 12268129
Hi, Sorry for the late reply :-(

Okay here's some background - I've got a OS/2 box with on physical drive partitioned as hda2 and hda5 with some extra free space, I want to connect another local drive onto the machine (think it's gonna be hdb1) and make a complete backup of the partitions, boot record, partition table, and data. When I restore the data back from hdb1 (my 2nd physical drive I've inserted) onto hda.

So in other words a blank hard drive (primary) can be fully restored as above > boot record, partition tables, data and partitions - hda2 and hda5...

I've tried partimage but I get a segmentation fault > I think partimage is having trouble reading the filesystem which is hpfs.

-----------------------------------------------------------------------------------------

It kinda works with dd as follows:

 clear
mkdir /mnt/1
mount /dev/hdb1 /mnt/1
 clear
cd /mnt/1
dd if=/dev/hda of=backup-hda.mbr count=1 bs=512
sfdisk -d /dev/hda > backup-hda.sf
 clear
echo Backup has started, please be patient...
dd bs=4096 if=/dev/hda1 | split -b 200m - /mnt/1/image.img
 clear
cd /mnt/1
dd if=/dev/hda of=backup-hda.mbr count=1 bs=4096
sfdisk -d /dev/hda > backup-hda.sf
clear


-----------------------------------------------------------------------------------------
And the restore:

 clear
mkdir /mnt/1
mount -t hpfs /dev/hdb1 /mnt/1
mount /dev/hdb1 /mnt/1
                    echo The restore begins...
cat bs=4096 /mnt/1/1.imgaa | dd of=/dev/hda1
clear
mount -t hpfs /dev/hdb1 /mnt/sydos
mount /dev/hdb1 /mnt/sydos
cd /mnt/sydos
dd if=backup-hda.mbr of=/dev/hda
sfdisk /dev/hda < backup-hda.sf

-----------------------------------------------------------------------------------------

The problem is the speed, I'm backing up a 20 gig drive that's set as slave on the same ide cable sa the master that's running OS/2 My 2 hard drives are 3 x 7200rpm western digital... Surely I can speed it up somehow?

Thanks a Mil for all the input so far!!!!!!!!!!!!!
0
 
LVL 4

Accepted Solution

by:
bytta earned 1500 total points
ID: 12271235
Again - I recommend rsync for the job.

To my knowledge - it can not copy to/from an img file, but as it only copies the files that have changed you will probably just need to copy 0-2 Gb each time (depending on how often you backup). This way your backup has the same structure as the original so accessing a single file from it does not require a restore.

The first time everything will need to be copied so it WILL take longer than your 30 min dd command, but after that the process will probably take much less time.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month7 days, 22 hours left to enroll

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question