Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Can't get NFS server running after restart
New Posts  All Forums:Forum Nav:

Can't get NFS server running after restart - Page 2

post #11 of 18
Quote:
Originally Posted by Niko-Time View Post

Hi Plan9, it is a valid directory and leads to my video collection. Reason why I'm using it is the process that Debian needs to be setup on my NAS - first need to install fun_plug then it - which messes up the directories somewhat so by specifying /mnt/HD/HD_a2/Nfs/nfs I can make sure that it is the correct place. Anyway, here is what I get after putting in your details:
I see. So you're forced into installing the whole of Debian into /mnt ?

Do you have read/write permissions to / because you could always set up a bind mount (which acts a little like a directory symlink - if you weren't already aware) to create more user friendly NFS mount points. However this is digressing from your issue.

Is anything showing up in your logs and/or dmesg on the NFS server?
Also, on the client machine, are you mounting as root (I'm fairly certain you are because otherwise you should have gotten an error like "only root can mount")

edit: since this is a non-standard set up I should ask, is the NAS booting into Debian (ie Debian has full hardware control) or is Debian running on top of the NAS's OS via some kind of virtualisation or compatibility layer?
post #12 of 18
Thread Starter 
Quote:
Originally Posted by Plan9 View Post

I see. So you're forced into installing the whole of Debian into /mnt ?

Do you have read/write permissions to / because you could always set up a bind mount (which acts a little like a directory symlink - if you weren't already aware) to create more user friendly NFS mount points. However this is digressing from your issue.

Is anything showing up in your logs and/or dmesg on the NFS server?
Also, on the client machine, are you mounting as root (I'm fairly certain you are because otherwise you should have gotten an error like "only root can mount")

edit: since this is a non-standard set up I should ask, is the NAS booting into Debian (ie Debian has full hardware control) or is Debian running on top of the NAS's OS via some kind of virtualisation or compatibility layer?
`/mnt/HD/HD_a2/squeeze' is part of the same file system loop as `/'. My video files were already configured under my HD_a2/Nfs/nfs however. I have read/write permissions and I haven't heard of bind mounts (although symlinks are fun).

How do I find where the logs/dmesg are on the NFS server? Afraid I'm very new to linux and am only slowly getting there. Client machine is definitely mounting as root and, as I say, works fine once I run service nfs-kernel-server restart on the NAS. I.E the two functional processes are either for me me to: Boot NAS from power off. run service nfs-kernel-server restart. Boot client machine which automatically runs:
Code:
#!/bin/sh
sleep 30; \
mount -t nfs 192.168.1.15:/mnt/HD/HD_a2/Nfs/nfs /storage/nsa310 -o nolock; \
)&
in my autostart.sh script.

OR

Boot NAS from power off. Turn on client machine. Run service nfs-kernel-server restart on NAS. Run 'mount 192.168.1.15:/mnt/HD/HD_a2/Nfs/nfs/ /storage/nsa310' logged in as root on client machine.


On your edit, I can't be certain. I can still access the dlink webpage and when I log into root I am in the Squeeze folder from /
    
CPUMotherboardGraphicsRAM
FX8320 Asus M5A78L-M/USB3 XFX AMD Radeon HD 7950 Graphics Card 3GB Corsair CMX8GX3M2A1333C9 XMS3 16GB (4x4GB) 
Hard DriveHard DriveCoolingOS
Samsung F3 1TB Hard Drive Crucial CT128M4SSD2 128GB SSD Coolermaster Hyper 212 EVO Windows 7 Professional  
MonitorMonitorPowerCase
Samsung SyncMaster BX2431 1080p PCBank PB2700 1440p IPS Be Quiet! Dark Power Pro 550W PSU  Xigmatek Giggas 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
FX8320 Asus M5A78L-M/USB3 XFX AMD Radeon HD 7950 Graphics Card 3GB Corsair CMX8GX3M2A1333C9 XMS3 16GB (4x4GB) 
Hard DriveHard DriveCoolingOS
Samsung F3 1TB Hard Drive Crucial CT128M4SSD2 128GB SSD Coolermaster Hyper 212 EVO Windows 7 Professional  
MonitorMonitorPowerCase
Samsung SyncMaster BX2431 1080p PCBank PB2700 1440p IPS Be Quiet! Dark Power Pro 550W PSU  Xigmatek Giggas 
  hide details  
Reply
post #13 of 18
Quote:
Originally Posted by Niko-Time View Post

`/mnt/HD/HD_a2/squeeze' is part of the same file system loop as `/'. My video files were already configured under my HD_a2/Nfs/nfs however. I have read/write permissions and I haven't heard of bind mounts (although symlinks are fun).
Cool, I'll talk you through bind mounts laters once we get this working then smile.gif
Quote:
Originally Posted by Niko-Time View Post

How do I find where the logs/dmesg are on the NFS server? Afraid I'm very new to linux and am only slowly getting there.
Oh wow. you hid it well. smile.gif

the logs directory is /var/log/ but I'd suggest looking specifically at /var/log/mesages as that should have everything in there (probably too much detail, but it's a good place to start).

dmesg can be accessed by simply typing dmesg. You may want to trim the output down to the last 100 lines though:
Code:
dmesg | tail -n100

In fact if you want to do the same with the logs then do this:
Code:
tail -n100 /var/log/messages

A quick crash course on using the command line here:
The reason those two commands differ is because dmesg is a command and /var/log/messages is text file. dmesg's output is then "piped" to tail. You could do a similar thing with /var/log/messages if you wanted:
Code:
cat /var/log/messages | tail -n100
where cat outputs the text file and then you're piping it to tail. However since tail already supports paths to text files as an input parameter, I just shortened the command.

I hope that makes sense smile.gif

Quote:
Originally Posted by Niko-Time View Post

Client machine is definitely mounting as root and, as I say, works fine once I run service nfs-kernel-server restart on the NAS. I.E the two functional processes are either for me me to: Boot NAS from power off. run service nfs-kernel-server restart. Boot client machine which automatically runs:
Code:
#!/bin/sh
sleep 30; \
mount -t nfs 192.168.1.15:/mnt/HD/HD_a2/Nfs/nfs /storage/nsa310 -o nolock; \
)&
in my autostart.sh script.

OR

Boot NAS from power off. Turn on client machine. Run service nfs-kernel-server restart on NAS. Run 'mount 192.168.1.15:/mnt/HD/HD_a2/Nfs/nfs/ /storage/nsa310' logged in as root on client machine.


On your edit, I can't be certain. I can still access the dlink webpage and when I log into root I am in the Squeeze folder from /

Ahh, since NFS does work some of the time, I was barking up the wrong tree with my previous train of thought.

Sorry to ask you to repeat yourself, but can you just clarify which of the following works, because you were talking about powering things off and on at a few places:
Code:
condition                   |  works?
----------------------------+---------
NAS powered on, then client |  Y/N?
client powered on, then NAS |  Y/N?

Also, this autostart script is a little concerning. If you want NFS to be mounted at boot time then you need to put it in your clients /etc/fstab
Code:
/dev/sda1            swap                 swap       defaults              0 0 
/dev/sda2            /                    ext3       acl,user_xattr        1 1 
proc                 /proc                proc       defaults              0 0 
sysfs                /sys                 sysfs      noauto                0 0 
debugfs              /sys/kernel/debug    debugfs    noauto                0 0 
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0 
# ^ content like that should already be in your fstab.
# it won't match exactly so don't worry if bits are missing from yours
# nor if you have stuff that isn't in this.

192.168.1.15:/mnt/HD/HD_a2/Nfs/nfs         /storage/nsa310     nfs     rw             0 0
# ^ you need to append this line to the end of your /etc/fstab

So I'd disable your autostart script on your client, and put the line in detailed above (and make sure it's only the last line, I just left the other bits there to give you an idea of what you should see when you edit your fstab). Then give your client a reboot or run:
Code:
mount -a
(which will automount anything sat in your /etc/fstab that isn't already mounted.

Also, and I know this is stating the obvious, but it should be noted that you can only mount NFS shares if the NFS server is already online. You cannot set up an NFS mount on your client and have it work if your NAS is turned off. I know you already know this and I know your NAS is likely to be on 24/7, but I just want to make sure everything is covered smile.gif
Edited by Plan9 - 9/13/13 at 5:48am
post #14 of 18
Thread Starter 
Wow, what a helpful post and thanks for the quick crash course! My linux experience has been limited to trying to make my HTPC do what I want it to do, and I'm picking up bits as I go.

For a brief overview of my setup, my NAS, a Dlink DNS-320L running some kind of Debian Squeeze, is (ideally) going to be on 24/7 with my client pc, a Zbox which is running OpenElec (based on XBMC) as an operating system, only on when I'd like to watch something. On your later point about the autostart script, OpenElec is a pretty closed system so there is not an fstab available for me to edit. In their guide they recommend mounting using such a script and it worked completely fine using my old NAS which I replaced with this one (hence the dodgy looking Nfs/nfs file structure - I wanted to preserve it as much as I could to make the transition seamless...)

To clarify what actually works, simply booting up the NAS and then the client does not work unless, before I boot up the client, I reboot nfs-kernel-server - then everything is fine and dandy. As you pointed out, booting up the client and then the NAS doesn't work (its a bit tricky to mount something which has no power smile.gif )

Hope that makes sense, anyone onto the log files.

Quote:
Originally Posted by Plan9 View Post


the logs directory is /var/log/ but I'd suggest looking specifically at /var/log/mesages as that should have everything in there (probably too much detail, but it's a good place to start).

