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!

Linking directories 2

Status
Not open for further replies.

agape234

Programmer
Oct 10, 2001
128
US
Under current settings a file system is full (/opt)
I want to recreate this fs on another slice that is larger.
I know what I want to do but want some reassurance on my thought process and some help with sytax.
I am thinking;
tar the existing fs over to the new slice and create a link from the old name to the new name. Then I can in effect rm the old location.

Am I on the right path?
 
You have to create a symbolic link: ln -s

Hope This Help
PH.
 
Under certain circumstances you may be able to grow the filesystem, but that depends on the layout (you need contiguous space on the disk) and what kind of volume managers you are (or aren't) using. The operating system type and version would be helpful too.

Annihilannic.
 
If you have another slice to move it all to, move everything to the new slice, delete everything in /opt, but leave /opt as an empty directory. Use this as the mount point to mount the new slice. That way all of the old /opt is actually in a directory mounted at /opt. It's cleaner than a link. I think.

Assuming your new slice for /opt is /dev/dsk/c1t2d3s4 and it has already been formated and had a file system created on it...
Code:
    mkdir /newopt
    mount /dev/dsk/c1t2d3s4 /newopt
    cd /opt
    tar cf - .| (cd /newopt; tar xfBp -)
    rm -rf /opt/*
    umount /newopt
    mount /dev/dsk/c1t2d3s4 /opt
    rmdir /newopt
Then add an entry like this to /etc/vfstab...
Code:
    /dev/dsk/c1t2d3s4 /dev/rdsk/c1t2d3s4 /opt ufs 1 yes -
Hope this helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top