NFS on Pogo and Windows

Guides written by the community, for the community, and only guides!

Re: NFS on Pogo and Windows

Postby sambul13 » Tue Nov 06, 2012 9:32 pm

I'm currently running alarm 3.6.4-1-ARCH on Dockstar. ;) Ask in Pogo Pro section, if its possible and how to upgrade Uboot and update your OS to current release.
sambul13
 
Posts: 258
Joined: Sat Aug 18, 2012 10:32 pm

Re: NFS on Pogo and Windows

Postby WarheadsSE » Tue Nov 06, 2012 11:23 pm

@Sambul13

He has, and isn't an idiot. There are platform issues with the kernel itself, and their uboot doesn't need upgraded. 8-)
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6730
Joined: Mon Oct 18, 2010 2:12 pm

Re: NFS on Pogo and Windows

Postby sambul13 » Tue Nov 06, 2012 11:57 pm

I don't have Pogo Pro, that's why suggested to ask in corresponding section, which I seldom read. :)
sambul13
 
Posts: 258
Joined: Sat Aug 18, 2012 10:32 pm

Re: NFS on Pogo and Windows

Postby WarheadsSE » Wed Nov 07, 2012 12:21 am

You're right, you don't own one.

So you tell him to go read up on how to do the steps that you took on your device, which you know is wholly different, because that makes perfect sense. When you don't know, admit it. Don't make suggestions based on assumptions. That drives quality down to its grave.

He has the current ""release"", and it is not related to yours in any aspect other than they use the same userland.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6730
Joined: Mon Oct 18, 2010 2:12 pm

Re: NFS on Pogo and Windows

Postby sambul13 » Wed Nov 07, 2012 2:32 am

sethjvm wrote:It is frustrating... Running Linux alarm 2.6.31.6


This NFS guide is generic, like Archlinux Wiki. Hence, commands or approach from this guide may hardly affect your particular issue. And the Guide can't address OS and package version specifics. I'd look at Udev automount rules in your OS version, if any.

If I wanted to keep upgrading my system kernel, I'd also ask on Doozan's forum, if any solution exists to allow my device updates. No warranties though. :) Another option is asking NFS developers or on Arclinux main forum, what in your OS version can cause such behavior.
sambul13
 
Posts: 258
Joined: Sat Aug 18, 2012 10:32 pm

Re: NFS on Pogo and Windows

Postby hydro » Wed Nov 07, 2012 6:30 am

sethjvm wrote:whatever is causing the /etc/fstab entries not to mount at boot.

Sounds like the primary problem and may not have to do with NFS at all.
@sethjvm: I assume you did check what is actually mounted after boot using findmnt? Maybe you could post the output and your /etc/fstab.
VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
hydro
 
Posts: 210
Joined: Wed Jun 15, 2011 2:03 pm
Location: Germany

Re: NFS on Pogo and Windows

Postby sethjvm » Wed Nov 07, 2012 8:07 am

WarheadsSE wrote:... and isn't an idiot....


Well...I can probably find a list of people who would disagree.

Seriously though, I appreciated that sambul13 did take the time to post a nice guide and I was hoping he might have some other suggestions to try before I went to the Arch forum. The main reason I am trying to use NFS versus samba is because it is the "preferred" method on www.xbmc.org (I used an AppleTV2) since it allegedly has lower overhead and is faster. I say allegedly because I have not personally compared it with samba. I am probably making this way too complicated when samba would probably work just as well or I can continue to use "mount -a" which bothers me immensely for some reason (probably feelings of inadequacy with Linux and my somewhat document problems with getting wifi working on this thing.)

hydro, I do have it working with "mount -a" in /etc/rc.local so my current outputs are probably not relevant because of that.

