Improve company productivity with a Business Account.Sign Up


Reallocation of space without reinstall

Posted on 2011-09-19
Medium Priority
Last Modified: 2013-12-28
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.
Question by:sajmf0408
LVL 11

Accepted Solution

jgiordano earned 400 total points
ID: 36563093
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.

Author Comment

ID: 36563253
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?


Assisted Solution

by:Paul Coffey
Paul Coffey earned 400 total points
ID: 36563478
At the ok prompt boot disk1.  You can check the paths with devalias.  SCSI is definitely the way to go with the new drive.
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

LVL 38

Assisted Solution

yuzh earned 800 total points
ID: 36571809
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).


Author Comment

ID: 36580961
Thanks for all of your answers.  
LVL 38

Assisted Solution

yuzh earned 800 total points
ID: 36586348
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!


Assisted Solution

Anacreo earned 400 total points
ID: 36818085
  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.

Author Closing Comment

ID: 36892093
Thanks for all the expert advise.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Just about everyone has an old PC laying around.  Ask anyone in the IT industry, whether they are a professional or play in it as a hobby.  From outdated Desktops to cheap "throwaway" laptops, they are all around and not as hard to "fix up" as you m…
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question