Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!ptsfa!ihnp4!occrsh!occrsh.ATT.COM!gorgo.UUCP!authorplaceholder From: bsteve@gorgo.UUCP Newsgroups: comp.sys.att Subject: Re: Disk Partitioning on 3b2's Message-ID: <58300004@gorgo.UUCP> Date: Wed, 8-Apr-87 03:20:00 EST Article-I.D.: gorgo.58300004 Posted: Wed Apr 8 03:20:00 1987 Date-Received: Mon, 13-Apr-87 05:42:38 EST References: <81@paisana.UUCP> Lines: 66 Nf-ID: #R:paisana.UUCP:-8100:gorgo.UUCP:58300004:000:2442 Nf-From: gorgo.UUCP!bsteve Apr 8 02:20:00 1987 Chris Donahue responds: >Not true, it does not touch the data on the disk, only the information >describing how to get to the data, rather like losing your inode area. >But it can be reversed with more ease! This is correct... the clue is to be careful to SAVE a copy of the old vtoc format OR spend lots of time guessing. I have had old drives with a marginal sector right on the vtoc and have successfully restored the vtoc data from time to time and kept right on truckin on the old drive. Here is an example of an old vtoc which splits a 72MB drive into 2 parts: * Partition ID Flag Start Sector Size in Sectors 05 0 01 0 0 06 0 01 0 148896 07 0 01 0 198 08 0 00 198 74250 09 0 00 74250 74448 10 0 01 0 0 One might use only partition 8 for live data, reserving partition 9 for future use. Later when partition 9 becomes used it might be desirable to split it into 2 parts as is shown below. * Partition ID Flag Start Sector Size in Sectors 05 0 01 0 0 06 0 01 0 148896 07 0 01 0 198 08 0 00 198 74250 09 0 00 74250 37224 10 0 00 111474 37224 Here we've used partition 10 also in reallocation of the drive while preserving the data in partition 8. Meaning of flags are as follows: 00 = mountable 01 = non-mountable 10 = read-only For safety's sake, ALWAYS save the existing vtoc data using /etc/prtvtoc before making ANY changes and (of course) have a good backup. Something in the form: # /etc/prtvtoc /dev/rdsk/c2d1s0 >/etc/vtoc/c2d1s0 Then copy the text file and make changes... # cp /etc/vtoc/c2d1s0 /etc/vtoc/whatever Then to update the drive: # /etc/fmthard -s /etc/vtoc/whatever /dev/rdsk/c2d1s0 If you have messed up the data somehow you can get back the old vtoc data by typing: # /etc/fmthard -s /etc/vtoc/c2d1s0 /dev/rdsk/c2d1s0 For more concise information regarding this procedure and about creating filesystems on the new partitions read the documentation as this can also be a dangerous procedure. One can re-partition a drive using the menu-driven simple administration, but it is not always guaranteed that the partitions will fall where you want them and prevent you from clobbering existing data, particularly if the drive was not initially partitioned using the simple- administration menus. Hope this helps, Steve Blasingame (AT&T Oklahoma City) bsteve@gorgo.att.com ihnp4!gorgo!bsteve