dmesg can be accessed by simply typing dmesg. You may want to trim the output down to the last 100 lines though:
Code:
dmesg | tail -n100

From a fresh bootup this is the output of dmesg (logged in as root):
Code:
root@dlink-239E0E:~# dmesg | tail -n100
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
cpufreq: Setting CPU Frequency to 1000000 KHz
cpufreq: Setting PowerSaveState to off
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
TCP cubic registered
NET: Registered protocol family 17
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
rtc mv_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
RAMDISK: gzip image found at block 0
usb 1-1: new high speed USB device using ehci_marvell and address 2
VFS: Mounted root (ext2 filesystem) on device 1:0.
Freeing init memory: 136K
usb 1-1: configuration #1 chosen from 1 choice
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
scsi 2:0:0:0: Direct-Access     ST2000DM 001-1E6164       CC45 PQ: 0 ANSI: 5
sd 2:0:0:0: [sdc] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
sd 2:0:0:0: [sdc] Write Protect is off
sd 2:0:0:0: [sdc] Mode Sense: 23 00 00 00
sd 2:0:0:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sdc] Assuming drive cache: write through
 sdc: sdc1
sd 2:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete
sd 2:0:0:0: [sdc] Assuming drive cache: write through
sd 2:0:0:0: [sdc] Attached SCSI disk
GbE port 0: TxEnable WA - Enabled, deep=1, tx_en_bk=1

