Why can’t xfs_freeze find this directory when called with ec2-consistent-snapshot?
On my management server:
/usr/bin/ec2-consistent-snapshot --freeze-filesystem /mnt/websites --description "FOO-DATA $(date)" vol-d84bhi64 --region eu-west-1
/mnt/websites: No such file or directory
ec2-consistent-snapshot: ERROR: xfs_freeze -f /mnt/websites: failed(256)
On the server that the volume in question is attached to:
[root@foo ec2-user]# df -TH
Filesystem Type Size Used Avail Use% Mounted on
/dev/xvda1 ext4 8.5G 1.2G 7.2G 15% /
tmpfs tmpfs 880M 50k 880M 1% /dev/shm
/dev/xvdf xfs 54G 321M 54G 1% /mnt[root@foo ec2-user]# ls -al /mnt
total 4
drwxr-xr-x 4 root root 45 Sep 8 12:36 .
dr-xr-xr-x 22 root root 4096 Sep 13 15:07 ..
drwxr-xr-x 3 mysql mysql 16 Sep 8 12:36 mysql
-rw-r--r-- 1 root root 0 Sep 8 12:11 stuff
drwsrwsr-x 5 someuser apache 37 Sep 21 15:41 websites
Running xfs_freeze on the machine works:
[root@fb ec2-user]# xfs_freeze -f /mnt/websites
[root@fb ec2-user]# xfs_freeze -u /mnt/websites
If you use the --freeze-filesystem (or --xfs-filesystem) option, then the ec2-consistent-snapshot program must be run on the instance where the file system is mounted. Otherwise, it can’t run xfs_freeze against that filesystem.
I am the author/maintainer of ec2-consistent-snapshot. I’ll look at making this requirement clearer in the documentation.
There was a submitted patch that went a ways towards making ec2-consistent-snapshot work on remote systems (with ssh to run commands like xfs_freeze). This would help reduce the existing requirement to have the AWS credentials on the instance. I forget why the patch did not get incorporated, but will take another look at it.
If you’re trying to avoid having AWS credentials on the instance, here’s an article I wrote to limit your risk:
Improving Security on EC2 With AWS Identity and Access Management (IAM)
http://alestic.com/2010/09/aws-iam
Check more discussion of this question.
Related posts:
- Why can’t xfs_freeze find this directory when called with ec2-consistent-snapshot?
- Why do I get xfs_freeze “Operation not supported” error with ec2-consistent-snapshot? Debian Squeeze w/ext4 filesystem
- Ubuntu 9.10 cron script ‘ec2-consistent-snapshot’ unable to execute and access files
- ec2-consistent-snapshot cannot validate provided access credentials
- Why can’t ec2-consistent-snapshot find my AWS cert/keys?
Leave a comment
Recent Posts
- Cron expression that runs every 5 minutes from 1:30 am – 6:00 am [duplicate]
- Understanding redundant power supplies
- Is there a way for administrators to disable users from installing Firefox extensions?
- Is there research material on NTP accuracy available?
- How to create a limited “domain admin” that does not have access to domain controllers?





