[kwlug-disc] Adding (setting up) 2nd disk.
Raul Suarez
rarsa at yahoo.com
Wed Jan 27 06:39:54 EST 2010
I've actually done similar things with a small difference
instead of
cp -a /var/lib/mysql /disk2
I do
cp -ax /var/lib/mysql /disk2
so it does not traverse symlinks. -ax will do the archive copy on a single file system.
Raul Suarez
Technology consultant
Software, Hardware and Practices
_________________
http://rarsa.blogspot.com/
An eclectic collection of random thoughts
--- On Tue, 1/26/10, Khalid Baheyeldin <kb at 2bits.com> wrote:
> From: Khalid Baheyeldin <kb at 2bits.com>
> Subject: Re: [kwlug-disc] Adding (setting up) 2nd disk.
> To: "KWLUG discussion" <kwlug-disc at kwlug.org>
> Received: Tuesday, January 26, 2010, 5:49 PM
> What I do normally when a server would
> benefit from stuff residing on different spindles (i.e.
> physical disks), is to point the application to the location
> of the new data, if the app does support that, and copy
> everything to the new location. If it does not, then
> symlinks are an option.
>
>
> Assuming /dev/sda is the first disk, and /dev/sdb is the
> second:
>
> # Partition the disk
> fdisk /dev/sdb
> # Create a file system
> mkfs -text3 /dev/sdb1
> # Mount as a new disk
> mount /dev/sdb1 /disk2
>
> # Shutdown MySQL
> /etc/init.d/mysql stop
> # Copy the data
> cp -a /var/lib/mysql /disk2
> # Edit my.cnf to point to the new location
> vi /etc/mysql/conf.d/local.cnf
>
> A similar procedure can be followed for /home, by editing
> the /etc/passwd
>
> file and change /home to /home/disk2 or whatever.
> --
> Khalid M. Baheyeldin
> 2bits.com, Inc.
> http://2bits.com
> Drupal optimization, development, customization and
> consulting.
>
> Simplicity is prerequisite for reliability. -- Edsger
> W.Dijkstra
> Simplicity is the ultimate sophistication. -- Leonardo
> da Vinci
>
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> kwlug-disc_kwlug.org mailing list
> kwlug-disc_kwlug.org at kwlug.org
> http://astoria.ccjclearline.com/mailman/listinfo/kwlug-disc_kwlug.org
>
__________________________________________________________________
The new Internet Explorer® 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/
More information about the kwlug-disc
mailing list