usbcore: registered new interface driver usblp
egiga0: mac address changed
egiga0: link up, full duplex, speed 100 Mbps
egiga0: started
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
sit0: Disabled Privacy Extensions
ip6tnl0: Disabled Privacy Extensions
IPv4 over IPv4 tunneling driver
tunl0: Disabled Privacy Extensions
md: md0 stopped.
md: bind<sda1>
md: bind<sdb1>
raid1: raid set md0 active with 2 out of 2 mirrors
md0: detected capacity change from 0 to 536805376
 md0: unknown partition table
Adding 524216k swap on /dev/md0.  Priority:-1 extents:1 across:524216k
EXT4-fs (sda4): barriers enabled
kjournald2 starting: pid 1756, dev sda4:8, commit interval 5 seconds
EXT4-fs (sda4): internal journal on sda4:8
EXT4-fs (sda4): delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs (sda4): mounted filesystem with ordered data mode
EXT4-fs (sdb4): barriers enabled
kjournald2 starting: pid 1762, dev sdb4:8, commit interval 5 seconds
EXT4-fs (sdb4): internal journal on sdb4:8
EXT4-fs (sdb4): delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs (sdb4): mounted filesystem with ordered data mode
md: md1 stopped.
md: bind<sdb2>
md: bind<sda2>
raid1: raid set md1 active with 2 out of 2 mirrors
md1: detected capacity change from 0 to 2997906354176
 md1: unknown partition table
