s3fs-fuseをつかってマウントをしようとすると、Input/output errorがでる
[root@localhost tarr]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_centos-lv_root
30G 9.4G 19G 34% /
tmpfs 499M 232K 498M 1% /dev/shm
/dev/sdb1 8.0G 33M 8.0G 1% /mnt/xfs
/dev/sda1 485M 58M 402M 13% /boot
/dev/sr0 62M 62M 0 100% /media/VBOXADDITIONS_4.3.12_93733
[root@localhost tarr]# /usr/local/s3fs-fuse/bin/s3fs local-orfs /mnt/s3fs -o url=http://localhost:8080 -o passwd_file=/root/.passwd-s3fs -o default_acl=private -o allow_other,uid=502,gid=503 -o nomultipart
[root@localhost tarr]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_centos-lv_root
30G 9.4G 19G 34% /
tmpfs 499M 232K 498M 1% /dev/shm
/dev/sdb1 8.0G 33M 8.0G 1% /mnt/xfs
/dev/sda1 485M 58M 402M 13% /boot
/dev/sr0 62M 62M 0 100% /media/VBOXADDITIONS_4.3.12_93733
s3fs 256T 0 256T 0% /mnt/s3fs
一見うまくいったかのように見える。しかし、ls -laしてみると、エラーが出る。
[root@localhost tarr]# ls -la /mnt/s3fs/
ls: cannot access /mnt/s3fs/.htaccess: Input/output error
ls: cannot access /mnt/s3fs/test.txt: Input/output error
total 5
drwxrwxrwx. 1 orfs orfs 0 Jan 1 1970 .
drwxr-xr-x. 4 root root 4096 Jul 10 17:24 ..
??????????? ? ? ? ? ? .htaccess
??????????? ? ? ? ? ? test.txt
[root@localhost tarr]# ls -la /mnt/s3fs/.htaccess
^C
ls: cannot access /mnt/s3fs/.htaccess: Input/output error
unmount後にlsしても、そのようなファイルはない。
[root@localhost tarr]# fusermount -u /mnt/s3fs
[root@localhost tarr]# ls -la /mnt/s3fs
total 8
drwxr-xr-x. 2 root root 4096 Jul 10 17:44 .
drwxr-xr-x. 4 root root 4096 Jul 10 17:24 ..
おそらく、以前ガチャガチャleofsをいじっていたときのファイルがどこかに残っていてエラー出しているっぽい。leofsの初期化を試みる。
leofsを止めた後、以下のファイルを削除
[leofs@localhost package]$ LEO_PATH=`pwd`
[leofs@localhost package]$ echo $LEO_PATH
/usr/local/dev/leofs/package
[leofs@localhost package]$ rm -rf ${LEO_PATH}/leo_manager_*/work/mnesia/*
[leofs@localhost package]$ rm -rf ${LEO_PATH}/*/work/queue/*
[leofs@localhost package]$ rm -rf ${LEO_PATH}/leo_storage*/avs
なんかそんな予感はしていたが、leofs起動後に確認すると、leofsの設定が全部消えてた。
get-users
user_id | role_id | access_key_id | created_at
------------+---------+------------------------+---------------------------
_test_leofs | 9 | 05236 | 2014-07-23 11:30:11 +0900
get-buckets
[ERROR] Bucket not found
いらないキャッシュとかだけ消そうとしてたんだけど、どうやるのが正解だったんだろう。。とりあえず、今はこれを再設定すれば行けそう。
[root@localhost tarr]# /usr/local/s3fs-fuse/bin/s3fs local-orfs /mnt/s3fs -o url=http://localhost:8080 -o passwd_file=/root/.passwd-s3fs -o default_acl=private -o allow_other,uid=502,gid=503 -o nomultipart
[root@localhost tarr]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_centos-lv_root
30G 9.4G 19G 34% /
tmpfs 499M 232K 498M 1% /dev/shm
/dev/sdb1 8.0G 33M 8.0G 1% /mnt/xfs
/dev/sda1 485M 58M 402M 13% /boot
/dev/sr0 62M 62M 0 100% /media/VBOXADDITIONS_4.3.12_93733
s3fs 256T 0 256T 0% /mnt/s3fs
[root@localhost tarr]# ls -la /mnt/s3fs/
total 5
drwxrwxrwx. 1 orfs orfs 0 Jan 1 1970 .
drwxr-xr-x. 4 root root 4096 Jul 10 17:24 ..
[root@localhost tarr]# touch /mnt/s3fs/test.txt
[root@localhost tarr]# ls -la /mnt/s3fs/
total 5
drwxrwxrwx. 1 orfs orfs 0 Jan 1 1970 .
drwxr-xr-x. 4 root root 4096 Jul 10 17:24 ..
----------. 1 orfs orfs 0 Jul 23 11:43 test.txt
いけた