andriybobyr / s3backer

FUSE-based single file backing store via Amazon S3
GNU General Public License v2.0
0 stars 0 forks source link

Cannot mount s3 bucket as a loop back device in FreeBsd9 #50

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Download s3backer-1.3.7.tar.gz and extract
2.Install required libraries( curl, fuse, fusefs-s3fs-1.71_1)
3.Go to the s3backer directory and run the configure script
4.root@Es140-Nov29:~/aafak/s3backer-1.3.7 # make
5.root@Es140-Nov29:~/aafak/s3backer-1.3.7 # make install
6.root@Es140-Nov29:~/aafak # mkdir s3b.mnt demo.mnt
7.root@Es140-Nov29:~/aafak # s3backer --readOnly s3backer-demo s3b.mnt
s3backer: auto-detecting block size and total file size...
s3backer: auto-detected block size=4k and total size=20m
8.root@Es140-Nov29:~/aafak # mount -o loop s3b.mnt/file demo.mnt
mount: s3b.mnt/file: mount option <loop> is unknown: Invalid argument

What is the expected output? What do you see instead?
It should mount.
It failed and says..
mount: s3b.mnt/file: mount option <loop> is unknown: Invalid argument

What version of the product are you using? On what operating system?
s3backer-1.3.7(but Applied changes of (revision 498))
+++ s3b_config.c    (working copy)
@@ -421,7 +421,9 @@
     "-onegative_timeout=31536000",
     "-oattr_timeout=0",             // because statistics file length changes
     "-odefault_permissions",
+#ifndef __FreeBSD__
     "-onodev",
+#endif
     "-onosuid",
 #ifdef __APPLE__
     "-odaemon_timeout=" FUSE_MAX_DAEMON_TIMEOUT_STRING,

OS: FreeBSD 9
curl-7.34.0 
fusefs-libs-2.9.3_1 
fusefs-s3fs-1.71_1 
libconfuse-2.7     

Please provide any additional information below.
attached config logs

Can anyone please help me to mount s3 backer as a loop back device in freebsd 9?
I also searched for mount loop option for freebsd in google, it suggested for 
mdconfig
but mdconfig not exists for Freebsd 9

Original issue reported on code.google.com by aafak.mo...@cloudbyte.com on 8 Jan 2015 at 11:38

GoogleCodeExporter commented 8 years ago
fusefs-kmod-0.3.9.p1.20080208_11 

Original comment by aafak.mo...@cloudbyte.com on 8 Jan 2015 at 11:42

GoogleCodeExporter commented 8 years ago
I don't know how to do loopback mounts in FreeBSD. You should ask on a FreeBSD 
mailing list, etc. This is not an s3backer-specific question.

These might help:

  http://makandracards.com/jan0sch/13431-mounting-iso-images-under-freebsd
  http://gdr.geekhood.net/gdrwpl/loop-freebsd.php

Looks like you have to use mdconfig.

If you find an s3backer-specific problem please re-open this issue.

Original comment by archie.c...@gmail.com on 8 Jan 2015 at 2:12

GoogleCodeExporter commented 8 years ago
Thanks for helping.
I found loop back procedure for freebsd but after executing following
command

root@freebsd9:~/aafak # mkdir demo2.mnt s3b2.mnt
root@freebsd9:~/aafak # s3backer --readOnly s3backer-demo s3b2.mnt
s3backer: auto-detecting block size and total file size...
s3backer: auto-detected block size=4k and total size=20m
root@freebsd9:~/aafak # cd /s3b2.mnt
*/s3b2.mnt: No such file or directory.*
root@freebsd9:~/aafak #

I could not found any file under s3b2.mnt(to perform loop back mount
"mount -o ro,loop s3b.mnt/file demo.mnt")

but in my linux machine, i did the same thing, found two files name as
*"file"* and *"stats"*, later perform loopback mount
on s3b.mnt/file, everything gone successfully as you can see folloing
command

root@linux-ubuntu:~# mkdir demo1.mnt s3b1.mnt
root@linux-ubuntu:~# s3backer --readOnly s3backer-demo s3b1.mnt
s3backer: auto-detecting block size and total file size...
s3backer: auto-detected block size=4k and total size=20m
root@linux-ubuntu:~# cd s3b1.mnt/