EXT4-fs (md1): barriers disabled
kjournald2 starting: pid 1779, dev md1:8, commit interval 30 seconds
EXT4-fs (md1): internal journal on md1:8
EXT4-fs (md1): delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs (md1): mounted filesystem with writeback data mode
svc: failed to register lockdv1 RPC service (errno 97).
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: unable to find recovery directory /var/lib/nfs/v4recovery
NFSD: starting 90-second grace period
EXT4-fs (sdc1): barriers enabled
kjournald2 starting: pid 1972, dev sdc1:8, commit interval 5 seconds
EXT4-fs (sdc1): internal journal on sdc1:8
EXT4-fs (sdc1): delayed allocation enabled
EXT4-fs: file extents enabled
EXT4-fs: mballoc enabled
EXT4-fs (sdc1): mounted filesystem with ordered data mode
nfsd: last server has exited, flushing export cache
svc: failed to register lockdv1 RPC service (errno 97).
NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
NFSD: unable to find recovery directory /var/lib/nfs/v4recovery
NFSD: starting 90-second grace period

Quote:
Originally Posted by Plan9 View Post

In fact if you want to do the same with the logs then do this:
Code:
tail -n100 /var/log/messages

The output of tail is:
Code:
root@dlink-239E0E:~# tail -n100 /var/log/messages
Sep 13 10:34:01 dlink-239E0E kernel: RPC: Registered udp transport module.
Sep 13 10:34:01 dlink-239E0E kernel: RPC: Registered tcp transport module.
Sep 13 10:34:01 dlink-239E0E kernel: rtc mv_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
Sep 13 10:34:01 dlink-239E0E kernel: md: Waiting for all devices to be available before autodetect
Sep 13 10:34:01 dlink-239E0E kernel: md: If you don't use raid, use raid=noautodetect
Sep 13 10:34:01 dlink-239E0E kernel: md: Autodetecting RAID arrays.
Sep 13 10:34:01 dlink-239E0E kernel: md: Scanned 0 and added 0 devices.
Sep 13 10:34:01 dlink-239E0E kernel: md: autorun ...
Sep 13 10:34:01 dlink-239E0E kernel: md: ... autorun DONE.
Sep 13 10:34:01 dlink-239E0E kernel: RAMDISK: gzip image found at block 0
Sep 13 10:34:01 dlink-239E0E kernel: VFS: Mounted root (ext2 filesystem) on device 1:0.
Sep 13 10:34:01 dlink-239E0E kernel: Freeing init memory: 136K
Sep 13 10:34:01 dlink-239E0E kernel: GbE port 0: TxEnable WA - Enabled, deep=1, tx_en_bk=1
Sep 13 10:34:01 dlink-239E0E kernel:
Sep 13 10:34:01 dlink-239E0E kernel: usbcore: registered new interface driver usblp
Sep 13 10:34:01 dlink-239E0E kernel: egiga0: mac address changed
Sep 13 10:34:01 dlink-239E0E kernel: egiga0: link up, full duplex, speed 100 Mbps
Sep 13 10:34:01 dlink-239E0E kernel: egiga0: started
Sep 13 10:34:01 dlink-239E0E kernel: NET: Registered protocol family 10
Sep 13 10:34:01 dlink-239E0E kernel: lo: Disabled Privacy Extensions
Sep 13 10:34:01 dlink-239E0E kernel: IPv6 over IPv4 tunneling driver
Sep 13 10:34:01 dlink-239E0E kernel: sit0: Disabled Privacy Extensions
Sep 13 10:34:01 dlink-239E0E kernel: ip6tnl0: Disabled Privacy Extensions
Sep 13 10:34:01 dlink-239E0E kernel: IPv4 over IPv4 tunneling driver
Sep 13 10:34:01 dlink-239E0E kernel: tunl0: Disabled Privacy Extensions
Sep 13 10:34:01 dlink-239E0E kernel: md: md0 stopped.
Sep 13 10:34:01 dlink-239E0E kernel: md: bind<sda1>
Sep 13 10:34:01 dlink-239E0E kernel: md: bind<sdb1>
Sep 13 10:34:01 dlink-239E0E kernel: raid1: raid set md0 active with 2 out of 2 mirrors
Sep 13 10:34:01 dlink-239E0E kernel: md0: detected capacity change from 0 to 536805376
Sep 13 10:34:01 dlink-239E0E kernel: md0: unknown partition table
Sep 13 10:34:01 dlink-239E0E kernel: Adding 524216k swap on /dev/md0.  Priority:-1 extents:1 across:524216k
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs (sda4): barriers enabled
Sep 13 10:34:01 dlink-239E0E kernel: kjournald2 starting: pid 1734, dev sda4:8, commit interval 5 seconds
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs (sda4): internal journal on sda4:8
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs (sda4): delayed allocation enabled
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs: file extents enabled
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs: mballoc enabled
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs (sda4): mounted filesystem with ordered data mode
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs (sdb4): barriers enabled
Sep 13 10:34:01 dlink-239E0E kernel: kjournald2 starting: pid 1740, dev sdb4:8, commit interval 5 seconds
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs (sdb4): internal journal on sdb4:8
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs (sdb4): delayed allocation enabled
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs: file extents enabled
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs: mballoc enabled
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs (sdb4): mounted filesystem with ordered data mode
Sep 13 10:34:01 dlink-239E0E kernel: md: md1 stopped.
Sep 13 10:34:01 dlink-239E0E kernel: md: bind<sdb2>
Sep 13 10:34:01 dlink-239E0E kernel: md: bind<sda2>
Sep 13 10:34:01 dlink-239E0E kernel: raid1: raid set md1 active with 2 out of 2 mirrors
Sep 13 10:34:01 dlink-239E0E kernel: md1: detected capacity change from 0 to 2997906354176
Sep 13 10:34:01 dlink-239E0E kernel: md1: unknown partition table
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs (md1): barriers disabled
Sep 13 10:34:01 dlink-239E0E kernel: kjournald2 starting: pid 1757, dev md1:8, commit interval 30 seconds
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs (md1): internal journal on md1:8
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs (md1): delayed allocation enabled
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs: file extents enabled
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs: mballoc enabled
Sep 13 10:34:01 dlink-239E0E kernel: EXT4-fs (md1): mounted filesystem with writeback data mode
Sep 13 10:34:01 dlink-239E0E kernel: svc: failed to register lockdv1 RPC service (errno 97).
Sep 13 10:34:01 dlink-239E0E kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Sep 13 10:34:01 dlink-239E0E kernel: NFSD: unable to find recovery directory /var/lib/nfs/v4recovery
Sep 13 10:34:01 dlink-239E0E kernel: NFSD: starting 90-second grace period
Sep 13 10:34:01 dlink-239E0E kernel: nfsd: last server has exited, flushing export cache
Sep 13 10:34:01 dlink-239E0E kernel: svc: failed to register lockdv1 RPC service (errno 97).
Sep 13 10:34:01 dlink-239E0E kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Sep 13 10:34:01 dlink-239E0E kernel: NFSD: unable to find recovery directory /var/lib/nfs/v4recovery
Sep 13 10:34:01 dlink-239E0E kernel: NFSD: starting 90-second grace period
Sep 13 10:34:01 dlink-239E0E kernel: nfsd: last server has exited, flushing export cache
Sep 13 10:34:01 dlink-239E0E kernel: svc: failed to register lockdv1 RPC service (errno 97).
Sep 13 10:34:01 dlink-239E0E kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Sep 13 10:34:01 dlink-239E0E kernel: NFSD: unable to find recovery directory /var/lib/nfs/v4recovery
Sep 13 10:34:01 dlink-239E0E kernel: NFSD: starting 90-second grace period
Sep 13 10:34:01 dlink-239E0E kernel: nfsd: last server has exited, flushing export cache
Sep 13 10:34:01 dlink-239E0E kernel: svc: failed to register lockdv1 RPC service (errno 97).
Sep 13 10:34:01 dlink-239E0E kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Sep 13 10:34:01 dlink-239E0E kernel: NFSD: unable to find recovery directory /var/lib/nfs/v4recovery
Sep 13 10:34:01 dlink-239E0E kernel: NFSD: starting 90-second grace period
Sep 13 10:34:06 dlink-239E0E rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="12636" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
Sep 13 11:03:27 dlink-239E0E portmap: Removing stale lockfile for pid 22634
Sep 13 11:11:47 dlink-239E0E kernel: nfsd: last server has exited, flushing export cache
Sep 13 11:11:48 dlink-239E0E kernel: svc: failed to register lockdv1 RPC service (errno 97).
Sep 13 11:11:48 dlink-239E0E kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Sep 13 11:11:48 dlink-239E0E kernel: NFSD: starting 90-second grace period
Sep 13 11:12:39 dlink-239E0E login_mgr.cgi: admin logged in.
Sep 13 11:12:46 dlink-239E0E system_mgr.cgi: System has been restarted.
Sep 13 11:12:48 dlink-239E0E kernel: nfsd: last server has exited, flushing export cache
Sep 13 11:12:49 dlink-239E0E kernel: md: md0 stopped.
Sep 13 11:12:49 dlink-239E0E kernel: md: unbind<sdb1>
Sep 13 11:12:49 dlink-239E0E kernel: md: export_rdev(sdb1)
Sep 13 11:12:49 dlink-239E0E kernel: md: unbind<sda1>
Sep 13 11:12:49 dlink-239E0E kernel: md: export_rdev(sda1)
Sep 13 11:12:50 dlink-239E0E kernel: EXT4-fs: mballoc: 1 blocks 1 reqs (0 success)
Sep 13 11:12:50 dlink-239E0E kernel: EXT4-fs: mballoc: 1 extents scanned, 0 goal hits, 1 2^N hits, 0 breaks, 0 lost
Sep 13 11:12:50 dlink-239E0E kernel: EXT4-fs: mballoc: 2 generated and it took 0
Sep 13 11:12:50 dlink-239E0E kernel: EXT4-fs: mballoc: 128 preallocated, 0 discarded
Sep 13 11:12:50 dlink-239E0E kernel: EXT4-fs: mballoc: 1 blocks 1 reqs (0 success)
Sep 13 11:12:50 dlink-239E0E kernel: EXT4-fs: mballoc: 1 extents scanned, 0 goal hits, 1 2^N hits, 0 breaks, 0 lost
Sep 13 11:12:50 dlink-239E0E kernel: EXT4-fs: mballoc: 1 generated and it took 0
Sep 13 11:12:50 dlink-239E0E kernel: EXT4-fs: mballoc: 128 preallocated, 0 discarded