here is my /etc/fstab (please note that I was using the "0 0" in the bind line before but I read some on some forum I found through a Google search to try the fstab without it.

Code: Select all
<file system> <dir>   <type>  <options>       <dump>  <pass>
tmpfs           /tmp    tmpfs   nodev,nosuid    0       0
/swapfile.img none swap sw 0 0
/media/share_drive /srv/nfs4/share none bind


here is the output of fndmnt:
Code: Select all
TARGET                SOURCE     FSTYPE   OPTIONS
/                     /dev/root  ext3     rw,relatime,errors=continue,user_xattr
ââ/dev                devtmpfs   devtmpfs rw,size=62632k,nr_inodes=15658,mode=75
â ââ/dev/pts          devpts     devpts   rw,nosuid,noexec,relatime,gid=5,mode=6
â ââ/dev/shm          shm        tmpfs    rw,nosuid,nodev,relatime
ââ/proc               proc       proc     rw,nosuid,nodev,noexec,relatime
â ââ/proc/fs/nfsd     nfsd       nfsd     rw,nosuid,nodev,noexec,relatime
ââ/sys                sys        sysfs    rw,nosuid,nodev,noexec,relatime
ââ/run                run        tmpfs    rw,nosuid,nodev,relatime,mode=755
ââ/tmp                tmpfs      tmpfs    rw,nosuid,nodev,relatime
ââ/srv/nfs4/share     /dev/root[/media/share_drive]
                                 ext3     rw,relatime,errors=continue,user_xattr
â ââ/srv/nfs4/share   /dev/sdb1  ext3     rw,noatime,errors=continue,data=writeb
ââ/media/share_drive  /dev/sdb1  ext3     rw,noatime,errors=continue,data=writeb
ââ/media/backup_drive /dev/sdc1  ext3     rw,noatime,errors=continue,user_xattr,
ââ/media/temporary    /dev/sdd1  fuseblk  rw,nosuid,nodev,noatime,user_id=0,grou
ââ/var/lib/nfs/rpc_pipefs
                      rpc_pipefs rpc_pipe rw,relatime


And the daemons line from /etc/rc.conf:
Code: Select all
DAEMONS=(set-oxnas-mac !hwclock syslog-ng network dbus avahi-daemon crond sshd openntpd sabnzbd sickbeard samba minidlna transmissiond rpcbind nfs-common nfs-server)


and the /etc/exports:
Code: Select all
/srv/nfs4 192.168.1.0/24(rw,fsid=0,no_subtree_check)
/srv/nfs4/share 192.168.1.0/24(rw,no_subtree_check,nohide)


I'll see what fndmnt looks like after i comment out the "mount -a" and reboot.
Pogo Plug Pro with ALARM SATA rootfs
success: wireless, samba, sabnzbd, sickbeard, transmission, lamp with Gallery3 and newznab+, rsync server, tor
still trying: avahi, minidlna
up next: asterisk, openvpn, proxy server of some sort
gave up: nfs and lvm
sethjvm
 
Posts: 53
Joined: Wed Oct 19, 2011 7:36 am

Re: NFS on Pogo and Windows

Postby hydro » Wed Nov 07, 2012 10:20 am

If this is your complete /etc/fstab then there is a line missing for /dev/sdb1
Code: Select all
#<file system> <dir>   <type>  <options>       <dump>  <pass>
tmpfs           /tmp    tmpfs   nodev,nosuid    0   0
/swapfile.img none swap sw 0 0
/dev/sdb1    /media/share_drive    ext3    defaults    0    0   # missing line
/media/share_drive /srv/nfs4/share none bind    0    0


but you should use the UUID or LABEL of the ext3 filesystem instead, just like sambul13 wrote in his guide. But why does it work without that line if mount -a is run later? As sambul13 already mentioned you problaby rely on the package udev-automout, which mounts /dev/sdb1, /dev/sdc1 and /dev/sdd1 with useful options depending on the filesystem, but this may happen after /etc/fstab was processed. So this is what currently happens on your device:

1. /etc/fstab is processed and the empty mountpoint /media/share_drive is bind-mounted to /srv/nfs4/share
2. udev-automount mounts /dev/sdb1 on /media/share_drive, which makes data acessible on /media/share_drive but not on /srv/nfs4/share
3. NFS server starts exporting the empty /srv/nfs4/share directory
4. /etc/rc.local runs mount -a and as a result /media/share_drive, which is no longer empty, is mounted one more time on /srv/nfs4/share and hence data appears on the NFS share.

As you see from findmnt /srv/nfs4/share is used as mountpoint twice, so if you don't want to add /dev/sdb1 to /etc/fstab as proposed above, then you can also remove the bind mount from /etc/fstab and add this to /etc/rc.local instead of mount -a to avoid the double mount:
Code: Select all
mount -o bind /media/share_drive /srv/nfs4/share

But if all drives are always attached, I'd remove the udev-automount package and add the drives to /etc/fstab before(!) the bind mount.

Actually I have two drives on my dockstar one of which is shared using /etc/fstab and /etc/exports and the other, which is not always connected at boot time, is mounted and exported using /etc/rc.local:
Code: Select all
/sbin/blkid -L FreeAgent_Go && /usr/local/bin/init_hdd.sh

So if a drive labeled FreeAgent_Go is present the specified script is run, which contains
Code: Select all
mount -v -t ext4 LABEL=FreeAgent_Go /hdd
mount -v --bind /hdd/share /exports/share
exportfs -v -o rw,no_subtree_check,async,no_root_squash,nohide 192.168.1.0/24:/exports/share

If I attach the drive after mount I run that script manually, hence the -v options to see what happens.
Last edited by hydro on Wed Nov 07, 2012 11:30 am, edited 1 time in total.
VDR on DockStar / Pogoplug E02: http://linux.bplaced.net/
hydro
 
Posts: 210
Joined: Wed Jun 15, 2011 2:03 pm
Location: Germany

Re: NFS on Pogo and Windows

Postby sethjvm » Wed Nov 07, 2012 10:30 am

Thanks.

I did have a UUID line in fstab for the /dev/db1 drive but deleted when I started over last night. I always have the drives attached so I will try removing udev-automount to see if that will help clean things up.
Pogo Plug Pro with ALARM SATA rootfs
success: wireless, samba, sabnzbd, sickbeard, transmission, lamp with Gallery3 and newznab+, rsync server, tor
still trying: avahi, minidlna
up next: asterisk, openvpn, proxy server of some sort
gave up: nfs and lvm
sethjvm
 
Posts: 53
Joined: Wed Oct 19, 2011 7:36 am

Re: NFS on Pogo and Windows

Postby sambul13 » Wed Nov 07, 2012 4:02 pm

To complement hydro's very useful and relevant insight for this thread readers on how udev and fstab operate in drive mount process, I add that interaction btw udev and fstab is OS version specific to some degree. It was reported that in latest OS versions Udev integrated into systemd actually attempts to mount drives at system boot. When a drive is found, udev checks if a user entered rule exists in fstab for it, and if found applies that rule. If no rule exists, udev would apply a suitable generic rule from its rules list. Similar approach is used by udev after boot.

However, udev-automount is a 3rd party script that relies on udev but adds specific rules on mounting certain drive types that were missing by default in earlier udev rules, and its not generally needed in current OS releases, since udev default rules were expanded. But for previous OS versions like in the above case, it might be the only option to mount a drive with no fstab entry, unless a user would add its own udev rule. Though the logic of udev & fstab interaction might differ in older OS. So I suggest to add fstab rules for his drives, keeping also in mind udev will apply default file system specific mount options when omitted in fstab. Topics of fstab and udev are complex enough on their own, and corresponding links in this Guide though not exhaustive are given to study them first. :)
sambul13
 
Posts: 258
Joined: Sat Aug 18, 2012 10:32 pm

PreviousNext

Return to Community Guides

Who is online

Users browsing this forum: No registered users and 1 guest