List:General Discussion« Previous MessageNext Message »
From:Shain Miley Date:December 2 2008 6:27pm
Subject:Re: MySQl and LVM
View as plain text  
Thanks for the info, that is very useful. I still have a few questions 
though...I am considering setting up a 200GB LVM partition for the mysql 
data and a 70 GB LVM partition for the snapshots.

Am I able to store several snapshots on the 70 GB partition? or do I 
need to take one snapshot and then move it..take another one then move it?

Also...if anyone else is doing often are you taking the 
snapshots...every 5 minutes, every hour, every 12 hours, etc?



Simon J Mudd wrote:
> smiley@stripped (Shain Miley) writes:
>> I am trying to  plan we in advance our methods for backup and recovery
>> of our new MySQL replication cluster.  After doing some research it
>> looks like a lot of people are using LVM snapshots as their backup
>> solution.  We currently have two MySQL servers with 2 300 GB (Raid 1).
>> What I am confused about is the best disk layout to use at this point.
>> Do I need to create a separate volume for the snapshots?  Can anyone
>> provide any suggestions on disk layout for two disks of this size?
> The filesystem layout is largely irrelevant. Basically what you want
> is to have all your mysql files on a separate LVM filesystem. So you
> could do this by creating a new filesystem and mounting it at
> /var/lib/mysql. Then install MySQL.
> Once you have the filesystem mounted you can use mysql as normal.
> To take snapshots do the following:
> 1. stop mysql
> 2. make a snapshot LV of the volume mounted at /var/lib/mysql
> 3. start mysql
> 4. mount the snapshot and back it up to a real filesystem or to tape or whatever.
> 5. unmount the snapshot and remove it.
> 4. Is very important as if you don't do this eventually the snapshot
> will run out of space and suddenly it will lose its contents. It's
> only a temporary staging area.
> Hope this helps.
> Simon

Intersect questionAndrej Kastrin1 Dec
  • Re: Intersect questionMicah Stevens1 Dec
    • MySQl and LVMShain Miley1 Dec
      • Re: MySQl and LVMSimon J Mudd2 Dec
        • Re: MySQl and LVMShain Miley2 Dec
    • RE: Intersect questionRolando Edwards1 Dec
  • Re: Intersect questionMicah Stevens1 Dec
  • Re: Intersect questionPeter Brawley1 Dec