LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Mount a drive (https://www.linuxquestions.org/questions/linux-general-1/mount-a-drive-4175469993/)

themchost 07-17-2013 05:16 PM

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.

lleb 07-17-2013 05:34 PM

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

themchost 07-17-2013 05:36 PM

Quote:

Originally Posted by lleb (Post 4992199)
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?

lleb 07-17-2013 05:37 PM

You can not. If you format you lose data.

themchost 07-17-2013 05:46 PM

Quote:

Originally Posted by lleb (Post 4992203)
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.

michaelk 07-17-2013 05:47 PM

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.

frankbell 07-17-2013 07:47 PM

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/


All times are GMT -5. The time now is 08:05 AM.