I hope my explanation of my situation made sense and that something in those blocks of log is helpful to a trained eye!
    
CPUMotherboardGraphicsRAM
FX8320 Asus M5A78L-M/USB3 XFX AMD Radeon HD 7950 Graphics Card 3GB Corsair CMX8GX3M2A1333C9 XMS3 16GB (4x4GB) 
Hard DriveHard DriveCoolingOS
Samsung F3 1TB Hard Drive Crucial CT128M4SSD2 128GB SSD Coolermaster Hyper 212 EVO Windows 7 Professional  
MonitorMonitorPowerCase
Samsung SyncMaster BX2431 1080p PCBank PB2700 1440p IPS Be Quiet! Dark Power Pro 550W PSU  Xigmatek Giggas 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
FX8320 Asus M5A78L-M/USB3 XFX AMD Radeon HD 7950 Graphics Card 3GB Corsair CMX8GX3M2A1333C9 XMS3 16GB (4x4GB) 
Hard DriveHard DriveCoolingOS
Samsung F3 1TB Hard Drive Crucial CT128M4SSD2 128GB SSD Coolermaster Hyper 212 EVO Windows 7 Professional  
MonitorMonitorPowerCase
Samsung SyncMaster BX2431 1080p PCBank PB2700 1440p IPS Be Quiet! Dark Power Pro 550W PSU  Xigmatek Giggas 
  hide details  
