Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a solaris 10 VM. Its hard disk size is 10gb. In the file system, I have checked the /opt size is around 635mb. So my concern is can I increase the /opt size to 1GB. If so how can I achieve that ?

Please help me.

share|improve this question

migrated from stackoverflow.com Jul 26 '11 at 12:13

This question came from our site for professional and enthusiast programmers.

    
This isn't a programming question. stackoverflow.com/faq –  marto Jul 26 '11 at 12:03
    
Yes, you can do it, but with non-programming tools. Hence I'm nudging this over to SF where you'll get a more targeted set of answers. –  paxdiablo Jul 26 '11 at 12:06

2 Answers 2

You're using Solaris 10 so I assume you're on zfs. Assign another disk to your host or create another zfs file-system with fault tolerance of your choice.

Mount it under an arbitrary mount, say /opt-new. Stop any processes using /opt if you can, and recursively copy the contents to your new file-system.

At this point, definitely stop any apps using /opt. Move it out the way, say /opt-old and set your mountpoint for your zfs filesystem mounted on /opt-new to /opt.

Restart apps and confirm everything is well. Delete /opt-old once you are happy you do not need a roll-back.

share|improve this answer

Yes this can be done if you have (or can create) the additional space on another disk or slice.

In general terms

  • Identify/create/obtain the additional space and note it's device name.

  • Use metainit to create a new md device that contains your existing /opt and the new device

  • unmoun the existing /opt

  • edit your /etc/vfstab and create a new entry for /opt using the new md device

  • mount the new /opt

  • use growfs to expand the new /opt into the additional space growfs -M /opt /dev/md/rdsk/<newdevice>

You should have a look at the solaris man page for growfs which provides some more detail.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.