- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Linking directories
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 08:21 AM
01-23-2004 08:21 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 08:27 AM
01-23-2004 08:27 AM
SolutionSEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 08:31 AM
01-23-2004 08:31 AM
Re: Linking directories
If all you want to do is mount some directories (possibly in a different filesystem) under /usr then the key to this is the symbolic (soft) link.
e.g.
ln -s /newfs/newdir /usr/flea
ln -s /newfs2/newdir2 /usr/dog
Now /usr/dog will point to /newfs2/newdir2 and this redirection will be invisible to the application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 08:36 AM
01-23-2004 08:36 AM
Re: Linking directories
If this new filesystem is going to be part of another volume group, then I would suggest you to pay attention to the directories that you would like to link. Typically you may want to keep bin,lib,sbin etc., in /usr as during the external storage maintaince, you will have the basic /usr functionality available. If you have any software like backup etc, you can probably create them under new filesystem and create softlinks.
Create a newfilesystem and mount it as /usr1
Make sure you have the corresponding entry in /etc/fstab.
#cp -Rp /usr/local /usr1/local
#du -sk /usr1/local
once contents are properly copied, create links
#rm -rf /usr/local
#ln -s /usr1/local /usr/local
YOu better do it in single user mode so that you will not affect the OS or application.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 08:38 AM
01-23-2004 08:38 AM
Re: Linking directories
ln /usr/xxx /usr/xxx
Am I correct or way off?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 08:40 AM
01-23-2004 08:40 AM
Re: Linking directories
You simply can't have TWO filesystems mounted to /usr at the same time.
If I understand you correctly you want to move dirs *under* /usr to another filesystem. In that case, I think the proper way to do this is to fbackup the data in those dirs & then delete the files in the filesystems in those dirs. Beforehand you would have created the new LV/FS structure & now mount them to /usr/dir1, /usr/dir2 & frecover that data back into these newly created filesystems.
I guess you could also temp mount the new filesystems to some other location, copy the data from /usr/dir1, /usr/dir2, etc to /usr/temp1, /usr/temp2, etc. THEN empty /usr/dir1, /usr/dir2, etc. & umount /usr/temp1, /usr/temp2, etc & then remount them to the newly emptied /usr/dir1, /usr/dir2, etc.
In both scenarios don't forget to edit /etc/fstab for these new mounts.
My 2 cents,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 08:46 AM
01-23-2004 08:46 AM
Re: Linking directories
No. You cannot have two /usr filesystems. So, linking from /usr to another /usr is not possible.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 08:51 AM
01-23-2004 08:51 AM
Re: Linking directories
ln /usr/xxx /usr2/xxx
Sorry if I am confusing nayone. I don't want to screw this up and have to go to an ignite tape.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 09:04 AM
01-23-2004 09:04 AM
Re: Linking directories
Use 'ln -s' as indicated
ln -s source destination
To create a link from /usr1/local to /usr/local, you would run the command
ln -s /usr1/local /usr/local
ll /usr/local
lrwxr-xr-x 1 root sys 14 Jan 23 16:03 /usr/local -> /usr1/local
As the man page says, ln does not create hardlinks between filesystems.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 09:07 AM
01-23-2004 09:07 AM
Re: Linking directories
ln /usr/xxx /usr2/xxx
should be:
ln -s /usr2/xxx /usr/xxx
That will have the effect of whenever you cd to /usr/xxx, you will actually cd to /usr2/xxx. Man ls for details and pay particular attention to the -s option.
As an aside, it is not required than /usr be on the boot disk or even in vg00 for that matter. The only LVOL's which must be on the boot disk are /, /stand, and primary swap. I wouldn't want to move /usr out of vg00 but it's not a requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 09:07 AM
01-23-2004 09:07 AM
Re: Linking directories
may I ask you, why you want to move things out of /usr? It looks to me, you are running out of space there, right? Be careful anyway, what you put there. You certainly don't want the machine to get stuck at bottup.
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 09:12 AM
01-23-2004 09:12 AM
Re: Linking directories
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 09:22 AM
01-23-2004 09:22 AM
Re: Linking directories
So if you have the room under /opt, I would suggest...
# mv /usr/openv /opt
# ln -s /opt/openv /usr/.
Netbackup still runs prefectly fine, and the netbackup logs don't fill up my /usr filesystem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 09:37 AM
01-23-2004 09:37 AM
Re: Linking directories
can you post as attachment du -k /usr so we can see, where space is used?
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 09:37 AM
01-23-2004 09:37 AM
Re: Linking directories
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 05:39 PM
01-23-2004 05:39 PM
Re: Linking directories
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2004 09:17 PM
01-23-2004 09:17 PM
Re: Linking directories
do you really need chinese, korean and japanese fonts? They gobble up a lot of space.
Michael