Re: [Observium] Moving logs and rrds to another partition?
![](https://secure.gravatar.com/avatar/28191f87f453f25706173420cf229016.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/2720b9712f5c19cbe0ebbbe9475d54b1.jpg?s=120&d=mm&r=g)
👍
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
![](https://secure.gravatar.com/avatar/21caf0a08d095be7196a1648d20942be.jpg?s=120&d=mm&r=g)
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