1

I have MySQL master-slave replication setup in Amazon EC2. For the sake of resilience, I have set up LVM on RAID 10 array, on both master as well as slave. I have been using ec2-consistent-snapshot for some time now to take the snapshot from the slave instance.

So, I tried to create the disks from those snapshots and attach them to a new MySQL installation. Since the new installation would not recognise the LVM and RAID setup, I reactivated the LVM and RAID in the new instance using the following commands.

  1. Scan the disks for RAID array members:

    mdadm --examine --scan <comprising disks>
    
  2. Reactivate the RAID array:

    mdadm -A -s
    
  3. Reactivate the lvm:

    vgchange -ay
    

Since snapshotting took the backup of the ibdata and iblogfiles, I removed them for the fresh installation. MySQL would start normal.

Help me out of this

  • 1
    You haven't really asked a question, or explained what errors or problems you're having - only described steps you've taken. Please elaborate on the issue by editing the question. – Sami Kuhmonen Sep 1 '15 at 12:13
0

Removed ibdata1? You can* remove iblogfiles but not the ibdata1!! They're system tablespaces storing tables, indexes, metadata, undologs....

*=> Removing iblogs is okay once you stop mysql but not while it's running!

Update: Removing iblogs is okay only after shutting down mysql with innodb_fast_shutdown disabled.

You might like to review this answer to understand what is wrong! You might want to do a restore from the snapshot may be.

  • 1
    Don't remove iblogs either -- unless you have made a clean shutdown with innodb_fast_shutdown turned off. LVM is equivalent to a power failure. – Rick James Sep 1 '15 at 17:08
  • Yep... that's why the STAR is after "can" ;) & was told later on – mysql_user Sep 1 '15 at 18:25
  • * and innodb_fast_shutdown turned off. -- My added qualification. – Rick James Sep 2 '15 at 5:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.