Growing /opt

Hi,

/opt on my disk is almost 90%. I thought of growing it. I followed the below procedure:

  1. added a new hard disk
  2. formatted the same with ufs
  3. created a slice and tried to label it as "opt" with "wm" permissions.

but got stuck at 3 as it is not allowing me to label the slice as "opt". It is asking me "Ready to label disk, continue ?" When i typed "yes" nothing is happening.........Can somebody help me on this? Am i on the right path ?

Thanks.

maybe choose another label name like /opt1.

There is no "/opt" label and even less "/opt1". Anyway, these tags have had no purpose since ages.

Thanks for the replies.

My intension is to grow the /opt filesystem. But I am getting the following error....

The following example will grow �/test� to the maximum size available on the meta device d100:

$ growfs -M /test /dev/md/rdsk/d100

To see how many sectors will be available on d100 after the grow operation completes, you can run newfs with the �-N� option, and compare that with the current value of df (1m):

$ newfs -N /dev/md/dsk/d100
/dev/md/rdsk/d0: 232331520 sectors in 56944 cylinders of 16 tracks, 255 sectors
113443.1MB in 2191 cyl groups (26 c/g, 51.80MB/g, 6400 i/g)

This will report the number of sectors, cylinders and MBs that would be allocated if a new file system was created on meta device d100. As always, test everything on a non critical system prior to making changes to critical boxen.

@incredible: I don't think the OP is using Solaris Volume Manager.

@EmbeUx: can you clarify exactly what you did with mode details.

Your steps are in the wrong order, "2." (creating a filesystem) should be after "3." (labeling, i.e. partitioning the disk) and there is no point in labeling anything as "opt".

Thank you all for the replies. My purpose didn't solve. May be i'll explain the scenario again.

/opt on my server filled up upto almost 92%. I need to install a software which is directed to this path. So I intended to add another hard disk, format, create partition and grow the size of opt with this partition.

So please suggest if this is possible. if yes, how? if no, then what is the alternative.
Here's what I did till now.

  1. Added a new hard disk.
  2. created a slice of 3GB. Now I tried labeling this slice which is not happening. though labeling doesnt effect growing file system i tried.

Please help me out.
Thanks.

Please provide details and the precise steps you followed. Especially explain what you mean with "labeling this slice" and what commands you ran.

You cannot easily grow a file system if the underlying slice/partition isn't already managed by a volume manager.

What you can probably do is simply create a new file system on your new disk and mount it to the location where your new software will install itself.

jlliagre - yea... i know. :slight_smile: for some reason i was thinking "tag" and not disk label. and even that doesn't really matter. i was thinking he might have a conflict with some names so i just suggested use another name.

anyway...

so by the looks of your output, you have already labeled your disk.

it's failing because it's expecting yes/no response from you.

EmbedUX,

your confusion is that /opt has nothing to do with the formatting of the disk or where it get mounted. /opt is just a directory onto which a disk or disk slice is mounted.

As Pupp already stated, you are getting stuck at the point where you need to reply "yes" or "no", and you are replying with "opt".

Once you have your new slice, /opt is not going to "grow" on its own. You'll need to either mount your new slice somewhere inside /opt and start using that directory to store data, or use Sun Volume Manager to concatenate the old slice mounted in /opt with your new slice you just created.