soft link for directory in root FS

Hi,

In root folder there is one directory "/usr/sap/P38/TRX00/index" as the data is going to increase so to aviod root fs become 100% full ,we have to create one soft link that would point to another point mount created with on same disk ultimatly that New Fs(/test) will store data instead of root .But i dn't understand how to create it i.e what would be the source and link ,and link would be file or directory becasue if we create as dir it will create link inside the index directory.

Please help as it is very necessary.Thanks in advance.

Regards,
solaris123

First you would want to do this when the system isn't being used.

First step: You would want to rename the original directory (/usr/sap/P38/TRX00/index) to /usr/sap/P38/TRX00/orig-index (see the mvdir command). This is to insure you don't mess up anything that was originally there.

Second, create your link -
Make sure your new file system (/test) is mounted ( df -k /test)
cd to /usr/sap/P38/TRX00/
The link command syntax ( ln -s physical logical)
So, in your case: ln -s /test /usr/sap/P38/TRX00/index
ls -l (look for index link)

Try to create a file inside /usr/sap/P38/TRX00/index - it should be created on /test.

You may need to copy anything in orig-index directory over to /test. You then need to check that whatever software you are using has no issues - after that, you can remove the orig-index directory and contents.

Hi,

Than you very much for the solution,

Now we have taken one SAN disk on another server i.e-systemA and from there we have shared the mount point on the server where /usr/sap/P38/TRX00/index i.e-systemB is situated,but it was shared with nobody user on systemB and local user can't create file with original permission i.e user1:group1.What would be the solution to give orig permission for the mount point on systemB.