- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: mounting file system on existing user's home d...
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
Discussions
Discussions
Discussions
Forums
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
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
тАО06-07-2010 02:13 AM
тАО06-07-2010 02:13 AM
mounting file system on existing user's home directory without deleting user
we created user "abc" and mounted on directory "/opt/abc" as per requirement, but latest requirement says /opt/abc" should be a file system not a directory.
Is it possible to mount a file system on the home directory of existing user without deleting the user.
please help me with the steps.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 02:33 AM
тАО06-07-2010 02:33 AM
Re: mounting file system on existing user's home directory without deleting user
This should be a location of abc software, not the home directory for user abc.
>Is it possible to mount a file system on the home directory of existing user without deleting the user.
I don't see why not. While you might have problems if the user is logged on, it should work after he isn't using files in the home directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 03:11 AM
тАО06-07-2010 03:11 AM
Re: mounting file system on existing user's home directory without deleting user
As I mentioned that was a requirement to use /opt/abc as home directory.
I copied all the files under this directory and tried to mount the file system but it says "/opt/abc is busy, or allowable number of mount points exceeded" even user is not logged logged in.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 03:25 AM
тАО06-07-2010 03:25 AM
Re: mounting file system on existing user's home directory without deleting user
A user's HOME directory can be anywhere (and can be changed at any time) so the simplest method is to run vipw and change the HOME diectory to /opt/abc. I am assuming that abc is not an ordinary user but an application maintenance user, much like an oracle user.
> /opt/abc is busy...
So additional cleanup is needed first. Start by cleaning up /opt/abc. If it already contains the necessary files, create a new lvol and filesystem, mount to a temporary mountpoint and copy all the files from /opt/abc. Use find to count directories and files to verify the counts (not size).
Now remove all the files and directories in /opt/abc (which I assume is part of /opt and not a separate mountpoint). umount the temporary mountpoint and mount it to /opt/abc which is now an empty directory, ready to use as a mountpoint. Use bdf to verify that /opt and /opt/abc are separate mountpoints.
Now run vipw to change the user's HOME directory to /opt/abc. Finally, check the old user's HOME directory (/home/abc?) and move any required files to /opt/abc. Besides ordinary files, hidden files like .profile should be moved to the user's new HOME. Now you can remove the old abc HOME directory.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 06:13 AM
тАО06-07-2010 06:13 AM
Re: mounting file system on existing user's home directory without deleting user
let me clear:
"/opt/abc" is already used as home directory for user "abc" . I need to mount new file system on "/opt/abc" without loosing data under "/opt/abc"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 08:03 AM
тАО06-07-2010 08:03 AM
Re: mounting file system on existing user's home directory without deleting user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 08:36 AM
тАО06-07-2010 08:36 AM
Re: mounting file system on existing user's home directory without deleting user
just move the directory out of the way, and create a new directory of the same name, then mount.
copy what ever you need back to the new mount point.
any files currently open will no be affected, any new attempts to open the files will open the new mount point files
so:
mv abc def
mkdir abc
mount FS abc
rsync -avz def/* abc
or if not too bothered about upsetting the user, instead of rsync, run mv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-07-2010 08:07 PM
тАО06-07-2010 08:07 PM
Re: mounting file system on existing user's home directory without deleting user
Why not create a new home directory and mount the filesystem and then copy the files or directories under /opt/abc
-Pramod.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2010 01:25 AM
тАО06-08-2010 01:25 AM
Re: mounting file system on existing user's home directory without deleting user
As mentioned, if you mount a new filesystem, you will hide the data that's there.
>says "/opt/abc is busy,
Have you used lsof or fuser(1m) to see if someone is using that /opt/abc directory tree?
As Mancboy said, using mv would solve both these issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-08-2010 02:42 AM
тАО06-08-2010 02:42 AM
Re: mounting file system on existing user's home directory without deleting user
You can use the fuser command to see if there are any processes running that has /opt/abc as their cwd, or as an alternative you can use the lsof command, which is not supplied by default but is the better tool, to do the check.
Tom