This post is more than 5 years old
1 Rookie
•
18 Posts
0
10397
April 26th, 2016 15:00
ECS: Remote I/O error when writing a file
I'd really appreciate some help on this. I've submitted a github ticket, but I haven't got an answer. This is what I've done.
I installed a centos 7 server and followed the single node docker install on github
I ran both step1 and step2 scripts.
I login to the web ui
I created an object user named nfs_user.
I created a bucket named nfs_bucket. I added the nfs_user as the owner and added the nfs_group with r,w,exec permissions
I went to file and created users named nfs_user (10001) and nfs_group (10002) with the corresponding IDs
I created an export and used nfs_user under anonuser and root squash and nfs_group under anon group.
This is what happens on my client.
[root@localhost /]# showmount -e 10.44.236.152
Export list for 10.44.236.152:
/ns1/nfs_bucket *
[root@localhost /]# mount -t nfs -o vers=3,sec=sys,proto=tcp,async 10.44.236.152:/ns1/nfs_bucket /nfsshare/
[root@localhost /]# cd /nfsshare/
[root@localhost nfsshare]# ls -al
total 1
drwxrwxrwx. 3 10001 10002 96 Apr 26 16:28 .
[root@localhost nfsshare]# mkdir test_dir
[root@localhost nfsshare]# ls -al
total 1
drwxrwxrwx. 3 10001 10002 96 Apr 26 16:29 .
drwxr-xr-x. 3 10001 10002 96 Apr 26 16:29 test_dir
[root@localhost nfsshare]# cd test_dir/
[root@localhost test_dir]# ls -al
total 1
drwxr-xr-x. 3 10001 10002 96 Apr 26 16:29 .
[root@localhost test_dir]# touch file
touch: cannot touch ‘file’: Remote I/O error
[root@localhost test_dir]# echo 'help me' > file
-bash: file: Remote I/O error
[root@localhost test_dir]# cd ..
[root@localhost nfsshare]# echo 'why am I getting this IO error' > file
-bash: file: Remote I/O error
Any ideas here?



benschumacher
1 Rookie
•
75 Posts
0
January 16th, 2018 06:00
Are you mapping the bucket (Bucket2) owner (object_user_1) to UID 1003? It doesn't look like it. It appears you're still mapping UID 30024 to the bucket owner. In ECS, map 1003 to object_user1 and 1004 to nfs_group. Then, on linux box, run:
mkdir /mnt/ecs_share
chown 1003:1004 /mnt/ecs_share
sudo mount -t nfs -o vers=3,sec=sys,proto=tcp my_ip:/ns1/Bucket2/ /mnt/ecs_share
su user_ecs
Then, you should be able to work in the mounted directory. Also, when you ls /mnt, you should see the correct user/group instead of the numbers your seeing above.
Ben
Pierre-LG
1 Rookie
•
10 Posts
0
January 19th, 2018 06:00
Hello Ben,
I’m still having problems…
I did what you have mentionned:
/mnt>mkdir ecs_share
/mnt>chown 1003:1003 /mnt/ecs_share
/mnt>ls -la |grep ecs
drwxr-xr-x 2 user_ecs user_ecs 4096 Jan 19 14:15 ecs_share
/mnt>sudo mount -t nfs -o vers=3,sec=sys,proto=tcp 10.3.1.197:/ns1/Bucket2/ /mnt/ecs_share
/mnt>mount |grep ecs
my_ip:/ns1/Bucket2/ on /mnt/ecs_share type nfs (rw,vers=3,sec=sys,proto=tcp,addr=my_ip)
/mnt>ls -la |grep ecs
drwx---rwx 3 user_ecs 2147483647 96 Jan 19 2018 ecs_share
When I sudo to user_ecs, I can list the content of /mnt/ecs_share but I cannot write or read on it.
/mnt/ecs_share>cp /home/file1 ./TestFile@.txt
cp: cannot create regular file `./TestFile@.txt': Remote I/O error
Here is how ECS is configured (just to have a clear view after the changes I made):
I changed the owner of the /mnt/ecs_share to 1003:1003 as I mapped object_user1 to 1003 and nfs_group to 1003 as well.
What is strange, after the mount, the share /mnt/ecs_share owner is changed to : 1003: 2147483647 !!!
I really appreciate your help. Thanks again.
Pierre-Henry Deliège
benschumacher
1 Rookie
•
75 Posts
0
January 19th, 2018 07:00
Can you please verify one more time that you don't have retention enabled on the bucket? What type of ECS are you testing with? Is this a ECS Community Edition installation? Can you create a new bucket with the same owner and test again? I'm wondering if there's something set on the bucket that's causing problems. Also, I'd be happy to jump on WebEx with you if you want to look at this together. Please let me know.
Thanks,
Ben
Pierre-LG
1 Rookie
•
10 Posts
0
January 19th, 2018 07:00
Ben,
Let me answer your questions :
Yes, I double check retention and it’s set to 0.
I’m using the Community Edition:
I’ll create a new bucket from scratch and see if there is any difference.
If not, yes, of course it will be great if you could help me with a WebEx session.
I’ll get back on Monday on my findings.
Thanks again,
Pierre-Henry Deliège
Pierre-LG
1 Rookie
•
10 Posts
0
January 30th, 2018 00:00
Hello Ben,
After a week out of the office, I’m back and I tried to recreate a new bucket but I have still the issue :
[DOC:root]/usr/mtc/bin>sudo mount -t nfs -o vers=3,sec=sys,proto=tcp 192.168.101.197:/ns1/bucket_nfs/ /mnt/ecs_share
[DOC:root]/usr/mtc/bin>cd /mnt/ecs_share/
[DOC:root]/mnt/ecs_share>ls
[DOC:root]/mnt/ecs_share>cp /home/file1 .
cp: closing `./file1': Remote I/O error
[DOC:root]/mnt/ecs_share>ls -rtl
total 0
-rw-r-xr-- 1 user_ecs 2147483647 0 Jan 30 2018 file1
[DOC:root]/mnt/ecs_share>su user_ecs
[DOC:user_ecs]/usr/mtc/bin>cd /mnt/ecs_share/
[DOC:user_ecs]/mnt/ecs_share>rm file1
[DOC:user_ecs]/mnt/ecs_share>ls
[DOC:user_ecs]/mnt/ecs_share>cp /home/file1 ./TestFile@.txt
cp: closing `./TestFile@.txt': Remote I/O error
[DOC:user_ecs]/mnt/ecs_share>ls
TestFile@.txt
[DOC:user_ecs]/mnt/ecs_share>ls -rtl
total 0
-rw-r-xr-- 1 user_ecs 2147483647 0 Jan 30 2018 TestFile@.txt
[DOC:user_ecs]/mnt/ecs_share>cd ..
[DOC:user_ecs]/mnt>ls -la
total 29
drwxr-xr-x. 9 root root 4096 Jan 19 14:15 .
dr-xr-xr-x. 23 root root 4096 Jan 30 01:30 ..
drwxrwxrwx 9 root root 4096 Jan 8 14:32 CACHE
drwxrwxrwx 3 user_ecs user_ecs 96 Jan 30 2018 ecs_share
drwxrwxrwx 2 root root 4096 Jan 30 08:34 FUSE
drwxrwxrwx 2 root root 4096 Jan 18 11:53 testbucket
[DOC:user_ecs]/mnt>exit
exit
[DOC:root]/mnt/ecs_share>cd ..
[DOC:root]/mnt>ls -la
total 29
drwxr-xr-x. 9 root root 4096 Jan 19 14:15 .
dr-xr-xr-x. 23 root root 4096 Jan 30 01:30 ..
drwxrwxrwx 9 root root 4096 Jan 8 14:32 CACHE
drwxrwxrwx 3 user_ecs user_ecs 96 Jan 30 2018 ecs_share
drwxrwxrwx 2 root root 4096 Jan 30 08:35 FUSE
drwxrwxrwx 2 root root 4096 Jan 18 11:53 testbucket
[DOC:root]/mnt>mount
/dev/sda2 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/sdb1 on /mnt/CACHE type ext4 (rw,user_xattr)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
//nas01.mt-c.com/Software on /mnt/MOUNT_POINTS/Software type cifs (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
core_fuse on /mnt/FUSE type fuse.core_fuse (rw,nosuid,nodev,default_permissions,allow_other)
[DOC:root]/mnt>
So, it looks like I can mount correctly the NFS share, I can list the content and I can even delete file in it, but when I try to write data on it, I have Remote I/O error.
Any other idea ?
Pierre-Henry
benschumacher
1 Rookie
•
75 Posts
0
February 19th, 2018 05:00
That's great news! Thank you for the update.
Ben