LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 07-19-2002, 07:40 PM   #1
concoran
Member
 
Registered: Jun 2001
Location: 28N,82W
Distribution: XP,Ubuntu 9
Posts: 468

Rep: Reputation: 30
How to move mount points after install?


Currently, the /home, /root etc exit on the same partition.
Now, I want to move /home to a different partition and mount
it from there. What's the procedure to do it?
I changed the /etc/fstab to reflect it, but it didn't work.
TiA,
 
Old 07-19-2002, 08:13 PM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Does the /home directory have user directories in it or is pretty empty at this time ? Also are you trying to mount to a existing parition with other directories on it or is it a newly created partition ?

You can always try this:

mkdir home1

mount home1 /dev/hdaX (where x is number of partition you want it mounted)

cp /home/* /home1/

rm -rf /home (be careful, not to make a space between / and h, you could also hold off on this after a reboot just in case if things go wrong, so you still have the files there)

mv /home1 /home

edit fstab accordingly with the new mount position. there might be an easier way, but that is how I would do it, something along the lines like that.
 
Old 07-20-2002, 02:45 AM   #3
RefriedBean
Member
 
Registered: Jun 2002
Location: N 37 33.327 E 126 55.650
Distribution: Gentoo, Slackware, OpenZaurus
Posts: 186

Rep: Reputation: 30
Quote:
Originally posted by trickykid
mount home1 /dev/hdaX (where x is number of partition you want it mounted)
Is it just me, or is it supposed to be

mount /dev/hdax home1

as opposed to

mount home1 /dev/hdax

?

Sorry if I'm wrong
 
Old 07-20-2002, 03:33 AM   #4
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Yeah, I think you are right?
 
Old 07-20-2002, 08:21 AM   #5
progster
Member
 
Registered: Feb 2002
Distribution: ubuntu
Posts: 76

Rep: Reputation: 15
actually it's mount /dev/hdax /home1 ;-)
 
Old 07-20-2002, 10:08 AM   #6
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Wow, I am really not sure. I will have to go home and try now. Both sound right??? I am gonna browse the man pages really quick to check if it's there.

Cool
 
Old 07-20-2002, 10:09 AM   #7
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Yep it's:
mount <dev> to <dir>
so
mount /dev/hdax /home1

You are right, good job.
 
Old 07-20-2002, 11:26 AM   #8
RefriedBean
Member
 
Registered: Jun 2002
Location: N 37 33.327 E 126 55.650
Distribution: Gentoo, Slackware, OpenZaurus
Posts: 186

Rep: Reputation: 30
Ok, I just tried the method where home1 does not have a preceding /.

Lets say I want to mount /dev/hda6 on /mnt/backup.

cd /mnt/
mount /dev/hda6 backup

Works great.

RefriedBean
 
Old 07-20-2002, 11:28 AM   #9
progster
Member
 
Registered: Feb 2002
Distribution: ubuntu
Posts: 76

Rep: Reputation: 15
didn't know that, saves me some typing ;-)

~Progster
 
Old 07-20-2002, 02:23 PM   #10
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
oops ! i knew it looked kind of funny when i posted my first reply..
 
Old 07-20-2002, 06:17 PM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
gahhh and to think that you personally get paid $8000 a year to moderate this site....
 
Old 07-20-2002, 06:38 PM   #12
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Quote:
Originally posted by acid_kewpie
gahhh and to think that you personally get paid $8000 a year to moderate this site....
Yeah jeremy denied my raise I asked for, so I might not be applying myself with my posts until I get it..

I only wish I got paid at times, this would be the coolest job to have.
 
Old 07-20-2002, 09:44 PM   #13
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
progster, typing:

cd /mnt
mount /dev/hda6 backup

takes more keystrokes then typing in:

mount /dev/hda6 /mnt/backup
 
Old 07-20-2002, 10:00 PM   #14
shoot2kill
Member
 
Registered: Jan 2002
Location: California
Distribution: Red Hat
Posts: 402

Rep: Reputation: 30
DOes that matter? Maybe his fingers stroke 300ms faster than us do.
 
Old 07-21-2002, 02:20 AM   #15
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
I am not sure if I am right because it works for me, so I am simply thinking this is right, so feel free to correct me if I am wrong...

If you have your cdrom (or whatever) set up in your fstab like this:
/dev/cdrom /mnt/cdrom auto default 0 0
Then to mount your cdrom all you have to type is:
mount /mnt/cdrom
and it will mount it as it is set up in your fstab, so in the long run saving you even more keystrokes.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need help with mount points! rmanocha Linux - Hardware 2 10-26-2003 04:23 PM
SCRIPT: check if auto-mount mount-points are still mounted markus1982 Linux - Software 0 05-25-2003 06:48 AM
Mount Points? Mr_Floppy4 Linux - General 2 10-14-2002 11:03 PM
Slackware install: using cfdisk to create mount points Colonel Panic Linux - Software 3 09-28-2001 08:15 PM
mount points... Jeffrey Linux - General 6 02-24-2001 01:09 PM


All times are GMT -5. The time now is 12:38 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration