Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Reallocation of space without reinstall

Posted on 2011-09-19
8
763 Views
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
/platform/SUNW,Sun-Fire-T200/lib/libc_psr/libc_psr_hwcap1.so.1
                       9.6G   8.4G   1.1G    89%    /platform/sun4v/lib/libc_psr.so.1
/platform/SUNW,Sun-Fire-T200/lib/sparcv9/libc_psr/libc_psr_hwcap1.so.1
                       9.6G   8.4G   1.1G    89%    /platform/sun4v/lib/sparcv9/libc_psr.so.1
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.
0
Comment
Question by:sajmf0408
8 Comments
 
LVL 11

Accepted Solution

by:
jgiordano earned 100 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.
0
 

Author Comment

by:sajmf0408
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?

0
 
LVL 4

Assisted Solution

by:paulc
paulc earned 100 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.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 200 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
/mnt
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).






0
 

Author Comment

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

Assisted Solution

by:yuzh
yuzh earned 200 total points
ID: 36586348
Case close?

Please read "How do I close a question?" in
http://www.experts-exchange.com/help.jsp#hs=26&hi=366

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

0
 
LVL 4

Assisted Solution

by:Anacreo
Anacreo earned 100 total points
ID: 36818085
sajmf0408,
  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).

Voilla...

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.
0
 

Author Closing Comment

by:sajmf0408
ID: 36892093
Thanks for all the expert advise.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Guide for enabling bit locker encryption within Windows 10 Pro 3 123
Sed question 2 102
SCCM And Branchcache Server 1 64
UNIX Script. Send email if failure 8 32
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.

828 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