[comp.unix.wizards] Copying disks

aegl@root.co.uk (Tony Luck) (12/16/87)

In article <10773@brl-adm.ARPA> rbj@icst-cmr.arpa (Root Boy Jim) writes:
>by default. Now I type `dd<rhp0a>rhp1a bs=16k' instead of the brutally
                                        ^^^^^^
I was bitten a while back (on 4.1bsd) by the 'up' driver which silently
forgot about the last partial transfer that should happen when you use
the above command (an 'a' partition has 15884 sectors so if you use a
block size of 16k you should do 496 whole transfers and one itsy little
transfer of the last 10 blocks). Everything was ok until some of those
last ten blocks got allocated for a directory!

I don't think this should be a problem on 4.2 or later because the fast
filesystem tends to ignore a bunch of blocks in the last cylinder - and
besides the bugs in the driver may have been fixed.

But if you don't trust your driver and you think you might want *all* of
your disk copied pick a buffer size that is a factor of the partition
size. (use /usr/games/factor - unix seems to throw in utilities to help
you work round the bugs in the rest of the system!)

-Tony Luck