Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I SSH'd into my AWS EC2 instance using an Amazon Linux AMI, and it told me to run the sudo yum update command for security updates. When I did, it ultimately failed to update MySQL.

*I don't know if this is the cause, but please note that my MySQL is setup with mount binds to an attached EBS filesystem via: http://aws.amazon.com/articles/1663?_encoding=UTF8&jiveRedirect=1

Here's the output:

[ec2-user@ip /]$ sudo yum update
Loaded plugins: priorities, security, update-motd, upgrade-helper
amzn-main                                                                                                                      | 2.1 kB     00:00     
amzn-updates                                                                                                                   | 2.3 kB     00:00     
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package mysql55-common.x86_64 0:5.5.32-1.35.amzn1 will be updated
---> Package mysql55-common.x86_64 0:5.5.32-1.36.amzn1 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================
 Package                              Arch                         Version                                   Repository                          Size
======================================================================================================================================================
Updating:
 mysql55-common                       x86_64                       5.5.32-1.36.amzn1                         amzn-updates                        47 k

Transaction Summary
======================================================================================================================================================
Upgrade       1 Package(s)

Total download size: 47 k
Is this ok [y/N]: y
Downloading Packages:
mysql55-common-5.5.32-1.36.amzn1.x86_64.rpm                                                                                    |  47 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : mysql55-common-5.5.32-1.36.amzn1.x86_64                                                                                            1/2 
Error unpacking rpm package mysql55-common-5.5.32-1.36.amzn1.x86_64
error: unpacking of archive failed on file /etc/my.cnf: cpio: rename
  Verifying  : mysql55-common-5.5.32-1.36.amzn1.x86_64                                                                                            1/2 
mysql55-common-5.5.32-1.35.amzn1.x86_64 was supposed to be removed but is not!
  Verifying  : mysql55-common-5.5.32-1.35.amzn1.x86_64                                                                                            2/2 

Failed:
  mysql55-common.x86_64 0:5.5.32-1.35.amzn1                                 mysql55-common.x86_64 0:5.5.32-1.36.amzn1                                

Complete!
share|improve this question

1 Answer 1

up vote 0 down vote accepted

Usually it happens when file has immutable (i) flag set for security reasons.

lsattr /etc/my.cnf

chattr -i /etc/my.cnf

In case of Amazon EBS, looks like file is bound to one on the EBS volume: just umount /etc/my.cnf, run update and bind it again.

share|improve this answer
    
Hi @GioMac. Thanks for your quick response! I ran lsattr /etc/my.cnf and received this output: [ec2-user@ip /]$ lsattr /etc/my.cnf --------------- /etc/my.cnf –  MSchwartz Sep 11 '13 at 18:43
    
You're Welcome. Welcome to serverfault. Now it should work. Please update us with results :) –  GioMac Sep 11 '13 at 18:43
    
I ran both commands, attempted to sudo yum update again and the same error occurred :/ –  MSchwartz Sep 11 '13 at 18:46
    
Then looks like file is not writable (mount|grep etc, ls -l /etc/my.cnf) or locked (lsof|grep my.cnf) –  GioMac Sep 11 '13 at 18:54
    
mount|grep etc outputs /mysqlvol/etc/my.cnf on /etc/my.cnf type none (rw,bind). The file is 644. lsof|grep my.cnf outputs nothing. Any clues? Thanks again :) –  MSchwartz Sep 11 '13 at 19:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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