Andy Walsh
2016-Mar-11 12:08 UTC
[Samba] /etc/msg.sock folder questions regarding nvram/wear leveling.
Hi, i try to create a openWRT Samba 4.3 package and stumbled across the fact that samba 4.3 will create those message socks inside the private-dir. That results in creating entries inside /etc/samba/msg.sock. On openWRT /var is a tempFS in ram, so anything there is not a problem regarding nvram and wear leveling. Yet the root uses a jffs2 overlay. So while those message socks have no size, jffs2 still needs to write the dir table, since they survive a reboot. I'm now wondering how frequently those sock entries are created/deleted while running samba? In my tests the msg.sock folder kept growing over time from 3-4 entries to 8/12 ? Maybe its reasonable to allow /etc/msg.sock to also reside inside the /var folder, with some extra "dir-xy" configure option or/and smb.conf? bye Andy
Rowland penny
2016-Mar-11 12:24 UTC
[Samba] /etc/msg.sock folder questions regarding nvram/wear leveling.
On 11/03/16 12:08, Andy Walsh wrote:> Hi, > > i try to create a openWRT Samba 4.3 package and stumbled across the fact > that samba 4.3 will create those message socks inside the private-dir. That > results in creating entries inside /etc/samba/msg.sock. > > On openWRT /var is a tempFS in ram, so anything there is not a problem > regarding nvram and wear leveling. Yet the root uses a jffs2 overlay. So > while those message socks have no size, jffs2 still needs to write the dir > table, since they survive a reboot. > > I'm now wondering how frequently those sock entries are created/deleted > while running samba? In my tests the msg.sock folder kept growing over time > from 3-4 entries to 8/12 ? > > Maybe its reasonable to allow /etc/msg.sock to also reside inside the /var > folder, with some extra "dir-xy" configure option or/and smb.conf? > > bye > Andy > >You can choose a different directory, you don't have to use '/var'. I take it you are compiling Samba yourself, so try running './configure --help' inside the tarballs base directory. Rowland
Andy Walsh
2016-Mar-11 12:44 UTC
[Samba] /etc/msg.sock folder questions regarding nvram/wear leveling.
Rowland penny <rpenny <at> samba.org> writes:> > On 11/03/16 12:08, Andy Walsh wrote: > > Hi, > > > > i try to create a openWRT Samba 4.3 package and stumbled across the fact > > that samba 4.3 will create those message socks inside the private-dir. That > > results in creating entries inside /etc/samba/msg.sock. > > > > On openWRT /var is a tempFS in ram, so anything there is not a problem > > regarding nvram and wear leveling. Yet the root uses a jffs2 overlay. So > > while those message socks have no size, jffs2 still needs to write the dir > > table, since they survive a reboot. > > > > I'm now wondering how frequently those sock entries are created/deleted > > while running samba? In my tests the msg.sock folder kept growing over time > > from 3-4 entries to 8/12 ? > > > > Maybe its reasonable to allow /etc/msg.sock to also reside inside the /var > > folder, with some extra "dir-xy" configure option or/and smb.conf? > > > > bye > > Andy > > > > > > You can choose a different directory, you don't have to use '/var'. I > take it you are compiling Samba yourself, so try running './configure > --help' inside the tarballs base directory. > > Rowland >I'm specifically asking about the msg.sock, not the msg.lock entries. The msg.sock entries are created under the priv-dir, where also all the important pdb/tdb files reside. So i can't move the msg.sock folder to /var, since its coded to use the priv-dir. I assume this is fine under normal circumstances, i just wonder if this is a good location on openWRT and embedded platforms? I assume in contrast to the pdb/tdb files, the msg.sock entries are created/deleted more frequently. So writing a new tdb file once a day/week is reasonable on raw nvram, changing folders/files every few minutes could be problematic. Thats because atm jffs2 on raw nvram can't handle bad blocks on those devices, so if possible anything that could be moved to /var and does not need to survive a reboot should be moved to this location. So the main question would be how frequently are those msg.sock entries created/deleted? Is it once per smbd start or dependent on what other factors? thx Andy