Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1457
  • Last Modified:

How to expand a Solaris system partion remotely

Need to expand a Solaris system partition remotely, without destoying the current install. I don't have physical access to this box.
0
Jim_Coyne
Asked:
Jim_Coyne
  • 3
  • 2
2 Solutions
 
Hanno P.S.IT Consultant and Infrastructure ArchitectCommented:
I need some more details:
a) Are you talking about the system disk (which partition) or seom data partition?
b) Is the partition on the system disk or on another disk?
c) In the system itself or in some sort of external disk enclosure?
d) What partitions are also on that disk?
e) Do you (or can you) use a volume manager (VxVM or SVM)?
0
 
arthurjbCommented:
JustUnix has a lot of good questions, that may make a difference in the answer.

But the bottom line is that it is not very likely that you will be able to expand a standard partition.

The main reason is that there is not likely to be extra space to expand to, without adding disks.

But, if the system was set up with metadisks, and you have unused slices, then you may be able to expand partitions.  
It is a somewhat complicated process with a lot of preresquites, this page is a good explanation;
http://docs.sun.com/app/docs/doc/817-5776/6ml784a8o?l=en&a=view

If the system was not set up with metadisks, you can only expand a partition by creating a new partition and doing a copy and replacing the old partition, with the new larger one.

Here is a rather novel way to do the copy and replace.
http://www.sun.com/bigadmin/content/submitted/expand_ufs_svm.html

The copy and replace cannot be done on a system partition, without a reboot.


All standard warnings apply when working with disks in this manner.  You must backup all your data, since a single typo can destroy all your data...
0
 
Hanno P.S.IT Consultant and Infrastructure ArchitectCommented:
Talking about expanding the system (boot or root) partition:
You may be able to "steal" some space from your swap partition to grow into that space.
If possible you can create some additional swap space somwhere else ;-)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Jim_CoyneAuthor Commented:
The system disk is 5Gb and is maxed, but the partition for /export/home is 58Gb. I want to shrink the the 58Gb a couple of gig and expand the system disk with that new space.
0
 
arthurjbCommented:
Unless the partitions were set up using the meta disk stuff, you will not be able to do this.  
This takes into account your initial parameters, no physical access to the disk, and not destroying the existing installation.

There is an alternative, which is to find out why the system disk is maxed.  If someone has placed software in /opt on in /usr/local that may have contributed to the problem.

But most likely, you have huge log files in /var/log and /var/adm and maybe a crash dump in /var/crash

If you have large old log files, you could make a directory on the /export/home section and move the files to there.  And you can delete the files under /var/crash.

You can do a;
du -s
from the root directory, this will tell you which directories use the space.

For the record, this is one of the reasons why experienced admins build systems with separate partitions for / /usr /var and /opt  it makes it easier to tell where your resources are going, and it is easier to move and expand partitions when the root is not involved.
0
 
Hanno P.S.IT Consultant and Infrastructure ArchitectCommented:
If you want to shrink a partition, you will have to back it up, destroy it and recreate with smaller size.

After that, you can either grow the existing root partition or add a second partition to it, forming a "concat".
All you need to do this is SVM (Sun Volume Manager aka. SDS, Solstice Disk Suite).

Better alternative would be to backup (ufsdump) all filesystems, recreate with the new required sizes and recover (ufsrestore) them.
0

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.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now