- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: howto sync from A:/mydir to A:/tmp/chroothom...
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
10-15-2007 06:21 AM
10-15-2007 06:21 AM
I have a some ideas. I'm looking for opinions on which way to go. If you have another idea, go ahead and present it. These are not in any particular order.
idea1: Rsync is supposed to syncronize directories from one host to another. But I don't want that. This is on one and only one host. So I don't think this is the way to go. I could easily be wrong. I know hardly anything about rsync.
idea2: Rdist is an old hpux command that appears to not be used by anyone. It also is assuming I go over a network to sync up two separate computers. Only one box. I don't think this one is right either.
idea3: I could run this once a day on hostA:
cd /mydir
find . -mtime -1 -print | cpio -pdumvc /tmp/chroothome/mydir/.
But I would rather have it so the spot automatically updates anytime the files change. I could change the syntax to run it for changes every minute. But maybe this is overkill too.
idea4: I could use a symbolic link?
/tmp/chroothome/mydir -> /mydir.
But this doesn't work because when user X ssh's in, they can't see /tmp/chroothome. If it was seen, their version would be /tmp/chroothome/tmp/chroothome. Kinda confusing, and not really useful.
So I don't have any ideas that would quickly update /tmp/chroothome/mydir to constantly match the real directory /mydir. Do you have any?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2007 06:27 AM
10-15-2007 06:27 AM
SolutionThen you export /mydir as RO to /tmp/chroothome/mydir
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2007 07:30 AM
10-15-2007 07:30 AM
Re: howto sync from A:/mydir to A:/tmp/chroothome/mydir
I log into host: hostA.
I run command: cat /etc/exports
/home/mydir -anon=65534, root=hostA,access=hostA
I run command: "exportfs -a"
I run command: "mount -F nfs -r hostA:/home/mydir /home/me"
It said: "nfs mount: mount_nfs: mount: /home/me: Device Busy"
Please realize on am on hostA trying to NFS mount hostA:/home/mydir to hostA:/home/me/mydir.
I'm not really using the network.
This does not seem right.
I can imagine myself standing on a rug. Reaching down. Grabbing the edge of the rug. And pulling real HARD. Is that what I'm doing here? Am I trying to remotely mount a filesystem I am standing on?
Well I tried the same stuff with "mount -F nfs hostA:/tmp /home/me". I get the same error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2007 08:07 AM
10-15-2007 08:07 AM
Re: howto sync from A:/mydir to A:/tmp/chroothome/mydir
in /etc/exports
/mydir -ro
Then exportfs -a
Then mount it:
mount hostA:/mydir tmp/chroothome/mydir
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2007 08:11 AM
10-15-2007 08:11 AM
Re: howto sync from A:/mydir to A:/tmp/chroothome/mydir
mount hostA:/mydir /tmp/chroothome/mydir
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2007 08:32 AM
10-15-2007 08:32 AM
Re: howto sync from A:/mydir to A:/tmp/chroothome/mydir
You can't mount host:/A to /home. That one is in use. You have to mount host:/A to /home/A, not /home. ....duh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2007 09:27 PM
10-15-2007 09:27 PM
Re: howto sync from A:/mydir to A:/tmp/chroothome/mydir
you should add your mount to /etc/fstab so you'll have it again after a reboot!
mount hostA:/mydir /tmp/chroothome/mydir nfs ro,bg,hard 0 0
Nevertheless the symbolic link should have worked too - you have to do it as root at the server, but the user would need read permissions to the original directory.
ln -s /mydir /tmp/chroothome/mydir
/tmp/chroothome/mydir may not exists before!
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2007 12:36 AM
10-16-2007 12:36 AM
Re: howto sync from A:/mydir to A:/tmp/chroothome/mydir
I disagree with the link idea.
"ln -s" properly redirects me to a location. But the location is completely invalid because I am in a chrooted environment. So it fails. (It's like standing on air. There is no directory under my feet).
"ln" might have worked, but hard linking directories is not allowed. And I would be forced to have the stuff on the same filesystem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2007 01:35 AM
10-16-2007 01:35 AM
Re: howto sync from A:/mydir to A:/tmp/chroothome/mydir
# cat /etc/auto_master
/- /etc/auto.direct proto=tcp
In /etc/auto.direct
/tmp/chroothome/mydir -ro hostA:/mydir
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-29-2007 04:29 AM
12-29-2007 04:29 AM
Re: howto sync from A:/mydir to A:/tmp/chroothome/mydir
It is allowed for root on some file systems but you need to be careful, link(1M). Backup tools may dump it twice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2007 05:05 AM
12-31-2007 05:05 AM
Re: howto sync from A:/mydir to A:/tmp/chroothome/mydir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2007 07:25 AM
12-31-2007 07:25 AM
Re: howto sync from A:/mydir to A:/tmp/chroothome/mydir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2007 10:41 AM
12-31-2007 10:41 AM