LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   changing mountpoint in vfstab (https://www.linuxquestions.org/questions/solaris-opensolaris-20/changing-mountpoint-in-vfstab-541195/)

linuxsun 03-28-2007 12:17 AM

changing mountpoint in vfstab
 
Hi
i got this line in /etc/vfstab
/dev/dsk/c1t0d0s10 20557672 9 20352087 5% /export/spare and i want to change /export/spare to /export/home . I have users data on /export/home. I did umount /export/spare n then i changed /export/spare to /export/home and i did mount /export/home but it didnt work as /export/home got data. What is the best solution of changing it ?

jlliagre 03-28-2007 01:10 AM

Can you clarify what didn't work ?

linuxsun 03-28-2007 05:13 AM

I think after changing mount to /export/home in vfstab i tried mount /export/home n it gave me msg that device is busy. It is busy coz i got user data on it.

jlliagre 03-28-2007 06:13 AM

It is busy because that user data is currently in use.
Either some of the users are still logged in, or some of their processes are still running.
The normal way is to mount a filesystem or an empty directory, or at least a directory with files that won't suffer from being unreachable after the mount.

wpn146 03-28-2007 09:27 AM

Where did the line in /etc/vfstab come from? It looks like a line from "df -k".

standard format for /etc/vfstab fields are:
Code:

#device        device          mount          FS      fsck    mount  mount
#to mount      to fsck        point          type    pass    at boot options

And I find the person most likely to be the cause of the mount point being active is that I am cd'ed to it myself.

linuxsun 03-28-2007 01:03 PM

Quote:

Originally Posted by wpn146
Where did the line in /etc/vfstab come from? It looks like a line from "df -k".

standard format for /etc/vfstab fields are:
Code:

#device        device          mount          FS      fsck    mount  mount
#to mount      to fsck        point          type    pass    at boot options

And I find the person most likely to be the cause of the mount point being active is that I am cd'ed to it myself.

U r right. the main thing is that /dev/dsk/c1t0d0s10 is mounted on /export/spare n i want to change it to /export/home n all is mentioned in post above.

linuxsun 03-28-2007 01:13 PM

Quote:

Originally Posted by wpn146
Where did the line in /etc/vfstab come from? It looks like a line from "df -k".

standard format for /etc/vfstab fields are:
Code:

#device        device          mount          FS      fsck    mount  mount
#to mount      to fsck        point          type    pass    at boot options

And I find the person most likely to be the cause of the mount point being active is that I am cd'ed to it myself.

U r right. the main thing is that /dev/dsk/c1t0d0s10 is mounted on /export/spar n i want to change it to /export/home n all is mentioned in post above.

jlliagre 03-28-2007 02:35 PM

Indeed.

Please read again post #4.

The system refuse this mount because it would crash some running programs.

If nothing important is running, go in single user mode (init 1) from the console, and try again that mount.

linuxsun 03-29-2007 12:55 AM

well i was trying the following plan
i was copying the /export/home to /export/home.backup
then
rm /export/home

change mount point in vfstab from /export/spar to /export/home
n copy data from /export/home.backup to /export/home
then mount /export/home .
But i was failed in step 1 . I was trying to copy /export/home to /export/home.backup with the following command
cp -r /export/home /export/home.backup
but it only copy 4 to 5 files i guess other users have created files with there users and there is permission problem in that. I even tried to copy/paste from GUI but again 4 to 5 files were copied.

jlliagre 03-29-2007 01:06 AM

These commands won't work. Can you explain the reasoning of doing all this in the first place ?

By using the automounter, you certainly can have some or all user's home directories be located in /export/spare.

linuxsun 03-29-2007 01:52 AM

I am implementing quota. For that i have to put it on /export/home . but its not in vfstab so i guess i cannot make it happen.

jlliagre 03-29-2007 02:15 AM

You certainly can do what you want. It's just you aren't doing it a correct way.

Why aren't you doing what I suggested in post #8 ?

linuxsun 03-29-2007 03:11 AM

Quote:

Originally Posted by jlliagre
Indeed.

Please read again post #4.

The system refuse this mount because it would crash some running programs.

If nothing important is running, go in single user mode (init 1) from the console, and try again that mount.

Right now no user is login n nothing is working there.
You mean i should to single user mode and try all that
cp -r /export/home /export/home.backup
rm /export/home
mount /exprot/home
cp -r /export/home.backup /export/home
there.

jlliagre 03-29-2007 08:22 AM

Quote:

Originally Posted by linuxsun
Right now no user is login n nothing is working there.
You mean i should to single user mode and try all that

Try this instead:
Code:

mv /export/home /export/home.backup
mkdir /export/home
mount /export/home
mv /export/home.backup/* /export/home
rmdir /export/home.backup



All times are GMT -5. The time now is 04:18 AM.