Apr 7, 2012
tom

Why do I get xfs_freeze “Operation not supported” error with ec2-consistent-snapshot? Debian Squeeze w/ext4 filesystem

Question

I’m running the following command:

[root@somehost ~]# ec2-consistent-snapshot --aws-credentials-file '/some/dir/file' --mysql --mysql-socket '/var/run/mysqld/mysql.sock' --mysql-username 'backup' --mysql-password 'password' --freeze-filesystem '/dev/xvda1' vol-xxxxxx

It returns this error:

xfs_freeze: cannot freeze filesystem at /dev/xvda1: Operation not supported
ec2-consistent-snapshot: ERROR: xfs_freeze -f /dev/xvda1: failed(256)
snap-eeb66393
xfs_freeze: cannot unfreeze filesystem mounted at /dev/xvda1: Invalid argument
ec2-consistent-snapshot: ERROR: xfs_freeze -u /dev/xvda1: failed(256)

This is being run on Debian Squeeze with the ext4 Linux filesystem.

Can anyone explain this error to me, or what might be its cause? When googling, I found information about it needing to be executed with sudo, but I’m performing the entire operation as root. I also found some posts about trying to run it after a CentOS upgrade using yum, but the situation appeared dissimilar. It’s difficult to find things referring to this situation exactly. xfs_freeze is available for use on the filesystem. Is it possible that the filesystem, despite being ext4, somehow doesn’t support freezing? Sorry if I’ve missed some bit of StackExchange etiquette with this post — it’s my first venture here!

Answer

That’s a really odd situation you’ve got there — freezing has been supported in ext3/4 since 2.6.29, so assuming that you’re running the stock Squeeze kernel (2.6.32), the operation should be supported (using the same ioctls that xfs_freeze uses for XFS filesystems, even).

I’d try running an xfs_freeze under strace, to make sure that the ioctl call that’s coming back with “Operation not supported”.

Also, if xvda1 is your root filesystem, be very, very cautious about freezing it — it’s not hard to get into a situation where you can’t run the unfreeze operation, because the disk that xfs_freeze is on is frozen (which stops reads as well as writes) and so you can’t read xfs_freeze to execute it to unfreeze the filesystem… it’s reboot time then, no way around it. Put your important data on a separate EBS volume (just one more reason why EBS-backed instances aren’t the win people think they are).

Answered by womble

No related posts.

Leave a comment