Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!munnari.oz.au!yoyo.aarnet.edu.au!sirius.ucs.adelaide.edu.au!augean.ua.OZ.AU!sibyl!ian From: ian@sibyl.eleceng.ua.OZ (Ian Dall) Newsgroups: comp.unix.ultrix Subject: Re: Disk Paritioning Clobbered Message-ID: <920@sibyl.eleceng.ua.OZ> Date: 25 Jun 91 00:56:01 GMT References: <1991Jun19.221738.4983@m.cs.uiuc.edu> <22595@cbmvax.commodore.com> Reply-To: ian@sibyl.OZ (Ian Dall) Organization: Engineering, Uni of Adelaide, Australia Lines: 41 In article <22595@cbmvax.commodore.com> grr@cbmvax.commodore.com (George Robbins) writes: >In article <1991Jun19.221738.4983@m.cs.uiuc.edu> houck@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@sibyl.eleceng.ua.oz internet: ian@sibyl.eleceng.ua.oz.au