Disk Paritioning Clobbered
Ian Dall
ian at sibyl.eleceng.ua.OZ
Tue Jun 25 10:56:01 AEST 1991
In article <22595 at cbmvax.commodore.com> grr at cbmvax.commodore.com (George Robbins) writes:
>In article <1991Jun19.221738.4983 at m.cs.uiuc.edu> houck at m.cs.uiuc.edu (Chris Houck) writes:
>>
>> So I did a dd from rz0a to rz1a
>> and, of course, clobbered the paritioning for disk rz1 (it was a different
>> size + had more partitions)
>
>Ouch, you gotta watch that. dd'ing "a" or "c" involves risks of overwriting
>patitition tables and/or bad block areas (antiquity).
Which is one of the reasons I think sticking the partition information in
the super block sucks. It is a *bit* better than having it built into
the kernel sevice driver, but that is not the only alternative.
On a System V box I am familiar with (could be common in the sysV world for
all I know) the disk partition information is kept in the first two blocks
of the (physical) disk. By convention the partition table defines those
two blocks as being a partition (6) so that a program (dpart like chpt)
can get at the partition table to modify it.
The advantages of this scheme are:
1) You can use dd to make copies of all your partition tables in
ordinary files. Keep these files on more than one disk and you should
always be able to restore a partition table, even if you have to format
at disk.
Whilst you can certainly make copies of the superblock, you don't really
want to trash other superblock info when you copy it back (or to another
disk).
2) There is nothing special about any partition except the one with the
two blocks for the partition table in it. You can put swap anywhere
except on the 2 block partition containing the partition table.
--
Ian Dall I'm not into isms, but hedonism is the most
harmless I can think of. -- Phillip Adams
ACSnet: ian at sibyl.eleceng.ua.oz
internet: ian at sibyl.eleceng.ua.oz.au
More information about the Comp.unix.ultrix
mailing list