Problem with Alpine Linux and Network Shares

Hello Everyone,

TL;DR - My network shares are not showing up in Apline regardless if they are NFS or SMB.

So let me explain what I’m trying to accomplish. I’m putting together some dedicated hardware to run Docker containers. I have had a FreeNAS box for years which I have jails for several media servers including Plex. My library of 4k content is continually growing but I only have a few devices that can direct stream 4K. This is putting more and more load on my FreeNAS hardware for transcoding. It has a low power quad-core Xeon that is more than powerful enough to function as NAS so I really don’t want to buy a whole new platform just to increase transcoding performance. Plus, I’m a little fed up with using plugins and jails in FreeNAS. They take forever to be updated and it seems like I have some problem with at least one of them every time there’s an OS update.

I have an extra Ryzen 5 2600 platform lying around but I would need to upgrade the motherboard and buy at least 32BG of ECC DDR4 memory to use it for FreeNAS so I’m using it as my Apline/Docker platform. I’m using Alpine because it is minimal Linux install which works great for containers and I’m using Portainer to manage them. I didn’t have any issues with the install. I did several practice runs in a VM before I moved over to the hardware. I’ve installed NFS, Samba, and CIFS-utilities. I edited fstab with a line for NFS and one for SMB because I want to test the performance for each of them so I have one or the other commented out. I didn’t have any issues mounting the shares at first. They are the same ones I’ve been using for years on my windows and Fedora machines. But they started to disappear when I started linking volumes to Docker containers. It does it on both NFS and SMB. I don’t know what’s going on and I don’t really know how to troubleshoot it short of blowing everything away and reinstalling Alpine.

Has anyone ran it this issue before? I would appreciate any advise on where to start.

Thanks,

  • Are the shares unable to mount during boot or are they unable to mount period?
  • Do you have anything in dmesg or /var/log/messages or whatever the equivalent is in Alpine. If you run systemd what does journalctl -b tell you?

16gb of ecc is ok, long as you’re not doing dedup

So it looks like NFS is working. I just needed to give it a few minutes to remount the shares after switching from samba. I wanted to use samba because I read in a couple of different places about performance issues while using NFS shares, at least while running Docker in a VM on FreeNAS. It may not be an issue now since it will be running on dedicated hardware and 10Gb uplink.

Alpine doesn’t use systemd. It really is a bare-bones Linux build. The standard image is only about 125MB. The image they have for VM’s is less than 40MB. I did look through /var/log/messages. I didn’t see errors and didn’t get any when running mount -a or on reboot. I had no idea where that log would be, so thanks for that.

I installed an Airsonic container and have it working on the local network at least. Still having trouble getting music to play from the Ultrasonic app on my phone though outside the network though.

I will probably end up wiping it all out and starting over this weekend b/c I’m getting a few errors with the docker commands as well.

Honestly, I’d recommend just using CentOS 8 for your base and just stick with Alpine for your container images. There is not really a performance benefit that is worth this headache.

True if you want to get something up and running. Sticking with Alpine though might have some educational value though. Similar to how doing a stage3 Gentoo install might be very educational but not really the right choice for a serious installation.

@Knight26, last time I had issues with getting SMB shares to work it was resolved by adding a domain= and vers= in fstab. The domain can simply be the local machine name if they are not joined to an AD Domain. Here is an example from an fstab file I used to mount a read-only share.

//10.0.0.1/shareddir /mnt/machine02 cifs username=USERNAME,password=PASSWORD,domain=machine02,vers=2.1,ro,gid=500,uid=0,dir_mode=0755,file_mode=0755 0 0

You can experiment with the version number.

I’ll try adding the version. I already have the username, password, and domain in a .smb file that’s referenced in fstab. I still will probably start over and change my order of operations for the install. I went straight to installing docker as soon as I got Apline up and ssh functioning. This time, I’ll make sure everything is functioning the way I want it before moving on to Docker.

This is the first time I’ve experimented with such a barebones Linux build. I really wanted to try Fedora CoreOS first because it comes with Docker pre-installed but I haven’t even figured out how to install it. You have to create an Ignition file, which I know nothing about, and the instructions for a bare metal install only mentions burning the iso to a disk, nothing about using a USB key. I didn’t even know people still used disks for this stuff anymore.

Alpine at least had some instructions for creating a bootable USB using dd in Linux nothing for creating one with Windows though. I ended up using rufus to create it, and it installed without any errors so I assumed the USB key worked correctly.

Well, I reinstalled Alpine and still couldn’t get samba to function properly. So I stuck with nfs but after getting a few docker containers installed, the system hung up twice in a few hours so I decided to go with a different OS. I’m going with Fedora Server for the moment. It’s way more robust for what I need but I’m familiar with Fedora since I’ve been using Fedora Workstation as a secondary desktop for several years and there seems to be plenty of documentation for the install on the Docker docs site.