Sure, but his issue was that smb2fs can't resolve host names, when the actual problem is probably that the host name he tried is not reachable from that machine at all.
This is just like television, only you can see much further.
With the older smbfs, I've found that you need to have the host with the share listed in the local machine's Internet settings, Hostnames (i.e. the hosts file in Devs:Internet/). Otherwise it often won't connect.
Smb2-handler uses regular gethostbyname() from bsdsocket.library to resolve the host name into an IP address (same as ssh2-handler).
To avoid having to use IP addresses I have on my computers in DEVS:Internet/hosts (/etc/hosts on linux) the host names and corresponding static IP addresses of machines on my local network.
I noted that files dates and times are not preserved, ie the file date and time on destination are the date and time at the moment of copy and not the originals.
No, not yet. The reason is that smb2-handler doesn't support either utime() or utimens() FUSE operations as I have not find a way to implement them using libsmb2.
As a result any call to IDOS->SetDate() will result in ERROR_ACTION_NOT_KNOWN.
...i have the active=1 in the tooltypes but when booting the samba share isn't mounted and can't be mounted either
When you say "booting" do you mean that you have it auto-mounted from DEVS:DOSDrivers? If so it will not work because this is too early and there is no usable network connection yet.
Maybe in a later version I will make it keep trying every x seconds to connect if it fails the first time, but right now it only makes one attempt at connecting to the share and if that fails it gives up.
To get more information on why it is failing you have to capture the serial debug output using sashimi/dumpdebugbuffer or a null-modem cable.
The sensible way of mounting a network share is to do it from Network-Startup after the AddNetInterface line. I do that (with the old SMBFS and SMBMounter) by first having a line with "Wait 5 secs", then "GetNetStatus CHECK INTERFACES,RESOLVER,DEFAULTROUTE". This is not necessarily 100%, but works for me almost always. If WARN, I quit with a warning requester. Otherwise I move on to whatever I want to do with the network (e.g. fetching time via NTP). For the SMB share, I have this section:
CD WBRun SMBMounter CD SYS:
(I could also have used PCD, but since I know my current dir was SYS: at the start, I simplified it.)
SMBMounter is of course configured to automount whichever share I want up at startup.
Edit: BTW, can SMBMounter be used with the new SMB2?
nbache wrote:With the older smbfs, I've found that you need to have the host with the share listed in the local machine's Internet settings, Hostnames (i.e. the hosts file in Devs:Internet/). Otherwise it often won't connect.
Maybe the same is the case with smb2?
We need definitelly IP adress, but there is more options.
Modern wifi routers ( I have Turris Omnia ) can be easily by one click configured like local DNS server.
Moreover, you cannot configure anything, only set own hostname and DHCP network setup on all local computers. All works automatically, you must setup the router DNS only if you want more detailed setting, like exact IP address for my Amiga X1000 192.168.1.111 , limit the pool of adresses, deny of certain MACs, etc...
It is much more easier than setup and maintain classic DNS server like bind. And easier than maintain /../hosts on every computer. With this we can access all computers via hostname, all names are translated via DNS request and it works the same way with libsmb2.
AmigaOS3: Amiga 1200 AmigaOS4: Micro A1-C, AmigaOne XE, Pegasos II, Sam440ep, Sam440ep-flex, AmigaOne X1000 MorphOS: Efika 5200b, Pegasos I, Pegasos II, Powerbook, Mac Mini, iMac, Powermac Quad
Based on this info, I leave ACTIVATE=0 set, but add the following line to s:Network-Startup and the drive icons now appear on WB automatically on boot.
DiskChange <mountname:>
...replacing <mountname:> with the appropriately assigned mountname. I replicate that line for each share I want to mount.
Dave
@nbacheQuote:
nbache wrote:The sensible way of mounting a network share is to do it from Network-Startup after the AddNetInterface line. I do that (with the old SMBFS and SMBMounter) by first having a line with "Wait 5 secs", then "GetNetStatus CHECK INTERFACES,RESOLVER,DEFAULTROUTE". This is not necessarily 100%, but works for me almost always. If WARN, I quit with a warning requester. Otherwise I move on to whatever I want to do with the network (e.g. fetching time via NTP). For the SMB share, I have this section:
CD WBRun SMBMounter CD SYS:
(I could also have used PCD, but since I know my current dir was SYS: at the start, I simplified it.)
SMBMounter is of course configured to automount whichever share I want up at startup.
Edit: BTW, can SMBMounter be used with the new SMB2?
So what I did, was go in to Devs/DosDrivers and duplicated IDF0 and renamed to the name I wanted the share to appear as. I then edited the file to remove what was there and added the info specified in the Readme for smb2fs, with the Startup entry reading: Startup = "smb://<yourusername>:<yourp ... are>/<sharename> VOLUME=<nameofshareonamiga>"
as far as I know, I only have smb2fs installed and running (ie, no old versions)
Dave
@RazielQuote:
Raziel wrote:@all
Can someone give me a quick rundown on what to do before using libsmb2, please?
The readme says to use my share like this: smb://[<domain;][[:]()][:]//
I don't have a smb: set up right now
...and can't I just use my ip address as with smbfs (which I'm using)?
If I understand correctly, FileSysbox should handle the translation from UTF-8 to the local (latin-1) charset. Does this also work on AmigaOS 4?
I have a share with some non latin-1 chars (music files) that only works correctly with smbfs (the old one) on AmigaOS 4. Both ssh2-handler and smb2fs-handler cannot handle the UTF-8 filenames.
Filesnames are correct with the latest filesysbox and smb2-handler on my Amiga with a 68020 and AmigaOS 3.2.1.
Filesysbox.library has the version 54.9 on my Amiga X5000.