Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NFS server embeded, suggestions ? any idea 4 uclibc profile?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 522

PostPosted: Tue Jan 05, 2010 11:04 am    Post subject: NFS server embeded, suggestions ? any idea 4 uclibc profile? Reply with quote

hello
i' am on a ppc machine, equipped with IBM-405GP (~ppc603/4 core)
the firmware (uboot) make me able to tftpboot only <6Mb of kernel+ramrootfs

i'd like to prepare a ~ NAS (network attached storage), i mean i'd like to have a remote "embedded machine" with software raid 1 in/from where mount a remote filesystem

now, suppose that you want to mount a filesystem on a remote computer sitting somewhere on the internet. There are two standard ways to do this

* NFS (Network FileSystem) - the standard UN*X way
* Samba (SMB/CIFS/Microsoft Windows Networking)




NFS is nice: it's fast, it's standard, it roxs
Unfortunately, there are drawbacks to NFS, at least as far as I can tell:

1) You will need FULL access to both systems in order to configure them to use NFS - this means that you will need to be root on both systems

2) Both systems need to be able to talk to each other directly without being impeded by firewalls, gateways

3) I have experienced machine crashing when one side of the link goes down.
In other words, if one machine is expecting the other machine to be there, and it isn't...
BOOM... good luck regaining control.
Note that this happens to me whether I use so-called "hard" or "soft" mount options.

4) Neither NFS nor Samba is particulary secure. I would never dare set up a share without being behind a firewall. Even then I'm a bit scared.


about The alternative ? sshFS, a filesystem client based on the SSH File Transfer Protocol.

OK, it a user space fs, but since most SSH servers already support this protocol it is very easy to set up:
* on the server side there's nothing to do.
* on the client side mounting the filesystem is as easy as logging into the server with ssh


on the server side, NFS is depending of portmap, which is issuing "segmentation fault" on uclibc-profile

other bad things happen trying to compile with uclibc

[net-fs/nfs-utils] issues not compiling cause net-fs/nfs-utils-1.1.6/
* utils/statd/stat.c: #include "myglibc-missing-functions.c"
* utils/mountd/cache.c: #include "myglibc-missing-functions.c"
that happens cause in the uc-pofile the glibc has been replaced by uclibc
which is missing of
* getgrouplist()
* getrpcent_r()
* int getrpcbyname_r()
* int getrpcbynumber_r()

bugged binaries (cause of the missing functions of uclibc):
* utils/mountd/mountd
* utils/statd/sm-notify
* utils/statd/statd


[sys-fs/sshfs-fuse] is claiming, too !
* No package 'glib-2.0' found
* No package 'gthread-2.0' found


but you do not use it on the server side ! what you only need is /usr/sbin/sshd !!!




ok, about uclibc, i need the uclibc profile cause my firmware is only able to tfpboot <6Mb or kernel+ramrootfs, with uclibc i satisfy the constrains, with glibc i don't


any idea ? any suggestion ? anybody has ever try to do an embedded NFS/sshFS ?
do you suggest me a kexecboot way ?
(i mean firmare, boot, tftpboot a kernel + kexecboot, which will assume the control of the board (without any memory limitation < 120Mb about download) and will secondary download an other kernel + ramrootfs and jump to it ... after all, my board has 128Mb of ram)
Back to top
View user's profile Send private message
Wormo
Retired Dev
Retired Dev


Joined: 29 Nov 2004
Posts: 526
Location: SB County California

PostPosted: Sun Jan 17, 2010 7:22 am    Post subject: Reply with quote

Quote:

ok, about uclibc, i need the uclibc profile cause my firmware is only able to tfpboot <6Mb or kernel+ramrootfs, with uclibc i satisfy the constrains, with glibc i don't

do you suggest me a kexecboot way ?
(i mean firmare, boot, tftpboot a kernel + kexecboot, which will assume the control of the board (without any memory limitation < 120Mb about download) and will secondary download an other kernel + ramrootfs and jump to it ... after all, my board has 128Mb of ram)


I don't get why you would need to switch kernels. It is normal to have a small initramfs in the firmware for booting your NAS, and from there you can just switch_root into a larger root on the hard disk (in your case, it would be a partition on the RAID). Did I miss something -- is there something unusual about your hardware that rules out this usual strategy?
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 522

PostPosted: Sun Jan 17, 2010 2:06 pm    Post subject: Reply with quote

my board's firmware has a bug, which makes impossible to load and boot a kernel+initrd greater than 5Mb. which is too poor to have all you need for NFS server

also, the firmware is NOT able to boot from an hard drive, and i do not want to load a kernel and to mount hard drive as "rootfs"

personally i want the rootfs in ram, then having disks mounted (this cause i also want to badblocks and test things)

anyway, i am appreciating sshfs server a lot. but i also want NFS, i can't find any uclibc embedded NFS server, so i used a classical glibc solution realizing a special ramrootfs dual steps boot method

1) when you switch on the board, the firmware (uboot) will tfpbooting a {kernel + inird with kexec + a tiny udp/ip file transfer client} ... for a total of 4Mb, which is a bug (no more than 5Mb in tftoboot) work around
2) this client will request the final kernel+initrd+rootfs (it's ~10Mb) , and kexec boot it
3) the final kernel will boot, decompress and mount the ramrootfs into ram, then i it will launch all the /etc/init.d/ services, which NFS services is a part of (with portmap and his friends)

that's all folks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum