Reallocation of space without reinstall

I would like to evenly reallocate these harddrives and need assistance.  What is the best way to go about this?  Here's the current set up:

Disk 0
Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm     403 -  2415        9.77GB    (2013/0/0)   20484288
  1       swap    wu       0 -   402          1.96GB    (403/0/0)     4100928
  2     backup    wm       0 - 14086       68.35GB    (14087/0/0) 143349312
  3        var    wm      2416 -  4026        7.82GB    (1611/0/0)   16393536
  4 unassigned    wm 4027 - 13284     44.92GB    (9258/0/0)   94209408
  5       home    wm   13285 - 13687      1.96GB    (403/0/0)     4100928
  6 unassigned    wm       0                0         (0/0/0)             0
  7 unassigned    wm   13688 - 13698       54.66MB    (11/0/0)       111936

Disk 1 (formatted, but not being used)
Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       0 - 14086       68.35GB    (14087/0/0) 143349312
  1 unassigned    wu       0                0         (0/0/0)             0
  2     backup    wu       0 - 14086       68.35GB    (14087/0/0) 143349312
  3 unassigned    wu       0                0         (0/0/0)             0
  4 unassigned    wu       0                0         (0/0/0)             0
  5 unassigned    wu       0                0         (0/0/0)             0
  6 unassigned    wu       0                0         (0/0/0)             0
  7 unassigned    wu       0                0         (0/0/0)             0

Current layout:
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0t0d0s0      9.6G   8.4G   1.1G    89%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                   2.1G   1.2M   2.1G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
                       9.6G   8.4G   1.1G    89%    /platform/sun4v/lib/
                       9.6G   8.4G   1.1G    89%    /platform/sun4v/lib/sparcv9/
fd                       0K     0K     0K     0%    /dev/fd
swap                   2.1G    40K   2.1G     1%    /tmp
swap                   2.1G    48K   2.1G     1%    /var/run

I would like to evenly distribute more space to  /root, /var ,/home and swap.Can this be done with reinstall?  Thanks.
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

jgiordanoConnect With a Mentor Commented:
Assuming you need the data on Disk0 - I would pop out disk0. Install solaris 10 with ZFS root enabled. Then when the install is completed boot to disk1 then mount /dev/dsk/c0t0d0s<N> (whatever your partition is) to /mnt then copy the needed data.
sajmf0408Author Commented:
When you say ZFS root enabled are you referring to Solaris 10 release with ZFS?  Just wanted to make sure I'm clear.  While i was awaiting your reply, I was actually copying the needed directories from the root directory (/etc, /opt/ and /export) as backup to copy back in the event of a reinstall.  This is a dev server so there isn't much on it.  Just ran low on space on /var when applying patches.  How would I boot from disk 1 once the install is done?

paulcConnect With a Mentor Commented:
At the ok prompt boot disk1.  You can check the paths with devalias.  SCSI is definitely the way to go with the new drive.
Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

yuzhConnect With a Mentor Commented:
Why do you want to  evenly reallocate the space for /root, /var /home and  swap?

If you want to change the disk layout, you can clone the OS installation to disk1 (with modification).
I would merge /root, /var to one file system (10-15GB should be enough, depandes on what you want to install).

Swap space depands on how much RAM you have and what application you are running on the system. please have a look at http:Q_20975243.html

use whatever left for /home

you can then use "ufsdump + ufsrestore" to dump the partition one by one, then make the diskbootable.

Please read the example in http:Q_20782407.html

please remember to make disk 1 bootable (see the about link)

PS: if you decide to merge /root and /var, eg when you
mount /dev/dsk/c0t1d0s0 /mnt          # the first partition of disk1
you need to dump the /root file system to
dump the /var filestsem to /mnt/var

edit the /etc/vfstab file in disk1 suit the need disk layout. (in this case is the /mnt/etc/vfstab file )

when you finish, shultdown the system, and swap disk0 whith disk1.
power up the box again, and you can do whatever you like to use disk0 (with the old layout, reformat, or setup disk mirroring etc).

sajmf0408Author Commented:
Thanks for all of your answers.  
yuzhConnect With a Mentor Commented:
Case close?

Please read "How do I close a question?" in

to close the case, thanks and have a nice weekend to all of you!

AnacreoConnect With a Mentor Commented:
  There is a way to do most everything you want online with minor disruption to service except for the boot disk resizing, that will require most likely 3 quick reboots.

  I can provide examples how to do this in a few hours (after work).  But the answer, if you're unable to go to ZFS which makes this incredibly easy, lies in the oft renamed DiskSuite.  This will let you mirror the 1st disk to the second disk, detach a mirror by concatenating two slices or simply re-partitioning the drive and making a bigger slice, then re-attaching the mirror and do a growfs to resize the file system.

  So the procedural way is:
Partition drive #2 to be how you want to reallocate data (if not everything will fit on one disk work a few partitions at a time, you can do this process within the same disk).
Initialize the disksuite system, and create disksuite devices for each partition.
Mirror from drive #1 to drive #2 the partitions you want to grow.
Detach drive #1 from the mirrored set (this way if growfs fails you can mount the detached mirror and continue to work)
Mirror root.
Boot off of the mirrored root.
Repartition drive #1 to match drive #2 (or do the prtvtoc | fmthd -s syntax)
Mirror everything back.
If there are still further things you wish to do (such as making /home all of disk #2) go ahead and do the same procedure, detach drive #2, repartition it again to have the final look, mirror the partition that you want to grow, detach mirrior #1 and then growfs).


When you're all done if you don't want to be left with dXX drive letters, you can simply change the /etc/vfstab to reflect the raw devices instead of the dXX drives, destroy the metadb's and you should be good to go.

Let me know if you're interested in this and I can post some functional examples of this.
sajmf0408Author Commented:
Thanks for all the expert advise.
All Courses

From novice to tech pro — start learning today.