[kwlug-disc] Adding (setting up) 2nd disk.
kb at 2bits.com
Tue Jan 26 17:49:56 EST 2010
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
# Create a file system
mkfs -text3 /dev/sdb1
# Mount as a new disk
mount /dev/sdb1 /disk2
# Shutdown MySQL
# Copy the data
cp -a /var/lib/mysql /disk2
# Edit my.cnf to point to the new location
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
Drupal optimization, development, customization and consulting.
Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra
Simplicity is the ultimate sophistication. -- Leonardo da Vinci
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the kwlug-disc