*root@linux-ubuntu:~/s3b1.mnt# lsfile  stats*
root@*linux-ubuntu*:~/s3b1.mnt# mount -o ro,loop s3b.mnt/file demo.mnt

Please help me, what could be the problem in freebsd9 ?
I will be very thankful to you guys, because i stucked at last step.

-- 
Thanks and Regards,
Aafak
[image: cid:image001.png@01CF7E5A.8A69F530]

Plot No. : 2799 & 2800, Srinidhi Bldg, 3rd Floor,
27th Main, Sector – 1, HSR Layout,
Bangalore – 560102, Call: (91)-80-2258-2804
www.cloudbyte.com

Original comment by aafak.mo...@cloudbyte.com on 9 Jan 2015 at 10:55

GoogleCodeExporter commented 8 years ago
You said "mkdir s3b2.mnt" and then "cd /s3b2.mnt" but you were in director 
~/aafak.... ?

Original comment by archie.c...@gmail.com on 9 Jan 2015 at 4:34

GoogleCodeExporter commented 8 years ago
Thanks for helping.

Actually i was trying to enter into s3b2.mnt to see the content(means "file" 
which can be used as a virtual loopback) of it. Then it said s3b2.mnt: Not a 
directory.

noticed one more thing , after executing following command

In ubuntu:
root@aafak-HP-ProBook-4530s:~# mkdir s3b5.mnt
root@aafak-HP-ProBook-4530s:~# s3backer --readOnly s3backer-demo s3b5.mnt
s3backer: auto-detecting block size and total file size...
s3backer: auto-detected block size=4k and total size=20m
root@aafak-HP-ProBook-4530s:~# cd s3b5.mnt
root@aafak-HP-ProBook-4530s:~/s3b5.mnt# ls
file  stats
root@aafak-HP-ProBook-4530s:~/s3b5.mnt# mount
http://s3.amazonaws.com/s3backer-demo/ on /root/s3b5.mnt type fuse.s3backer 
(rw,nosuid,nodev,allow_other,default_permissions)
later, i can do all the things.

But in freebsd:
root@Es140P1-Dec30:~/aafak/freebsd-s3backer/demo #mkdir s3b.mnt
root@Es140P1-Dec30:~/aafak/freebsd-s3backer/demo # s3backer --readOnly 
s3backer-demo s3b.mnt
s3backer: auto-detecting block size and total file size...
s3backer: auto-detected block size=4k and total size=20m
root@Es140P1-Dec30:~/aafak/freebsd-s3backer/demo # cd s3b.mnt 
s3b.mnt: Not a directory.
root@Es140P1-Dec30:~/aafak/freebsd-s3backer/demo # mount
/dev/label/root_0 on / (ufs, local) devfs on /dev (devfs, local, multilabel)
/dev/fuse0 on /root/aafak/freebsd-s3backer/demo/s3b.mnt (fusefs.s3backer, 
local, nosuid, synchronous)
root@Es140P1-Dec30:~/aafak/freebsd-s3backer/demo # 

so in freebsd why /dev/fuse0 is there instead of 
http://s3.amazonaws.com/s3backer-demo/?
even it is not showing any error then why the behaviour is different in 
different platform?

Can you please tell me the location of logs to debug the failure/error on my 
freebsd box?

Original comment by aafak.mo...@cloudbyte.com on 12 Jan 2015 at 11:46

GoogleCodeExporter commented 8 years ago
Looks like there is some problem specific to the FUSE implementation on 
FreeBSD. As you may know FUSE is implemented in a custom way for each operating 
system. This is why you see /dev/fuse0 on FreeBSD, which is nothing to worry 
about, just part of how FreeBSD does it.

I would ask on the appropriate FreeBSD mailing list or perhaps on the FUSE 
mailing list. It is odd that FreeBSD does says "Not a directory" about a 
directory that you just created via mkdir.

Unfortunately I don't have time to debug this myself (I don't use currently 
FreeBSD at all), sorry.

Original comment by archie.c...@gmail.com on 12 Jan 2015 at 3:13

GoogleCodeExporter commented 8 years ago
For log information, try running dmesg(8) to see kernel log messages. Also you 
could try enabling s3backer's debug flags as documented in the man page, if you 
are willing to decipher them.

Original comment by archie.c...@gmail.com on 12 Jan 2015 at 3:15