I had one lightning fast response from alan_at_nabeth.cxo.dec.com that got
me the info that inspired me to give it a go and shoot myself in the
foot. But that wasn't Alan's fault... that was all me :-)
Learned quite a bit about Digital UNIX in the process. I'm pretty sure
I was re-inventing the wheel with all the dumb mistakes I was making.
Anyway, just so you don't make the same mistakes....
Original question:
> Date: Thu, 01 Oct 1998 18:08:44 -0700
>
> Running a Personal Workstation 433au with Digital UNIX 4.0d.
> Wanted to increase swap space, but....
>
> I only have one 4.3 Gb internal drive (rz16), no external drives nor a
> tape drive... only the CD-ROM that came with the system.
> I have access to a couple of network drives that have enough space to
> hold the entire contents of the internal drive. I also have the
> installation CD-ROM.
>
> Currently, the entire drive is being used. The "a" partition hold /;
> the "b" partition is the swap space; the "g" partition holds /usr; and
> the "h" partition holds /home (user directories).
>
> Ideally, we'd like to take about 448 Mb out of the "h" partition, move
> the "g" and "h" partitions 'back' and then increase "b" into the space
> that is freed up.
Summary:
"disklabel" will work on any partition that does not have any open
files. So in my particular case, /home was the easiest reshape.
Backuped to network drive, removed fileset and file domain, changed
partition, recreated domain and set, remounted, restored.
However, /usr on the "g" partition was much trickier as I needed to
retain must of the binaries to be able to NFS mount the drive that I'm
using as backup. After hours of trial and error... the process that
finally worked:
Backup and umount /home. Delete the associated file domain and set and
reshape the 'h' partition. Create a temporary file set and domain
(called usr_2#usr in my case) onto 'h' partition and mounted it to new
directory, usr2. Also, back up /usr onto NFS drive.
Copy a smaller version of /usr into /usr2. This was due to the fact
that the new 'h' partition was too small. I started out by deleting
/usr/doc, /usr/share/man, and finally /usr/local to pare down size of
/usr to something that can fit into /usr2.
Edit /etc/fstab to delete all reference to usr_domain#usr mounting to
/usr at startup. Instead usr_2#usr mounts to /usr2 and references to
home is obviously deleted.
Go down to single-user mode. Unmount /usr and delete it. Create a
soft link /usr -> /usr2. (There is a reason for this.) Reboot to
multi-user mode.
Delete file domain and set on 'g' partition and reshape it. Create file
domain and set for new 'g' partition (in my case, usr_domain#usr).
Mount as something else... I was imaginative and called it /usr3.
Copy all of /usr2 to /usr3. Edit /etc/fstab so that usr_domain#usr
mounts to /usr. Delete soft link /usr -> /usr2. Reboot.
Delete usr_2#usr file domain and set. Recreate home_domain#home and
mount to /home. Restore both /usr and /home to their original
condition.
My steps got all screwed up because I had used tar to back up to the NFS
drive. It was on the advice on someone locally. Turns out probably
using dump or vdump would have made things go smoother. The trickest
part was dealing with /usr.
The best advice is make sure to set enough swap space from the
beginning... the second is to get a locally accessibly backup media...
then everything can be done in single-user mode and you don't have play
musical chairs with the disk space.
Hope someone benefits from this little ordeal.
---------------------------------------------------------------------------
Sung Moon Kang BK94 AA98 | UCLA - Mech & Aero Engineering
kangs_at_aya.yale.edu |
http://home.att.net/~sungmoonkang/
Received on Fri Oct 02 1998 - 12:29:56 NZST