Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-16-2008, 09:16 AM
Tom King
 
Posts: n/a
Default help with a mount problem

Hi All

I need some help configuring my E250 with a different mount point for
the /opt I have added a new 36gb disk (c0t10d0) and partitioned and
formatted it successfully using format and newfs. I then temporarily
mounted it to ensure all was well. no problems.

I want to move the /opt from it current default point on the boot disk
(c0t0d0sx) to the c0t10d0s0 slice.

I have looked in the vfstab but don't see the /opt listed and I am sure
it is not as easy as simply adding the /opt to the vfstab. Perhaps
someone can point me in the right direction? This is my first foray back
into the unix world in a number of years and yes it is all different!

My current config is


Sun e250 with 400mhz proc x2, 1.25 gb ram, 3 - 9gb of which the first
one (c0t0d0sx) holds the root slice etc from a default install of
solaris 10. The second 9gb drive (c0t8d0sx) one is mounted to
/home/home0, the third one (c0t9d0sx) is unassigned although I was
thinking of using it for /var although I understand this can be somewhat
problematic.

The 4th drive (c0t10d0s0) is 36gb which is the one I would like to use
to hold /opt. Primarily I want to run MySQL off of it for some DB
development.

I am not running the solstice on the box as I was trying to keep things
simple to begin with.

Really I am looking for a step by step in order to accomplish this with
a minimum of fuss. Eventually I will have to look at solstice .


Thanks for any help

sigh a much humbled pc whiz

Tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2008, 09:16 AM
Richard B. Gilbert
 
Posts: n/a
Default Re: help with a mount problem

Tom King wrote:
> Hi All
>
> I need some help configuring my E250 with a different mount point for
> the /opt I have added a new 36gb disk (c0t10d0) and partitioned and
> formatted it successfully using format and newfs. I then temporarily
> mounted it to ensure all was well. no problems.
>
> I want to move the /opt from it current default point on the boot disk
> (c0t0d0sx) to the c0t10d0s0 slice.
>
> I have looked in the vfstab but don't see the /opt listed and I am sure
> it is not as easy as simply adding the /opt to the vfstab. Perhaps
> someone can point me in the right direction? This is my first foray back
> into the unix world in a number of years and yes it is all different!
>
> My current config is
>
>
> Sun e250 with 400mhz proc x2, 1.25 gb ram, 3 - 9gb of which the first
> one (c0t0d0sx) holds the root slice etc from a default install of
> solaris 10. The second 9gb drive (c0t8d0sx) one is mounted to
> /home/home0, the third one (c0t9d0sx) is unassigned although I was
> thinking of using it for /var although I understand this can be somewhat
> problematic.
>
> The 4th drive (c0t10d0s0) is 36gb which is the one I would like to use
> to hold /opt. Primarily I want to run MySQL off of it for some DB
> development.
>
> I am not running the solstice on the box as I was trying to keep things
> simple to begin with.
>
> Really I am looking for a step by step in order to accomplish this with
> a minimum of fuss. Eventually I will have to look at solstice .
>
>
> Thanks for any help
>
> sigh a much humbled pc whiz
>
> Tom


My guess would be that /opt is currently part of /. If this is the case:
Create a new home for /opt. Format the disk if needed. Create a file
system with newfs. Copy the contents of /opt to its new home. Remove
the original files (this step is optional unless you need space for
something else). Make a new entry in /etc/vfstab for your new /opt.
Mount /opt. I don't think I have left anything out.


It's probably best to make a backup of everything before you start.

backup n: What you should have done yesterday.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-16-2008, 09:16 AM
Tom King
 
Posts: n/a
Default Re: help with a mount problem