Reply
post #15 of 18
Yeah, I think I can see the problem. NFSv4 is depending on a file system hierarchy that doesn't exist when you first boot up (presumably because Debian is installed in a non-standard location). I don't have much experience with NFSv4 though, I mainly only run NFSv3. However I think you could just get away with running NFSv3 yourself since the benefits you gain from the latest releases wouldn't be much use to you (from what I recall it's mainly just ACLs and consolidation of daemons and ports to aid in tunnelling shares).

What's the output of the following:
Code:
rpcinfo -p

As for OpenELEC, I really don't agree with their autostart script advice. But there's a few workarounds:
  • stick your storage device in your PC (eg I run OpenELEC from an SD card) and mount the file system from there so you have RW access to /etc to make the edit required
  • configure NFS in XBMC. It does support NFS, but I think you may have to manually define it in one of XBMC config files
  • give up on NFS entirely and use SMB instead. NFS does perform marginally better than SMB, but I've never had an issue with performance when streaming HD movies over SMB. Plus setting up SMB shares in XBMC is real easy. The additional benefit is any Windows PCs you have will also be able to mount the SMB shares (as it's just a standard Windows networking protocol - so you just use UNC paths - \\192.168.1.15\share -name like you would if you were connecting to a Windows server / desktop. Doing this will mean that you'd need to install Samba on your NAS, but that should be a pretty simple process. It also means you'd need to set up some new users on your NAS.

The choice is yours smile.gif
post #16 of 18
Thread Starter 
Quote:
Originally Posted by Plan9 View Post

Yeah, I think I can see the problem. NFSv4 is depending on a file system hierarchy that doesn't exist when you first boot up (presumably because Debian is installed in a non-standard location). I don't have much experience with NFSv4 though, I mainly only run NFSv3. However I think you could just get away with running NFSv3 yourself since the benefits you gain from the latest releases wouldn't be much use to you (from what I recall it's mainly just ACLs and consolidation of daemons and ports to aid in tunnelling shares).

What's the output of the following:
Code:
rpcinfo -p

As for OpenELEC, I really don't agree with their autostart script advice. But there's a few workarounds:
  • stick your storage device in your PC (eg I run OpenELEC from an SD card) and mount the file system from there so you have RW access to /etc to make the edit required
  • configure NFS in XBMC. It does support NFS, but I think you may have to manually define it in one of XBMC config files
  • give up on NFS entirely and use SMB instead. NFS does perform marginally better than SMB, but I've never had an issue with performance when streaming HD movies over SMB. Plus setting up SMB shares in XBMC is real easy. The additional benefit is any Windows PCs you have will also be able to mount the SMB shares (as it's just a standard Windows networking protocol - so you just use UNC paths - \\192.168.1.15\share -name like you would if you were connecting to a Windows server / desktop. Doing this will mean that you'd need to install Samba on your NAS, but that should be a pretty simple process. It also means you'd need to set up some new users on your NAS.

The choice is yours smile.gif

Thanks! Would be nice to run NFSv3 if it means that NFS will work. Had problems with CIFS on my old NAS so it brings back bad memories....Options wise, the first is not possible as I share the media with other computers / phones and they can be accessed online and I have 2 3TB drives in Raid 1 which won't fit in my Zbox smile.gif. For the second, actually OpenElec has a new settings menu where you can add network mounts. Reason why I've avoided it so far is, a) NFS worked prior to the new NAS with the autostart script and b) I couldn't find a guide to set it up (shamefully, it looks so simple).

How easy would it be to set up NFSv3? The output you requested is here:
Code:
root@dlink-239E0E:~# rpcinfo -p
   program vers proto   port
    100000    2   tcp    111  portmapper
    100024    1   udp  40046  status
    100024    1   tcp  55552  status
    100021    1   udp  44184  nlockmgr
    100021    3   udp  44184  nlockmgr
    100021    4   udp  44184  nlockmgr
    100021    1   tcp  33518  nlockmgr
    100021    3   tcp  33518  nlockmgr
    100021    4   tcp  33518  nlockmgr
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100005    1   udp  60677  mountd
    100005    1   tcp  47795  mountd
    100005    2   udp  60677  mountd
    100005    2   tcp  47795  mountd
    100005    3   udp  60677  mountd
    100005    3   tcp  47795  mountd

Will try and get CIFS working now however. Samba is already installed so we'll see what I can manage and whether it works on boot.

EDIT: Yeah, failed at CIFS...
Edited by Niko-Time - 9/13/13 at 7:01am
    
CPUMotherboardGraphicsRAM
FX8320 Asus M5A78L-M/USB3 XFX AMD Radeon HD 7950 Graphics Card 3GB Corsair CMX8GX3M2A1333C9 XMS3 16GB (4x4GB) 
Hard DriveHard DriveCoolingOS
Samsung F3 1TB Hard Drive Crucial CT128M4SSD2 128GB SSD Coolermaster Hyper 212 EVO Windows 7 Professional  
MonitorMonitorPowerCase
Samsung SyncMaster BX2431 1080p PCBank PB2700 1440p IPS Be Quiet! Dark Power Pro 550W PSU  Xigmatek Giggas 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
FX8320 Asus M5A78L-M/USB3 XFX AMD Radeon HD 7950 Graphics Card 3GB Corsair CMX8GX3M2A1333C9 XMS3 16GB (4x4GB) 
Hard DriveHard DriveCoolingOS
Samsung F3 1TB Hard Drive Crucial CT128M4SSD2 128GB SSD Coolermaster Hyper 212 EVO Windows 7 Professional  
MonitorMonitorPowerCase
Samsung SyncMaster BX2431 1080p PCBank PB2700 1440p IPS Be Quiet! Dark Power Pro 550W PSU  Xigmatek Giggas 
  hide details  
Reply
post #17 of 18
I trust you've been through your smb.conf before trying to connect via SMB?

Looking at your output, NFS is already running.

I'll have to come back to this thread later if you don't mind. Got a few jobs to get back to smile.gif
post #18 of 18
Thread Starter 
Quote:
Originally Posted by Plan9 View Post

I trust you've been through your smb.conf before trying to connect via SMB?

Looking at your output, NFS is already running.

I'll have to come back to this thread later if you don't mind. Got a few jobs to get back to smile.gif

smb.conf! Will have a hunt in here for now. Thanks loads for your help so far, I'll edit this post if I can work out anything.

EDIT: Or, indeed, if I can't work out anything. The setup all seems very conveluted which makes adding new files often appearing in the wrong places. I'm too much of a beginner to work out a proper way of doing it, and would get rid of Squeeze altogether but I need it for some applications which are running. I don't suppose there is simply a way to run service nfs-kernel-server restart after boot and just be thankful it works? I tried to make a cron job using @reboot but failed. To be fair, as I don't aim to turn my NAS off at any point it isn't vital, just if there is a powercut/whatever and I'm not in I'll get in trouble with the girlfriend that she can't watch any TV..

EDIT 2: This Debian install is too unstable, I think I'm going to uninstall it and try and get the software which I used it for to work in the fun_plug. Thanks again for the help both of you, sorry I was a pain.
Edited by Niko-Time - 9/13/13 at 10:03am
    
CPUMotherboardGraphicsRAM
FX8320 Asus M5A78L-M/USB3 XFX AMD Radeon HD 7950 Graphics Card 3GB Corsair CMX8GX3M2A1333C9 XMS3 16GB (4x4GB) 
Hard DriveHard DriveCoolingOS
Samsung F3 1TB Hard Drive Crucial CT128M4SSD2 128GB SSD Coolermaster Hyper 212 EVO Windows 7 Professional  
MonitorMonitorPowerCase
Samsung SyncMaster BX2431 1080p PCBank PB2700 1440p IPS Be Quiet! Dark Power Pro 550W PSU  Xigmatek Giggas 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
FX8320 Asus M5A78L-M/USB3 XFX AMD Radeon HD 7950 Graphics Card 3GB Corsair CMX8GX3M2A1333C9 XMS3 16GB (4x4GB) 
Hard DriveHard DriveCoolingOS
Samsung F3 1TB Hard Drive Crucial CT128M4SSD2 128GB SSD Coolermaster Hyper 212 EVO Windows 7 Professional  
MonitorMonitorPowerCase
Samsung SyncMaster BX2431 1080p PCBank PB2700 1440p IPS Be Quiet! Dark Power Pro 550W PSU  Xigmatek Giggas 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › Can't get NFS server running after restart