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.
Who is Participating?
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.
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)?
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;

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.

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...
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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 ;-)
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.
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.
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.

All Courses

From novice to tech pro — start learning today.