vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| 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. |
| |||
| 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 |
| |||
| > 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 |
| |||
| 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> |
| |||
| 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" |
| |||
| 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 |
| |||
| 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 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. |
| ||||
| 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 |