Closed Bug 1035051 Opened 10 years ago Closed 7 years ago

[Device Storage] To Support Network Storage via NFS, SAMBA and Others

Categories

(Firefox OS Graveyard :: General, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(tracking-b2g:backlog)

RESOLVED WONTFIX
tracking-b2g backlog

People

(Reporter: mchen, Unassigned)

References

Details

(Whiteboard: [ft:conndevices])

As an user, I would like to connect my device with other network storages (ex: NFS and SAMBA/CIFS) at home. Then there will be a new device stroage for me to access. ex: playing music, view image and video.
blocking-b2g: --- → backlog
Whiteboard: [FT:Stream3]
See Also: → 1035053
According to the reply from Ehsan in [1], we would like to create these services in Gecko not Gaia.
The reason is that for low memory profile devices the app as device storage may be easy to been killed.
Therefore for some common and popular storage types we need to do it into gecko support.

Hi Dave,

May I know your suggestion on supporting NFS/Samba/CIFS into gecko?

Thanks.

[1] https://groups.google.com/forum/#!topic/mozilla.dev.webapi/ol7sL7nM8KI
Flags: needinfo?(dhylands)
(In reply to Marco Chen [:mchen] from comment #1)
> According to the reply from Ehsan in [1], we would like to create these
> services in Gecko not Gaia.
> The reason is that for low memory profile devices the app as device storage
> may be easy to been killed.
> Therefore for some common and popular storage types we need to do it into
> gecko support.
> 
> Hi Dave,
> 
> May I know your suggestion on supporting NFS/Samba/CIFS into gecko?
> 
> Thanks.
> 
> [1] https://groups.google.com/forum/#!topic/mozilla.dev.webapi/ol7sL7nM8KI

There are really 2 pieces to the problem.

The first piece is getting the appropriate support in the kernel. Samba and CIFS are really the same thing.

For either one, you need the appropriate filesystem support compiled into the kernel or available as a loadable module.

Until you can do a mount command from an adb shell, there isn't much point in proceeding any further.

The next step is to be able to automate the mount. I'm guessig that this will need some AutoMounter support, and you'll also need some gaia support to be able to store settings (like username and password, plus whatever other options a given client needs).

Once you can automate the mounting process, then the mounted file systems just like directories, and you can create a fake volume which maps to the mounted filesystem.

So the hard part is all of the mounting/unmounting, dealing with error conditions (like what happens when you lose wifi). The Device Storage part is more or less straight forward.
Flags: needinfo?(dhylands)
Hi Dave,

> Until you can do a mount command from an adb shell, there isn't much point in proceeding any further.

Got it. Then we will need a device with linux kernel which can support something like "mount -t nfs 192.168.1.1:/home/public /home/mnt". Will follow up this requirement with co-worker of flame in gonk team.

> So the hard part is all of the mounting/unmounting, dealing with error conditions (like what happens 
> when you lose wifi). The Device Storage part is more or less straight forward.

Then start to deal with issues on implementation level.

Thanks.
I already built a kernel image for flame device to support NFS.
Developers can download it via [1].

In order to mount nfs storage, you need to call "busybox mount" instead of "mount" from AOSP.
Please download busybox from [2].

Then you can mount nfs storage by 
  "busybox mount -o nolock,ro,hard,intr,vers=3 -t nfs 192.xxx.xxx.x.x:/your/nfs/share /mnt/sdcard/YourLocalFolder"

Note: These files are protected by Mozilla mail account.

[1] https://drive.google.com/a/mozilla.com/file/d/0BxKpB0y8NZSHS25zM2NNY2ExVnc/edit?usp=sharing
[2] https://drive.google.com/a/mozilla.com/file/d/0BxKpB0y8NZSHckxCdzktbExrYkU/edit?usp=sharing
Depends on: 1035748
Depends on: 1126694
Whiteboard: [FT:Stream3] → [ft:conndevices]
blocking-b2g: backlog → ---
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.