I started my AWS OpsWorks instance this morning and received an error that it could not access the /srv/www directory. This is strange since everything worked normally yesterday. The instance is running Ubuntu 14.04.3 LTS.
After SSH:ing into the instance, I noticed that I could not even access /srv/www as root.
root@stg-worker1:/srv# ll
total 8
drwxr-xr-x 3 root root 4096 Sep 24 07:17 ./
drwxr-xr-x 23 root root 4096 Sep 24 06:41 ../
drwxrwxrwx 2 root root 0 Sep 24 06:41 www/
root@stg-worker1:/srv# cd www
-bash: cd: www: No such file or directory
Strangely enough the size of www directory is 0 bytes! I then checked the /var/www directory and noticed the same problem there (even though those two directories are not related to each other)
I then made a new test directory in /srv and it worked normally.
root@stg-worker1:/srv# mkdir test
root@stg-worker1:/srv# stat test
File: ‘test’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: ca01h/51713d Inode: 164068 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2015-09-24 07:19:53.160462520 +0000
Modify: 2015-09-24 07:19:53.160462520 +0000
Change: 2015-09-24 07:19:53.160462520 +0000
Birth: -
Stat command shows that it is on the correct device ca01h whereas the www directory was on another device
root@stg-worker1:/srv# stat www
File: ‘www’
Size: 0 Blocks: 0 IO Block: 1024 directory
Device: 1bh/27d Inode: 8970 Links: 2
Access: (0777/drwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2015-09-24 06:41:29.128571000 +0000
Modify: 2015-09-24 06:41:29.128571000 +0000
Change: 2015-09-24 06:47:56.392966341 +0000
Birth: -
I did not make any changes to Opsworks configuration or to any cookbooks.
Any ideas what could cause this problem or how to further investigate?