LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mounting Drive (https://www.linuxquestions.org/questions/linux-newbie-8/mounting-drive-686084/)

dodd3256 11-25-2008 04:22 PM

Mounting Drive
 
Hello to everyone. This is my first post and question.

I am running a LAMP server. I have an extra drive that I would like to back-up my database to. The drive is internal but I don't know how to see it to set up folders for back-ups. I am not using GUI and would like to know how to mount it to use.

I am using Webmin and phpmyadmin.

thanks

jailbait 11-25-2008 04:37 PM

First you set up a partition on the new drive using the fsdisk command.

Second you format the new partition using the mkfs command. Format the new partition to be the same filesystem type as the database is using.

Third you create a directory to use as a mount point using the mkdir command.

Fourth you mount the new partition on the new mount point using the mount command.

See:

man fdisk
man mkfs
man mkdr
man mount

If you get tangled up in the details of a command then feel free to ask for more detailed instructions.

----------------------
Steve Stites

P.S. Once you get this working you may want to put a line in /etc/fstab to automatically mount the backup partition every time you boot.

salter 11-25-2008 08:26 PM

If your extra drive is the same size as your main drive, then you can also setup a RAID, allowing to automatically mirror all data on the main disk.

the exact details will depend on your system's current disk layout, but you can start out by reading some RAID howto's and the mdadm manuals. It's not overly complicated, but it needs some carefull thinking. And you can test data recovery by replacing any of the two disks with a third one.

dodd3256 11-25-2008 10:10 PM

Jailbait thanks for the reply. I have already formatted it with ext3. I guess I just need to make the mount point and mount it.

Salter the drive is bigger than the one I am using, can I still do the RAID? If yes will it reduce the size of the larger one to the smaller one?

thanks

Dutch Master 11-26-2008 09:23 PM

Yes, you can do RAID 1 (mirroring) with one disk larger then the other and yes, the larger disk is limited to the size of the smaller one. Ideally, you use 2 (or more) equal disks. Use your package manager to install the mdadm package (and dependencies), then use Webmin to setup and build the array. It's the quickest and safest way.


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