Richard B. Gilbert wrote:
> Tom King wrote:
>
>> Hi All
>>
>> I need some help configuring my E250 with a different mount point for
>> the /opt I have added a new 36gb disk (c0t10d0) and partitioned and
>> formatted it successfully using format and newfs. I then temporarily
>> mounted it to ensure all was well. no problems.
>>
>> I want to move the /opt from it current default point on the boot disk
>> (c0t0d0sx) to the c0t10d0s0 slice.
>>
>> I have looked in the vfstab but don't see the /opt listed and I am
>> sure it is not as easy as simply adding the /opt to the vfstab.
>> Perhaps someone can point me in the right direction? This is my first
>> foray back into the unix world in a number of years and yes it is all
>> different!
>>
>> My current config is
>>
>>
>> Sun e250 with 400mhz proc x2, 1.25 gb ram, 3 - 9gb of which the first
>> one (c0t0d0sx) holds the root slice etc from a default install of
>> solaris 10. The second 9gb drive (c0t8d0sx) one is mounted to
>> /home/home0, the third one (c0t9d0sx) is unassigned although I was
>> thinking of using it for /var although I understand this can be
>> somewhat problematic.
>>
>> The 4th drive (c0t10d0s0) is 36gb which is the one I would like to use
>> to hold /opt. Primarily I want to run MySQL off of it for some DB
>> development.
>>
>> I am not running the solstice on the box as I was trying to keep
>> things simple to begin with.
>>
>> Really I am looking for a step by step in order to accomplish this
>> with a minimum of fuss. Eventually I will have to look at solstice .
>>
>>
>> Thanks for any help
>>
>> sigh a much humbled pc whiz
>>
>> Tom

>
>
> My guess would be that /opt is currently part of /. If this is the case:
> Create a new home for /opt. Format the disk if needed. Create a file
> system with newfs. Copy the contents of /opt to its new home. Remove
> the original files (this step is optional unless you need space for
> something else). Make a new entry in /etc/vfstab for your new /opt.
> Mount /opt. I don't think I have left anything out.
>
>
> It's probably best to make a backup of everything before you start.
>
> backup n: What you should have done yesterday.


That is along the lines I was thinking however it seems to me that I
would have to remove the original mount point to /opt that the solaris
10 default install created. The problem is I cannot find a reference to
/opt in the files I am familar with. Below is a copy of my /etc/vfstab

#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
fd - /dev/fd fd - no -
/proc - /proc proc - no -
/dev/dsk/c0t0d0s1 - - swap - no -
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -
/dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes -
/dev/dsk/c0t8d0s7 /dev/rdsk/c0t8d0s7 /export/home0 ufs 2 yes -
/devices - /devices devfs - no -
ctfs - /system/contract ctfs - no -
objfs - /system/object objfs - no -
swap - /tmp tmpfs - yes -

I assume the new line would be

/dev/dsk/c0t10d0s0 /dev/rdsk/c0t10d0s0 /opt ufs 2 yes


Where else might I look for the /opt mount information? Is the Solaris
10 smart enough not to fatal error out if I just place the entry in the
vfstab?

Thanks a bunch for the help! I am having a ball with my new (used) E250 8^)


Tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-16-2008, 09:16 AM
Steve
 
Posts: n/a
Default Re: help with a mount problem

> I assume the new line would be
>
> /dev/dsk/c0t10d0s0 /dev/rdsk/c0t10d0s0 /opt ufs 2 yes
>
>
> Where else might I look for the /opt mount information? Is the Solaris
> 10 smart enough not to fatal error out if I just place the entry in the
> vfstab?
>
> Thanks a bunch for the help! I am having a ball with my new (used) E250 8^)


You might want to add 'logging' as the last option on the data slices.

/opt is just a directory on ur root slice at the moment so it doesn't
appear in vfstab.

And finally, Solaris is stupid and will attempt to boot a mangled
vfstab, I know cos I just ruined mine so be careful. If you cock up
like me just boot single from the cd and edit it.

Ste

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-16-2008, 09:16 AM
Richard B. Gilbert
 
Posts: n/a
Default Re: help with a mount problem

