Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Can we Symlink Base Directory /usr/hdp to /opt?

avatar
Contributor

I wanted to install HDP 2.5 under /opt but hdp-select usually installs under/usr/hdp. Can we symlink /usr/hdp to /opt. I wanted to know if there are disadvantages after setting up with symlink? Due to IT policies, our Linux team is asking me to install under /opt which is a standard procedure for us for any 3rd party software especially for production boxes. Why can't we install under /opt or any other user specified location? Is there any particular reason?

1 ACCEPTED SOLUTION

avatar
Contributor

All,

I've checked with Hortonwoks with respect to Symlink /usr/hdp to different location. It was confirmed that we can Symlink to another mount point without any issues and the same has to be done across the cluster nodes to avoid issues. Normal Debugging and Upgrades does not have any issues going forward.

Regards,

Ram

View solution in original post

7 REPLIES 7

avatar
Master Mentor

@Ram Charan Tej

Changing the standard HDP installation directories can cause problems during upgrade and normal debugging . I had some issues in changing log directories for Ranger Admin and Ranger usersync and resolved it with symlinks. But I think its doable.

avatar
Contributor

Thanks for your time in replying my question, what was the problem with Ranger log directories and what was the resolution? How about the performance will it be the same as the Standard or going forward in future do we experience any? Have you faced any such?

avatar
New Contributor

If the /opt and the /usr/ directory is within the same filesystem, you can create a hard link too. Or If you have an other disk/device that is mount /opt, you can mount into /usr/hdp.

avatar
Contributor

Thanks for your time! I have separate mount point as /opt. I'm going to symlink /usr/hdp to /opt and install now. Will let you know once I complete the setup.

avatar
Contributor

All,

I've checked with Hortonwoks with respect to Symlink /usr/hdp to different location. It was confirmed that we can Symlink to another mount point without any issues and the same has to be done across the cluster nodes to avoid issues. Normal Debugging and Upgrades does not have any issues going forward.

Regards,

Ram

avatar

I had similar problem, and fix, remember this is hack

PATH=/opt/usr/bin:/opt/usr/sbin:$PATH
ln -sf /bin /opt/bin
ln -sf /lib /opt/lib
ln -sf /lib64 /opt/lib64
cp -ar /usr /opt     
mv /usr /opt/tmp              ## This is the risk
ln -sf /opt/usr /usr

its safer to symlinke /usr/hdp to /opt/hdp, but we had other issues so moved entire /usr

Remember, /usr -- contains also sudo, ln, and other system libraries and commands,

Its better if you do it before installing hdp.

Hope Hortonworks, provides option to change the /usr/hdp path.

avatar
Contributor

Thanks Sanjeev, we have Symlinked hdp/ under usr directory to /opt/usr/hdp earlier successfully !! We are going good now !

Cheers,

Ram