Locate second disk path from ssh and copy a folder to it
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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...
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.