LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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-17-2013, 05:16 PM   #1
themchost
LQ Newbie
 
Registered: Jul 2013
Posts: 4

Rep: Reputation: Disabled
Cool Mount a drive


Hello,

I'm currently running CentOS 6.4 64bit, earlier I made a post about my disk space running out and theres just not much I could do, so I've got a 240GB SSD now, I still have my old 120GB SSD with all my files on, I know how to transfer them all etc I just need to know how to mount this drive without losing any files.

Can someone tell me the basic steps and commands to mount a drive to my /mnt folder without losing any files, thanks.
 
Old 07-17-2013, 05:34 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
As root. disk -l. This will tell you the /dev/sdX of that drive. If you have it formatted as any filesystem then ext# then you will need to properly use the correct -t option.

Create a mount point. Ex: /mnt/ssd2

Then just mount the drive

mount /dev/sdX# /mnt/ssd2

That is only if it is properly formatted
 
Old 07-17-2013, 05:36 PM   #3
themchost
LQ Newbie
 
Registered: Jul 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lleb View Post
As root. disk -l. This will tell you the /dev/sdX of that drive. If you have it formatted as any filesystem then ext# then you will need to properly use the correct -t option.

Create a mount point. Ex: /mnt/ssd2

Then just mount the drive

mount /dev/sdX# /mnt/ssd2

That is only if it is properly formatted
Thanks, and how can I format it properly without losing files?
 
Old 07-17-2013, 05:37 PM   #4
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora/Pop!_OS
Posts: 2,983

Rep: Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551Reputation: 551
You can not. If you format you lose data.
 
Old 07-17-2013, 05:46 PM   #5
themchost
LQ Newbie
 
Registered: Jul 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lleb View Post
You can not. If you format you lose data.
It worked, one more question, I may have to start a new thread for this.

Do you know where the PhpMyAdmin MySQL databases are stored in CentOS?

Thanks.
 
Old 07-17-2013, 05:47 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,692

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
The correct command is fdisk. The -l option will output how the drive is partitioned.

It is not obvious from your post if the 240 GB drive is brand new which typically are not formatted if is installed internaly. External drives are typically pre-formatted NTFS.
 
Old 07-17-2013, 07:47 PM   #7
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,317
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
As regards file locations, this should help: http://articles.slicehost.com/2011/3...rver-on-centos

Also, if you are logged into phpMyAdmin, click the menu item for "Show MySQL Variables." It will show you the data directory, as well as many other variables. For example:

Code:
datadir 	/var/lib/mysql_data/4/
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] mount Iomega external hard drive on debian squeeze, how to use mount command Foxbat1155 Linux - Hardware 15 02-21-2012 04:55 PM
Mount usb drive, umount and mount another drive arubin Linux - Hardware 9 01-17-2007 03:46 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 07:16 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 1 12-24-2005 04:25 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 02:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:55 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
Open Source Consulting | Domain Registration