Solved

Reallocation of space without reinstall

Posted on 2011-09-19
8
760 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now