Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Increasing /opt partition size

Status
Not open for further replies.

dandan123

Technical User
Sep 9, 2005
505
US
I want to increase the /opt partition on one of my servers.

After shutting down all the apps, if I do a tar of the contents and then increase the partition size and then tar back the contents will this work ?

It's on a Solaris 10 box.
 
If the physical disk layout actually leaves room for you to increase the partition size then you shouldn't need to move the files around at all, although you should of course tar em up somewhere to keep them safe. UFS presumably?

To increase the size of a UFS filesystem on the fly (use at own risk):

[tt]/usr/lib/fs/ufs/mkfs -M /mountpoint /dev/rdsk/c0t0d0s4 123456[/tt]

Where 123456 is the size of the filesystem in 512 byte blocks.

How are you increasing the partition size?

Annihilannic.
 
I have space on the disk, I was planning on using format to increase the partition size.

I wasn't aware that you could increase the partition size on the fly except through VFs, is this a feature of Solaris 10 or has it always been around ?
 
As far as I know it is undocumented, but I noticed that when you use vxresize to resize a volume and filesystem in Veritas Volume Manager the above command is the one it uses; I took note of it and have used it manually on several occasions.

Note that you can only use format to increase the partition size if opt is the last partition on the disk with free space immediately following it. You probably know this, but... to be sure...

Annihilannic.
 
I'm using disksuite and there's the metadb partition after the opt partition but I plan to move that partition to the end of the disk before I do anything.

The opt partition is on slice 5, then I have slice 7 at the end of the disk with the metadbs. So I would have free space between slice 5 and 7.

If I were to now use the mkfs command would it grow slice 5 and the opt partition to occupy the free space without screwing up anything else ?
 
Or maybe this would be safer...break the opt mirror..grow on one disk.. if it's ok.. mirror back ?
 
No, mkfs does not touch the slices, you have to do them first.

Your split / grow / remirror plan sounds like a good one.

Annihilannic.
 
you can use growfs in SVM (disksuite)


if you use growfs -M, you can grow it while it is still mounted. I've used it many of times, it is pretty straight forward.


your biggest probelm is your metadb's are sitting in the middle of your disk, as you said, you should move them to slice 7, maybe you can delete the metadb's on ONE disk only, and move them to slice 7. At this point you can attempt the growfs command, it is hard to tell w/o seeing how your disk is actually laid out.




 
Correct me ..

for growfs if I remember right , I would need to create antother partition then do a metattach and then growfs right ?

now coming back to mkfs.. I would need to increase the partition size first wouldn't that destroy the filesystem ?
 
Here's what I did..moved slice 7 to end of disk..created metadbs.

Broke mirror. Increased partition size using format. Increased filesystem size using mkfs.The contents of opt remained intact. All this on one drive.

Modified vfstab to mount the modified filesystem.

Rebooted.. modified second drive..created mirror with one drive.. modified vfstab to mount mirror..rebooted.. attached second drive.

Thanks
 
To use growfs you would have to metattach a slice and then use growfs -M.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top