dab@barak.UUCP (David Berk) (01/08/88)
I know it was once posted, but has does anyone know the exact procedure for increasing swap space? Thanx; Dave Berk ..!ihnp4!mtune!barak!dab -- David Berk ...ihnp4!mtune!barak!dab
nic@marque.mu.edu (Nic Bernstein) (01/17/88)
In article <48@barak.UUCP> dab@barak.UUCP (David Berk) writes: >I know it was once posted, but has does anyone >know the exact procedure for increasing swap space? > > Thanx; > > Dave Berk > ..!ihnp4!mtune!barak!dab > > >-- > David Berk > ...ihnp4!mtune!barak!dab First you should determine exactly what the current swap size is. This can be accomplished by doing "iv -vt /dev/rfp000". The resulting output will tell you about the current disk configuration. Next you should create a new descriptor for the "iv" program. Usually you just need to edit the current descriptor. This can be found in "/usr/lib/iv". I am enclosing the descriptor for the standard 20 meg Miniscribe drive, partitioned for 4mbs of swap: ------------------------------------------------------------------ # Miniscribe 20Mb Drive, 4Mb swap space, partition 1=swap, 2=user type HD name ms20-4 cylinders 612 heads 4 sectors 17 steprate 0 $ badblocktable 1 loader /usr/lib/iv/s4load.silent $ $ 0 4 504 2444 $ $ --------------------------------------------------------------------- Notice the lines toward the end of the file. The numbers "0", "4", "504", and "2444" which are on seperate lines. They specify the track numbers at which the various partitions start. This is in "logical" blocks, not the physical block. That is each block is 1024 bytes and contains 2 "logical" 512 byte blocks. There are usually 17 512 byte sectors per track one of which is reserved for bad-block mapping. This leave 8 "logical" blocks per track for a track density of 8192 bytes. Therefore, the fisrt partition (partition "0") which is where the loader, etc goes, is 4*8 blocks, 32 blocks or 32,768 bytes. The second partition (partiton "1") is 500 tracks (504-4). This is 500*8*1024 = 4,096,000 bytes or 4 megs. The last partition is 1940 tracks (2444-504). This is 1940*8*1024 = 15,892,480 bytes, just short of 16 megs. Sometimes the last track number is not specified but for some reason, AT&T or Convergent is "shorting" this drive by about 4 blocks, I don't know why but suspect there is a reason. So, if you want to change the 4 megs to 5 megs, you just edit the file to move the partition. 5 megs = 5,120,000 divided by 1024 = 5000 divided by 8 = 625, add the 4 tracks for 629. So simply edit the descriptor and replace the "504" with "629", save it and then run "iv -i /dev/rfp000 /usr/lib/iv/your-decriptor" to re-format the disk. YOU WILL DEFINATELY LOSE EVERYTING! You must then COMPLETELY re-load the system. This can be accomplished in one of two ways. You can start by manualy specifing everything to the format program on the "diagnostic" disk (disk 1 of the set) or you can just punt and do the "iv" from the running system, this is guaranteed to destroy everyting immediately. (Be sure and do a couple of "sync"s first to guarantee disk update.) You can then re-boot, start with disk 2 and let the system start the script that reloads the system, answer the questions so that you save NOTHING and the system is completely re-made. The script will do a complete "mkfs /dev/fp002" for you, creating the disk with the new patitioning. All of this, of course, depends on which Version you are running, as I remeber, versions after 3.0 will have the manual format from the "diagnostic" disk, but versions before do not directly give you this option in the menu. There was still a way to do it, but the method escapes me at the minute. BE SURE AND DO A TOTAL BACKUP OF THE SYSTEM FIRST! You are going to lose everything on the system. When I do this, I don't use the "ua" style of backup as this doesn't include everything. Instead, I use the "install" login to remove all the add-ons, the dev set, comm packages, phone manager, GSS, etc. (By the way why are the GSS-Fonts missing from the later sets?). This reduces the amount of stuff you need to back up. Then I do a (from the top "/" directory) "find / -print |cpio -ocB >/dev/rfp021" to create the backup. When you re-load, you can substitute this for the "foundation set" to re-create the original system. Don't forget that you will lose the amount of space that you gave to swap from the file system! If it barely fit before, than you'll be out of space for sure now! Most of this is from memory and I take no responsibility for the consequences. Be sure to backup things before you attempt to change this. Worst comes to worst, you can recover by starting from scratch with the diagnostic disk and re-create the original structure. Good Luck! - Roger - Using Nic's Account P.S. A fun project might to be to create a "running" single user floppy disk that you can use to do this from!
alex@umbc3.UMD.EDU (Alex S. Crain) (01/17/88)
In article <48@barak.UUCP> dab@barak.UUCP (David Berk) writes: >I know it was once posted, but has does anyone >know the exact procedure for increasing swap space? Piece-o-cake: 1) back up hard drive 2) boot from diagnostics disk 3) when given the 1-7 choice, enter "s4test" (without quotes) 4) This should give you a prompt like EXPERT> 5) and ? will display 19 diagnostic selections, including one for partitioning the hard-drive. 6) make your selection and specify the partition, 7) reformat your drive 8) load the system. The exact syntax amy vary a bit, I havent done this in a while. But It works, I've got 9meg of swap now, and haven't seen that "PID xxx: killed due to no swap space" error in a while. -- :alex. alex@umbc3.umd.edu