home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.hackers
- Path: sparky!uunet!caen!batcomputer!bouncer
- From: eirik@elf.TN.Cornell.EDU (Eirik Fuller)
- Subject: fun with tmpfs
- Message-ID: <1992Dec12.115358.14593@tc.cornell.edu>
- Sender: news@tc.cornell.edu
- Nntp-Posting-Host: dumpster.tc.cornell.edu
- Organization: Cornell Theory Center
- Date: Sat, 12 Dec 1992 11:53:58 GMT
- Approved: tmporarily
- Lines: 57
-
-
- I recently upgraded elf.TN.Cornell.EDU from a 3/280 to a 4/280; this
- required a complete overhaul of several file systems, namely "/",
- "/usr", and "/usr/local".
-
- In preparation for this overhaul, I booted the new CPU board as a
- diskless client of the 3/280, so that I could do such things as
- building a custom kernel (necessary for my Rimfire disk controllers)
- and bootstrapping the latest gcc. I put all the sun4 binaries into
- the same filesystem, "/export", for this. Ordinarily I like to keep
- "/usr/local" a separate partition from "/usr", but for temporary usage
- I didn't mind mixing it all in "/export". Anyway, when the time came
- to build the new file systems, I didn't feel like copying them
- separately, so I did something like
-
- for fs in /dev/rrf4[agf]; do newfs $fs; done
- mkdir -p /tmp/root/dumpster /tmp/exec/sun4
- mount /dev/rf4a /tmp/root/dumpster
- mount /dev/rf4g /tmp/exec/sun4
- mkdir /tmp/exec/sun4/local
- mount /dev/rf4f /tmp/exec/sun4/local
- cd /tmp
- dump 0f - /export | restore rf -
-
- In addition to sorting out the three new file systems, this also made
- copies of the other client root directories, and all of the client
- swap files. I wasn't especially worried about filling up "/tmp",
- given that (at least, in single user mode) it has more free space in
- it than the total size of "/export".
-
- To reclaim the virtual memory used up by the "restore leakage", I
- unmounted "/tmp" and remounted it again. I was in single user mode,
- so I wasn't concerned with "/tmp/.X11-unix/" and such disappearing.
-
- Usually when I set up the boot disk for a new machine, or an OS
- upgrade, or anything along those lines, I boot the new machine
- diskless long enough to set up the new boot disk. For this upgrade, I
- did something like that, but when it came time to boot the new CPU for
- real, its file server (the prior CPU in the same cage) wasn't up. I
- did the last part of the disk setup with the old CPU, installboot and
- all. When it came time to make the switch, I recabled the disks (I
- essentially swapped the controllers). If I want to "downgrade", I can
- put the disks back the way they were and swap CPU boards back, at
- least until I scrub the original boot disk.
-
-
- For those who aren't sufficiently familiar with SunOS, perhaps I
- should mention that tmpfs is a "virtual memory RAM disk". While it
- should work nearly as well mounting the new file systems under any
- file system with enough free space, I find it more satisfying to
- confine "restore leakage" to a truly disposable file system.
-
-
- P.S. Yes, I really did call the client dumpster; in fact, the machine
- from which I'm posting this is a Sun3 diskless client with that name.
- The name goes back to another Sun3 which used to perform our daily
- backups (dumps) on an Exabyte.
-