[summary] Repartitioning without rebuilding apps

From: Engineering Computer Systems (therefor@ix.netcom.com)
Date: Mon Jul 15 1996 - 06:52:50 CDT

>I would like to repartition without having to reload software applications
and the like.
>Is there a way to do this? I am afraid of restoring incorrect
partition/dev data on to the newly
>partitioned disks. Is there a special way I can back this up to get around
that issue?
>Sparc 10 Sol 2.5
>1. special backup (I hope)
>2. repartition (with initial install of Sol 2.5?)
>3. restore special backup.

I got the following replies. Thank you to all who responded.

If you have a disk of => size you can build the partitions on the disk and do
a "dd" to copy data from one partition to the other. Below is a simple
1) Make all of your partitions on the blank disk (for example root, usr, var,
2) Make a new file system on each partition
3) Copy over data partition by partition with "dd".
        For example assuming your normal sun boot disk c0t3d0s0
        to target disk c0t1d0s0
  the dd command is: dd if=/dev/dsk/c0t3d0s0 of=/dev/dsk/c0t1d0s0
4) Try to mount these new file systems, if they don't mount run fsck. While
mounted be sure to change vfstab to reflect the new targets (c0t1 not c0t3).
5) Now try to "boot disk1" system will come up if you did it right.

mro@LANcomp.COM (Mike Ordun)
Unless you are using disksuite then then there is no way to grow a
filesystem (I assume that this is what you wnat to do) short of the
backup-repartition-restore sequence. This is really not that hard. Use
ufsdump for the backup. Make sure that you backup all filesystems that are
going to be effectd by the repartition (if you are grwoing one yu are most
likely shrinking another unless you are grwoing into unallocad disk
space). Use the format command to change the partition map (can also use a
combination of prtvtoc and fmthard). After the new partition map has been
written to the drive (the drive has been labeled) use newfs to build
filesystems on the partitions that you have changed. Mount these
filesystems and restore with ufsrestore. Things are a little mor
complicated if you are dealing with something like the / or /usr
filesystem. In this case the steps are eessentially the same but you would
do this all after having booted form the cdrom.

        Still not that easy Mike. newfs is not on the cdrom.
From: sweh@mpn.com (Stephen Harris)
> Is there a way to do this? I am afraid of restoring incorrect partition/dev
> data on to the newly
> partitioned disks. Is there a special way I can back this up to get around
> that issue?

No - backup, restore as normal then before rebooting modify /etc/vfstab to point
to the correct areas.

> 1. special backup (I hope)

Normal backup - level 0 with machine in single user mode. Pref booted from
CD (boot cdrom -s) with all partitions unmounted.
Do two backups of each partition to seperate tapes to be safe :-)

> 2. repartition (with initial install of Sol 2.5?)

Boot from CD, repartition. Do NOT install Solaris

> 3. restore special backup.

Restore backup.
Modify /etc/vfstab.
Run installboot program (RTFM for details) to install boot block.
Reboot from disk with -r option

Restoring the existing data will restore the same Solaris you had before,
and the installboot will make this bootable again.

From: dano@autoiii.com (Dan Goldman)
If the disk you are repartitioning is the boot disk and you are rearranging
the slices, then you will need to edit the /etc/vfstab after the restore but
before you reboot. Also, when rebooting, you will need to do a boot -r.
Regarding any apps you are running, its hard to say not knowing the apps you
are running and thier rquirements and if they have been setup to access
partitions directly by slice number or mount points. If by mount points,
then it should all be transparent provided the names of the mount points do
not change.
If all you are doing is increasing the size of your partitions and not
adding or rmoving slices or disks, it should all be transparent and all you
need to do is a ufsrestore.

grgoffe@atlas.arc.nasa.gov (George Goffe), offered some personal scripts he
wrote but I did not have time to go through them.
           (__) ( Thomas Hereford, Detroit, MI
           (oo) ( therefor@ix.netcom.com
  /---------\/ --<( Computer Aided Design Systems,
 /| || ( Simpson Industries, Inc.
* ||-------|| [_____________________________
  ~~ ~~
                 "My opinions are my own. Flames >/dev/null"

        "There are two ways of meeting difficulties:
          you alter the difficulties or you alter
          yourself meeting them."
                                -Phyllis Bottome

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:05 CDT