Tom King wrote:
> Richard B. Gilbert wrote:
>
>> Tom King wrote:
>>
>>> Hi All
>>>
>>> I need some help configuring my E250 with a different mount point for
>>> the /opt I have added a new 36gb disk (c0t10d0) and partitioned and
>>> formatted it successfully using format and newfs. I then temporarily
>>> mounted it to ensure all was well. no problems.
>>>
>>> I want to move the /opt from it current default point on the boot
>>> disk (c0t0d0sx) to the c0t10d0s0 slice.
>>>
>>> I have looked in the vfstab but don't see the /opt listed and I am
>>> sure it is not as easy as simply adding the /opt to the vfstab.
>>> Perhaps someone can point me in the right direction? This is my first
>>> foray back into the unix world in a number of years and yes it is all
>>> different!
>>>
>>> My current config is
>>>
>>>
>>> Sun e250 with 400mhz proc x2, 1.25 gb ram, 3 - 9gb of which the first
>>> one (c0t0d0sx) holds the root slice etc from a default install of
>>> solaris 10. The second 9gb drive (c0t8d0sx) one is mounted to
>>> /home/home0, the third one (c0t9d0sx) is unassigned although I was
>>> thinking of using it for /var although I understand this can be
>>> somewhat problematic.
>>>
>>> The 4th drive (c0t10d0s0) is 36gb which is the one I would like to
>>> use to hold /opt. Primarily I want to run MySQL off of it for some DB
>>> development.
>>>
>>> I am not running the solstice on the box as I was trying to keep
>>> things simple to begin with.
>>>
>>> Really I am looking for a step by step in order to accomplish this
>>> with a minimum of fuss. Eventually I will have to look at solstice .
>>>
>>>
>>> Thanks for any help
>>>
>>> sigh a much humbled pc whiz
>>>
>>> Tom

>>
>>
>>
>> My guess would be that /opt is currently part of /. If this is the case:
>> Create a new home for /opt. Format the disk if needed. Create a file
>> system with newfs. Copy the contents of /opt to its new home.
>> Remove the original files (this step is optional unless you need space
>> for something else). Make a new entry in /etc/vfstab for your new /opt.
>> Mount /opt. I don't think I have left anything out.
>>
>>
>> It's probably best to make a backup of everything before you start.
>>
>> backup n: What you should have done yesterday.

>
>
> That is along the lines I was thinking however it seems to me that I
> would have to remove the original mount point to /opt that the solaris
> 10 default install created. The problem is I cannot find a reference to
> /opt in the files I am familar with. Below is a copy of my /etc/vfstab
>
> #device device mount FS fsck mount mount
> #to mount to fsck point type pass at boot options
> #
> fd - /dev/fd fd - no -
> /proc - /proc proc - no -
> /dev/dsk/c0t0d0s1 - - swap - no -
> /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -


It's part of / on /dev/rdsk/c0t0d0s0. You don't have to do anything to
the old mount point! You do have to remove the old files if you want
to recover the disk space.

> /dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2
> yes -
> /dev/dsk/c0t8d0s7 /dev/rdsk/c0t8d0s7 /export/home0 ufs 2
> yes -
> /devices - /devices devfs - no -
> ctfs - /system/contract ctfs - no -
> objfs - /system/object objfs - no -
> swap - /tmp tmpfs - yes -
>
> I assume the new line would be
>
> /dev/dsk/c0t10d0s0 /dev/rdsk/c0t10d0s0 /opt ufs 2 yes
>


Only if you have a disk at target 10 on controller 0 AND that's where
you created your new file system AND where you put the files from the
existing /opt.

<snip>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-16-2008, 09:17 AM
gerryt@
 
Posts: n/a
Default Re: help with a mount problem


Tom King wrote:
> I want to move the /opt from it current default point on the boot disk
> (c0t0d0sx) to the c0t10d0s0 slice.
> I have looked in the vfstab but don't see the /opt listed and I am sure
> it is not as easy as simply adding the /opt to the vfstab.


Almost. You should create a mount point.
Use "mv" on /opt. i.e. give it another name.
Example: mv /opt /opt.old
mkdir /opt and chown the new /opt to have the same owner:group,
(root:sys) Then: chmod 755 /opt.
mount -F ufs /dev/dsk/c0t10d0s0 /opt
You'll have to copy /opt.old contents to /opt... Something like
cd /opt.old; tar cpf - . | (cd ../opt; tar xpf -) will do it
Add to /etc/vfstab some place after /:
/dev/dsk/c0t10d0s0 /dev/rdsk/c0t10d0s0 /opt ufs 2
yes -
Not a bad idea to do this in single user mode : init S
Once you are at run level 3 again and all is well you can rm -r opt.old

> My current config is
> solaris 10. The second 9gb drive (c0t8d0sx) one is mounted to
> /home/home0, the third one (c0t9d0sx) is unassigned although I was
> thinking of using it for /var although I understand this can be somewhat
> problematic.


Not in single user mode..

> I am not running the solstice on the box as I was trying to keep things
> simple to begin with.


Solstice? DNE on Solaris 10. Look to "smc"

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-16-2008, 09:17 AM
Tom King
 
