Re: [Observium] Moving logs and rrds to another partition?

Can I move entire DB to another disk?
Like this? : 1. Stop the daemons 2. Rename the DB folder "mv /var/lib/mysql /var/lib/mysql-tmp" 3. Recreate the folder "mkdir /var/lib/mysql" 4. Mount the new disk to the new folder "mount -t ext4 /dev/sdb1 /var/lib/mysql" (put in fstab after) 5. Copy the files from the old folder to the new folder (cp mysql-tmp/* mysql/) 6. Restart the daemons.
And voila???
Thanks,
Benoit

👍
Am 21.08.2014 um 16:51 schrieb Benoit Lambert Benoit.Lambert@ntl.nt.net:
Can I move entire DB to another disk?
Like this? :
- Stop the daemons
- Rename the DB folder "mv /var/lib/mysql /var/lib/mysql-tmp"
- Recreate the folder "mkdir /var/lib/mysql"
- Mount the new disk to the new folder "mount -t ext4 /dev/sdb1 /var/lib/mysql" (put in fstab after)
- Copy the files from the old folder to the new folder (cp mysql-tmp/* mysql/)
- Restart the daemons.
And voila???
Thanks,
Benoit _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium

You forgot to chown and chmod the mount point, but yes, sure that works. It's just a file path, nothing cares where it is physically :-)
Tom
On 08/21/2014 04:51 PM, Benoit Lambert wrote:
Can I move entire DB to another disk?
Like this? :
- Stop the daemons
- Rename the DB folder "mv /var/lib/mysql /var/lib/mysql-tmp"
- Recreate the folder "mkdir /var/lib/mysql"
- Mount the new disk to the new folder "mount -t ext4 /dev/sdb1 /var/lib/mysql" (put in fstab after)
- Copy the files from the old folder to the new folder (cp mysql-tmp/* mysql/)
- Restart the daemons.
And voila???
Thanks,
Benoit _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
participants (3)
-
Benoit Lambert
-
Simon Schmitz
-
Tom Laermans