File system size change

Good morning folks!
I'm new here.. trying to find an answer on how to resize filesystem. Need to add some space to c0t0d0s5, /var... Is it possible at all?
JV

I'm looking at growfs command...
uname -a :
SunOS unknown 5.9 Generic sun4u sparc SUNW,Ultra-5_10
df -k :
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 2031101 1098483 871685 56% /
/dev/dsk/c0t0d0s5 95951 37884 48472 44% /var
/dev/dsk/c0t0d0s6 2031101 588630 1381538 30% /stg
/dev/dsk/c0t0d0s7 492422 14 443166 1% /export/home

hm.., I should have been more specific from very beginning. This is a single disk ultra5 machine and I dont have enough space to load 9_Recomm patches. When I started running ./install_cluster, it aborted with "not enouhgt space in /var/sadm.." message. I know that I have some unallocated space on the disk which I was trying to use to add space to /dev/dsk/c0t0d0s5. Do you think it's possible?

thanks in advance,
JV

Check /var/adm - see if your messages file(s) can be removed (well, emptied - you probably don't need to remove them) if not needed - look throughout that directory to see if you can get some space back.

As far as growfs, if you read the man page for it, it looks to be used for metadevices which you aren't using (DiskSuite). I don't know if it would work on your file partitons.

How much more space do you have? If it's larger than /var, you could mount it as /mnt and dump /var into it then remount /mnt as /var.
Or, if /var/adm is huge, you could use the space in one of your free partitions (slice 3 assuming it isn't swap) and then have /var and /var/adm as mount points.

You might want to post the partition table of that disk ( c0t0d0 ) from format - then we can tell where the free space is and which options would be easiest to gain more space.

RTM,
thanks for respond. Here is my partition table:

========================================================
partition> pr
Current partition table (original):
Total disk cylinders available: 17660 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       root    wm   13499 - 17659        2.00GB    (4161/0/0)   4194288
  1       swap    wu       0 -  1040      512.37MB    (1041/0/0)   1049328
  2     backup    wm       0 - 17659        8.49GB    (17660/0/0) 17801280
  3 unassigned    wm    7258 -  9337     1023.75MB    (2080/0/0)   2096640
  4        usr    wm    5178 -  7257     1023.75MB    (2080/0/0)   2096640
  5        var    wm    3935 -  4137       99.91MB    (203/0/0)     204624
  6 unassigned    wm    9338 - 13498        2.00GB    (4161/0/0)   4194288
  7       home    wm    4138 -  5177      511.88MB    (1040/0/0)   1048320
==========================================================

Partition 6 is my "storage" where I unzipped 9_Recomm. file. For some reason it shows up here as unassigned... Partition 3 is where my /opt mounted. And as I mentioned before, I have 1.3Gb of unused space
thanks in advance

My advice would be to move /var/sadm into /stg and symlink it back.

I'l try that, thanks.
So, there is no way I could possibly use remaining 1.3Gb?

I don't understand your comment "Partition 3 is where my /opt mounted"

These are what you have mounted which I would assume is all your mount points mounted:
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 2031101 1098483 871685 56% /
/dev/dsk/c0t0d0s5 95951 37884 48472 44% /var
/dev/dsk/c0t0d0s6 2031101 588630 1381538 30% /stg
/dev/dsk/c0t0d0s7 492422 14 443166 1% /export/home

No /opt in there. ? No /usr in there either - so you can take part of slice 3 and part of slice 4 and make them new sizes - in effect, make one of them the size you need - then dump /var into it (easy to say - little more work than that).

Perderabo's suggestion is the quickest and easiest.

Actually I assume that he showed us a subset of his mount pointsin that df output. We need to clarify what these partitions are used for. Regardless, there is some free space that is not is use! I have resorted the layout into clylinder order.

  1       swap    wu       0 -  1040      512.37MB    (1041/0/0)   1049328
  5        var    wm    3935 -  4137       99.91MB    (203/0/0)     204624
  7       home    wm    4138 -  5177      511.88MB    (1040/0/0)   1048320
  4        usr    wm    5178 -  7257     1023.75MB    (2080/0/0)   2096640
  3 unassigned    wm    7258 -  9337     1023.75MB    (2080/0/0)   2096640
  6 unassigned    wm    9338 - 13498        2.00GB    (4161/0/0)   4194288
  0       root    wm   13499 - 17659        2.00GB    (4161/0/0)   4194288

What a mess :frowning:
All of the partition table entries are used but not all of the disk was used. And the free space is between swap and var.

jvinn, you could reload your os from scratch. But there is a one other possibility. The free space could be added to /var. Your /var is way too small so this might not be a bad idea. I've never done it, but it would go like this...

1.) Come up in single user mode and mount and mount all filesystems.
2.) Copy all of /var into /stg
3.) Unmount /var
4.) Use format to change the partition table so /var is 1041 - 4137
5.) newfs /var
6.) Mount /var
7.) Copy /stg/var back into /var
8.) Reboot

Bear in mind that I've never tried this but it looks like it should work. Have a complete backup before you try this. But if you try it and it works, do post back and let us know.

Perderabo - it will work - I've done it before booting into single user from the cd.

That's what I realized...(about the mess)...when I started playing with this machine. I'll do as you recommend, tonite, afterhours.. This system has been inherited from different team. Will post my results,
thanks a lot gents,
JV