Posts: n/a
Default Re: help with a mount problem

gerryt@ wrote:

> Almost. You should create a mount point.
> Use "mv" on /opt. i.e. give it another name.
> Example: mv /opt /opt.old
> mkdir /opt and chown the new /opt to have the same owner:group,
> (root:sys) Then: chmod 755 /opt.
> mount -F ufs /dev/dsk/c0t10d0s0 /opt
> You'll have to copy /opt.old contents to /opt... Something like
> cd /opt.old; tar cpf - . | (cd ../opt; tar xpf -) will do it
> Add to /etc/vfstab some place after /:
> /dev/dsk/c0t10d0s0 /dev/rdsk/c0t10d0s0 /opt ufs 2
> yes -
> Not a bad idea to do this in single user mode : init S
> Once you are at run level 3 again and all is well you can rm -r opt.old


Wonderful works like a charm and thanks!



>
> Solstice? DNE on Solaris 10. Look to "smc"
>


true old solaris ref manual just got version 10 much different

thanks

tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-16-2008, 09:17 AM
Tom King
 
Posts: n/a
Default Re: help with a mount problem

Richard B. Gilbert wrote:
>>> My guess would be that /opt is currently part of /. If this is the
>>> case:


Yes it was it was staring me in the face too many late nights and too
much coffee. Sigh simply directory sigh.


> Only if you have a disk at target 10 on controller 0 AND that's where
> you created your new file system AND where you put the files from the
> existing /opt.


yes to all that works now thanks for the pointers

Tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-16-2008, 09:17 AM
Joe D.
 
Posts: n/a
Default Re: help with a mount problem

Tom King wrote:
> Richard B. Gilbert wrote:
> >>> My guess would be that /opt is currently part of /. If this is the
> >>> case:

>
> Yes it was it was staring me in the face too many late nights and too
> much coffee. Sigh simply directory sigh.
>
>
> > Only if you have a disk at target 10 on controller 0 AND that's where
> > you created your new file system AND where you put the files from the
> > existing /opt.

>
> yes to all that works now thanks for the pointers
>
> Tom


Tom; been there, done that. For future reference, one useful way of
determining what file system /opt (or whatever future directory you
wish) is part of would be to do a df -k on /opt. For instance, I have
the same setup on one of our servers; /opt is simply a directory under
root. so a df -k on /opt shows:

# df -k /opt
Filesystem kbytes used avail capacity Mounted on
/dev/vx/dsk/rootvol 4131866 2203902 1886646 54% /

As you can see, the file system is shown at the left, and the directory
it is mountes on is on the right. This tells you that the /opt
directory is not on a file system of its own, but is simply a
sub-directory of /.

Not sure I worded all the above correctly, but hopefully, you get the
gist.

One other area that the above can come in handy is for when you get a
message /opt (or whatever) is full. Checking out the df -k to verify,
can lead you to look in / (for core files, mis-placed temp files,
anythin that shouldn't be there and is taking up space), instead of
simply looking in /opt to free up space.

Hope this was useful...

Joe D.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-16-2008, 09:17 AM
Tom King
 
Posts: n/a
Default Re: help with a mount problem

Joe D. wrote:

> Tom; been there, done that. For future reference, one useful way of
> determining what file system /opt (or whatever future directory you
> wish) is part of would be to do a df -k on /opt. For instance, I have
> the same setup on one of our servers; /opt is simply a directory under
> root. so a df -k on /opt shows:
>
> # df -k /opt
> Filesystem kbytes used avail capacity Mounted on
> /dev/vx/dsk/rootvol 4131866 2203902 1886646 54% /


This really works well! thanks! I have printed this message out and
placed it in my tricks and tips binder 8^)


> One other area that the above can come in handy is for when you get a
> message /opt (or whatever) is full. Checking out the df -k to verify,
> can lead you to look in / (for core files, mis-placed temp files,
> anythin that shouldn't be there and is taking up space), instead of
> simply looking in /opt to free up space.
>
> Hope this was useful...
>
> Joe D.
>

Clear as a bell. This has been a rude reawakening switching back to unix
from the wintel world. Luckingly there are resources like this to help
with the culture shock. Now if I can only get used to the SUN 5
keyboard.... being a hunt and peck typist has it's problems

best regards

tom
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:17 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561