Operating System - HP-UX
1834798 Members
2907 Online
110070 Solutions
New Discussion

information regarding changing mount points

 
SOLVED
Go to solution
Ratzie
Super Advisor

information regarding changing mount points

Just need some additional info.
Had a log drectory that I want to mount on its own slice.
/var/log/app1/dir1,dir2,dir3 was all under /var

Made a /var/log/app1 mount point

Instead of moving over the 5 subdirectories within (quite large) we hand bombed and just created the empty directories. No prob.
Changed to fstab & mnttab

Reboot no prob.

Here the question...
Where does that data that was previously in /var/log/app1 go that was part of /var
5 REPLIES 5
Robert-Jan Goossens_1
Honored Contributor

Re: information regarding changing mount points

Hi,

if you did not move or remove the data, it is still inside the /var filesystem, underneath the /var/log/app1 mountpoint.

To get to the files you need to close your application, umount /var/log/app1 filesytem and move the data to a temp filesystem.

Hope this helps,
Robert-Jan
Devender Khatana
Honored Contributor
Solution

Re: information regarding changing mount points

Hi,

If I have understood it correctly you are asking what will happen to the contents of a directory when we mount a file system on it.

Answer - The contents will still be there and keep on cosuming same space but will nt be visible after mouting file system. After unmounting file system old contents will still be visible.

Is that what you asked ?

HTH,
Devender
Impossible itself mentions "I m possible"
Raj D.
Honored Contributor

Re: information regarding changing mount points


Hi LHradowy,

It would have been better understanding if you would hav egiven some real seanario with somemore details :


Well, the data /var/log/app1 will be still in /var as the mount point is on the top of /var

Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Bill Hassell
Honored Contributor

Re: information regarding changing mount points

A mountpoint is simply a directory but in Unix, a directory (and the contents) will be "hidden" if you mount another filesystem into this directory. If you un-mount the new lvol, you'll see the old data. Unfortunately, Unix does not warn you that a mountpoint directory already contains data.

The normal way to create new mountpoints is to temporarily mount the new lvol, then use find|cpio to copy all the files and directories, then verify the file and directory counts in the old and new locations. Once verified, you recursively remove the old data, modify fstab and then mount the new lvol.


Bill Hassell, sysadmin
Ratzie
Super Advisor

Re: information regarding changing mount points

Thanks