Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-17-2003, 05:21 PM   #1
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
Mounting existing directory

I guess its time for me to create a topic .

Anyway, i have a running linux server, using Gentoo. Its running on a 2.7 GB harddrive and as you can guess is running out of space. I am planning to put in another 10 Gb hardrive for additional storage. My question is: if i want to mount that new HD as a directory which already exists, what will happen to the data that is in that directory now?

if i go like this:
mount /dev/hdb1 /var/data/mysql
what will happen to everything in /var/data/mysql folder?

PS: Or, do i just mount it as a new directory and copy the data? I can definetely do that, but i am looking for a simpler way.

Last edited by Mikhail_16; 11-17-2003 at 05:22 PM.
Old 11-17-2003, 05:36 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
The data currently in that directory won't be
visible until you un-mount the hdd :)

The way to go is to temporarily mount it
somewhere else, copy the stuff, and then
unmount, and mount to the bit that it's
meant to replace.

Old 11-17-2003, 06:06 PM   #3
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Original Poster
Rep: Reputation: 31
thanks, that's along the lines of what i thought. Thanks for confirming. Since i am running a mysql database on it. I have to stop db first, then do what you said, then start the db, and that should take care of it.
Thanks again.


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash - rename directory to overwrite existing LarsWestergren Linux - Newbie 18 04-04-2013 03:07 PM
how to check existing directory? izza_azhar Programming 1 04-15-2005 06:09 AM
mounting existing mirror in new installation Astro_ortsa Fedora 2 03-26-2005 09:36 AM
How does one force directory permissions for existing/new files salieg Linux - Newbie 3 05-12-2004 07:58 AM
Moving existing directory to new partition? chris8myshoe Linux - General 3 02-04-2004 09:48 PM > Forums > Linux Forums > Linux - Newbie

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

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