DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-10-14 05:50:39

jgaiche
New member
Registered: 2008-10-14
Posts: 2

DNS-323 looses defined shares when rebooted

Hi Everyone,
I'm having an issue with my DNS-323 that I haven't been able to resolve yet.  When I rebooted the drive a few days ago, all of the shares that I had defined were gone and the default "Volume_1" share was back.  I re-defined my shares but anytime the unit is powered down or reset...it comes back with the default "Volume_1" share defined and all of the shares that I defined are missing.  I can see my shares in the /etc/samba/smb.conf file before rebooting and can confirm they are no longer there after a reboot.  I also tried to save the configuration settings with the Tools-->ConfigurationSettings-->Save option.  The CfgBackup file that is generated has a reference to the default "Volume_1" share but none of the shares that I defined are in it.  Any suggestions would sure be appreciated.

Thanks -- Jeff Gaiche

Offline

 

#2 2008-10-14 14:50:56

bq041
Member
From: USA
Registered: 2008-03-19
Posts: 709

Re: DNS-323 looses defined shares when rebooted

/etc is part of the RAM drive, it only exits in memory while the unit is running.  When you reboot, it goes away.  Each boot, the RAM drive is completely recreated from the Flash memory.  To keep your settings, make a copy of the smb.conf file and keep it on the actual hard drive.  Then use a script to copy it during boot up, and to then restart the samba server.


DNS-323     F/W: 1.04b84  H/W: A1  ffp: 0.5  Drives: 2X 400 GB Seagate SATA-300
DNS-323     F/W: 1.05b28  H/W: B1  ffp: 0.5  Drives: 2X 1 TB  WD SATA-300
DSM-G600   F/W: 1.02       H/W: B                Drive:  500 GB WD ATA

Offline

 

#3 2008-10-14 16:21:03

jgaiche
New member
Registered: 2008-10-14
Posts: 2

Re: DNS-323 looses defined shares when rebooted

I didn't realize /etc was on a ram drive and some of the behavior makes alot more sense now.  I could definitely write a script like you suggest to copy over the smb.conf and restart the service when the drive is rebooted and that would get me past the issue I'm having; however, I'd like to understand what has changed such that the web configuration is no longer working properly.  I can define my shares thru the web interface...but...that configuration data is lost at reboot.  I did make a manual change to the smb.conf file...but...it was only a temporary change to enable logging and I was fine with that change being lost.  Other than that, I haven't (intentionally) made any manual samba configuration changes and I'd like to still be able to use the web configuration to create new shares.   So far, I haven't located where the web configuration data for the samba definitions are stored.  Maybe that file has been corrupted or removed somehow.  Any pointers as to where that data is stored ?  Thanks again for your help -- Jeff Gaiche

Offline

 

#4 2010-03-09 05:06:45

JoBadluck
Member
Registered: 2008-06-25
Posts: 8

Re: DNS-323 looses defined shares when rebooted

jgaiche, I have the same exact problem that you have, I loose the share everytime I reboot. Where you able to get your problem fixed ???

Offline

 

#5 2010-03-09 12:40:00

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: DNS-323 looses defined shares when rebooted

Jeff and JoBadluck,

It really is supposed to work as you expect.  The Web UI is supposed to save your settings in a place that is retained through a reboot and then copy them to the ram drive on each reboot.  Mine works OK in that respect.  Bq was pointing out that if you change things in /etc, the changes won't persist.

I don't know the cause of the problem.  Is it possible that you've installed or changed something that could cause this?  I suppose I would try disabling fun_plug or any other add-ins to see if you can get the settings to persist through a reboot.  That would at least narrow it down.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#6 2010-03-09 16:16:26

JoBadluck
Member
Registered: 2008-06-25
Posts: 8

Re: DNS-323 looses defined shares when rebooted

Hi karlrado,

I'm running the "stock" software without any add-on or fun_plug (I have no knowledge at all on linux). I don't exactly knopw since when I have this problem, I'm running the DNS-323 since a while and I just noted this issue. I was on 1.08, and and went back to 1.07 and did few hardware reset (pinhole) but no luck. Where exactly are my settings saved when i configure the device using the web interface ?? Is this possible that this location is somehow screw up or corrupted, thus not saving my changes correctly ???

Offline

 

#7 2010-03-09 20:45:53

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: DNS-323 looses defined shares when rebooted

Since you're not using fun_plug, you should probably look in the D-Link forum (http://forums.dlink.com/), since you have an unmodified unit.

The stock firmware stores your defined shares in a place where you cannot see them via file sharing.   You'd have to install a fun_plug that gives you shell access to see.

I guess if you are really curious, you could try it "safely" as follows:

The wiki: http://dns323.kood.org/howto:fun_plug show you how to put a simple fun_plug to just "test" it:

Code:

#!/bin/sh
#
# Simple fun_plug
#
dmesg > /mnt/HD_a2/dmesg.out

This just writes a file to your shared volume that you can then look at via a share that you have defined.

You could change the last line to

Code:

cp /mnt/HD_a4/.systemfile/.smb.ses /mnt/HD_a2/smb_ses.out
cp /etc/samba/smb.conf /mnt/HD_a2/smb_conf.out
chmod 777 /mnt/HD_a2/smb_ses.out /mnt/HD_a2/smb_conf.out

This ".smb_ses" file contains your defined shares.  The GUI stores your changes here and they get written to HD_a4, which is a small part of your disk that the 323 set up for this sort of purpose.

At boot time, this file is concatenated to a "default" smb conf file and placed in /etc/samba, which is the file that is copied in the second line.  The third line just makes sure you can erase the files from the share when done.

If you run this (follow the wiki instructions), the contents of the two files will be interesting.  If there is no smb_ses.out file, then your defined shares are not getting stored for some reason.  If the smb_ses.out file has your defined shares, but they are not in the smb_conf.out file, then there is a problem with the concatenation.

http://dns323.kood.org/forum/viewtopic.php?id=1714 suggests that the program that does the concatenation is failing, saying that it cannot find HD_a4.  This could be your problem too.  Is it possible to start over, back up your data, and have the 323 reformat your disk?

Any further investigation will probably need telnet access.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#8 2010-03-16 14:02:03

JoBadluck
Member
Registered: 2008-06-25
Posts: 8

Re: DNS-323 looses defined shares when rebooted

hello Karlrado,

I was able to activate the simple fun plug as described in the tuturial, and added the command line you gave me. I ended up having only one output file generated at the boot up. However, I backed up all my data and reformat and the problem is now gone. Maybe a portion on the hard drive that contains the share information was corrupted and fixed by reformating ?

By the way, thank you very much !

Offline

 

#9 2010-03-16 16:36:40

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: DNS-323 looses defined shares when rebooted

Yeah, it is likely that your HD_a4 got clobbered somehow.  I don't know why.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB