LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 03-28-2007, 12:17 AM   #1
linuxsun
LQ Newbie
 
Registered: Mar 2007
Posts: 13

Rep: Reputation: 0
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 ?
 
Old 03-28-2007, 01:10 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Can you clarify what didn't work ?
 
Old 03-28-2007, 05:13 AM   #3
linuxsun
LQ Newbie
 
Registered: Mar 2007
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 03-28-2007, 06:13 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
Old 03-28-2007, 09:27 AM   #5
wpn146
Member
 
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170

Rep: Reputation: 30
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.
 
Old 03-28-2007, 01:03 PM   #6
linuxsun
LQ Newbie
 
Registered: Mar 2007
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 03-28-2007, 01:13 PM   #7
linuxsun
LQ Newbie
 
Registered: Mar 2007
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 03-28-2007, 02:35 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
Old 03-29-2007, 12:55 AM   #9
linuxsun
LQ Newbie
 
Registered: Mar 2007
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 03-29-2007, 01:06 AM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
Old 03-29-2007, 01:52 AM   #11
linuxsun
LQ Newbie
 
Registered: Mar 2007
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 03-29-2007, 02:15 AM   #12
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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 ?
 
Old 03-29-2007, 03:11 AM   #13
linuxsun
LQ Newbie
 
Registered: Mar 2007
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 03-29-2007, 08:22 AM   #14
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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

Last edited by jlliagre; 03-29-2007 at 11:46 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need a script to update vfstab rkmine@hotmail Linux - General 1 07-26-2006 07:22 AM
editing vfstab rust8y Solaris / OpenSolaris 1 05-09-2006 01:33 AM
Mountpoint cthomas Linux - Networking 1 02-23-2006 02:28 PM
Partition vs Mountpoint Dahak Linux - Newbie 7 01-11-2005 12:06 AM
vfstab in linux raxxal Linux - Software 2 07-24-2004 10:57 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 11:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration