LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-09-2010, 07:25 AM   #1
ASTRAPI
Member
 
Registered: Feb 2007
Posts: 210

Rep: Reputation: 16
Question Locate second disk path from ssh and copy a folder to it


Hello

I own a web server (centos 64bit with cpanel on it) and my datacenter add me a second hard disk and i want first to locate from ssh where is it (the path) and then to copy my mysql folder /var/lib/mysql to the new disk and have it like this /new/mysql on the second disk...

Thank you
 
Old 06-09-2010, 07:34 AM   #2
dracuss
Member
 
Registered: May 2006
Location: Chisinau, Moldova
Distribution: Gentoo, Debian sid
Posts: 151

Rep: Reputation: 29
If the HDD is already mounted, use the "mount" command to see where it is mounted.
If not, guess that you should format it by yourself (by using fdisk/parted and mkfs.ext3), and afterwards mount it ("mount /dev/sdXY /where/to/mount", where X=HDD's letter (the first HDD is a, second is b and etc) and y=partition number, starting from 1).
Afterwards you can use the cp command to copy the mysql folder to the new HDD.
 
Old 06-09-2010, 07:35 AM   #3
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by ASTRAPI View Post
Hello

I own a web server (centos 64bit with cpanel on it) and my datacenter add me a second hard disk and i want first to locate from ssh where is it (the path) and then to copy my mysql folder /var/lib/mysql to the new disk and have it like this /new/mysql on the second disk...

Thank you
a combination of df & sfdisk -l should give you the name and location of the new disk.
i suspect you will need to mount this disk to the directory of your choice too...
I will assume you know how to copy the /var/lib/mysql folder to the new location

Last edited by centosboy; 06-09-2010 at 07:36 AM.
 
Old 06-09-2010, 08:52 AM   #4
Reasa
Member
 
Registered: Aug 2008
Distribution: Slackware
Posts: 53

Rep: Reputation: 16
Id try "df -h" or try to check "dmesg | grep hd" (or sda, hdb). Once you locate it do mount like Dracuss said.
 
Old 06-09-2010, 09:10 AM   #5
ASTRAPI
Member
 
Registered: Feb 2007
Posts: 210

Original Poster
Rep: Reputation: 16
Ok all done

The only think is how can i add a file system ext3 ?

mkfs.ext3

I need the exact command after partitioning please...

Thank you

Last edited by ASTRAPI; 06-09-2010 at 01:47 PM.
 
Old 06-10-2010, 04:16 AM   #6
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by ASTRAPI View Post
Ok all done

The only think is how can i add a file system ext3 ?

mkfs.ext3

I need the exact command after partitioning please...

Thank you
Code:
mkfs.ext3 -b block-size /dev/hdb1

man mkfs.ext3
 
Old 06-10-2010, 08:41 AM   #7
ASTRAPI
Member
 
Registered: Feb 2007
Posts: 210

Original Poster
Rep: Reputation: 16
Ok as i want only one big partition can i use this?

mkfs -t ext3 /dev/sdb1
 
Old 06-10-2010, 08:45 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
Quote:
Originally Posted by ASTRAPI View Post
Ok as i want only one big partition can i use this?

mkfs -t ext3 /dev/sdb1
That looks OK, but it has nothing to do with wanting only one partition...

First, you make the partition(s)---then create the filesystem(s)

I think your syntax is synonymous with:
mkfs.ext3 /dev/sdb1
 
Old 06-10-2010, 08:46 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,541
Blog Entries: 23

Rep: Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943Reputation: 1943
Hi,

'How to Ask Questions the Smart Way' would be one link you should look at to help us to help you in the future.

You need to get some basic understanding. This can be attained by looking at these links to aid you;

Linux Documentation Project
Rute Tutorial & Exposition
Linux Command Guide
Utimate Linux Newbie Guide
LinuxSelfHelp
Getting Started with Linux
Bash Reference Manual
Advanced Bash-Scripting Guide
Linux Home Networking
Virtualiation- Top 10


The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links!
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
i need to copy files from one folder to another folder using shell anurupr Linux - Newbie 17 03-04-2010 10:07 AM
want to copy an inode folder from acdrom to a home directory (folder). nhbob Linux - Newbie 8 12-20-2009 12:12 PM
help: makefile how to let it locate c compiler in a relative path? lxpwj Programming 4 09-25-2009 04:38 AM
Unable to locate 'cc' utility in path SEATU Linux - Newbie 2 10-05-2005 01:22 AM
VM not in PATH - Cannot locate installed components chidman Linux - Newbie 3 10-14-2004 11:39 PM


All times are GMT -5. The time now is 11:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration