Score:0

I can not connect Windows 10 machines to my raid array

tr flag

Running Ubuntu 21.04.

My tech support group told me I needed to get them to reinstall Ubuntu with Samba for file sharing. Getting no support from them now and nothing they have done allows me to access the raid array I use as a file server for my company. I was able to connect all my Windows 10 machines before but now I get permissions errors when attempting to connect.

There are only two users setup in Samba but not sure if they set it up correctly.

Another annoyance is the raid array doesn't auto mount on restart but that is small compared to the connection issue.

Looks like I'm stuck being my own support for this so please excuse my ignorance.

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# /boot/efi was on /dev/sda1 during installation
UUID=6300-C789  /boot/efi       vfat    umask=0022,fmask=0022,dmask=0022      0       1
/boot/efi/grub  /boot/grub  none    defaults,bind   0   0
UUID=b2f6df64-4a60-4fbe-9b56-9478115acf3e   none    swap    sw  0   0

Screenshot of Disks:

enter image description here

# mdadm.conf
#
# !NB! Run update-initramfs -u after updating this file.
# !NB! This will ensure that initramfs has an uptodate copy.
#
# Please refer to mdadm.conf(5) for information about this file.
#

# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers

# automatically tag new arrays as belonging to the local system
HOMEHOST <system>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
ARRAY /dev/md/0  metadata=1.2 UUID=311df3d1:937b48e0:76785e28:9f3ed13c name=server2014:0
   spares=1

# This configuration was auto-generated on Fri, 09 Jul 2021 12:33:56 -0400 by mkconf
Joe Howell avatar
tr flag
Unfortunately this was installed by an IT group we use for computer maintenance.
Joe Howell avatar
tr flag
I'm clicking on the FILES icon and finding it under "other locations" to mount. I use terminal when needed but not sure how to give you the contents of /etc/fstab
ar flag
It looks like you didn't copy the whole of the `/etc/fstab` content. There should be at least one more line starting with UUID.
Joe Howell avatar
tr flag
There are no more lines after the output posted.
Joe Howell avatar
tr flag
No output for blkid /dev/md127
Joe Howell avatar
tr flag
No output for either. Is this a potential problem?
Joe Howell avatar
tr flag
No section starting with [sambashare]
ar flag
Did you find the solution to your problem?
Score:0
ar flag

This is is a "trial answer." Try it, and if it does not work, you may want to revert all the changes I suggest below.

The Problem (I think)

The RAID array is not automounted after the re-install. When you mount it using Files>Other Location the RAID array is mounted with the user permission of joeadmin. That means the array is for the use of the user joeadmin only. That may be one of the reasons it can't be accessed by other users.

Solution

We will mount the RAID array when the system, boots at a new mountpoint that is owned by root and not joeadmin.

Create a new mountpoint

First we create a new folder under /media/. Let's call it sambaraid. Open a terminal and enter:

sudo mkdir /media/sambaraid

If you are not familiar with the sudo command, it will ask you for your password. When you enter the password the cursor will not move. This is normal.

Now let's change permissions so that everyone can read and write to this folder:

sudo chmod -R 777 /media/sambaraid

Modify /etc/fstab

Unmount the RAID array in Files, if it is mounted.

Now that we have created the mountpoint for the RAID array, we have to tell the computer to use it when the computer boots. We do this by adding a line in the file fstab. To edit this file we have to open it as an administrator. Use the command below to open the file in an editor:

sudo -H gedit /etc/fstab

Don't forget the -H option. It is important when you use sudo with a GUI app like gedit.

This is a good time to check for other lines at the bottom of the file. If you find any other lines, please update your question.

Go to the end of the file and these two lines:

# RAID Array for SAMBA
UUID=416d38fa-058d-4f23-bfb3-c4a28b998655 /media/sambaraid/ ext4 defaults 0 0

The first line is a comment and it tells you what the next line is about. Note the string after UUID=. I copied it manually from the screenshot of the disks app you posted in the question. Make sure this is accurate. You may copy and paste it from the disks app.

Save and exit the editor.

Enter the following command to mount the RAID array in its new mountpoint:

sudo mount -a

Make sure there are no errors after this command. Now you should be able to navigate to /media/sambaraid in the Files app and see all the folders in the RAID array.

Next Step

Setup Samba to use the RAID array at the new mountpoint. I suppose you already know how to do this. If not check the contents of the file /etc/samba/smb.conf. It should have a section [sambashare] where the folder in the RAID array you share should be listed. Edit this section to look like this:

[sambashare]
    comment = Samba to share RAID array
    path = /media/sambaraid/some_folder
    read only = no
    browsable = yes

where some_folder is the name of the folder that you want to share in the RAID array.

Restart samba so the the changes take effect with the command:

sudo service smbd restart

Check if uwf is enabled with the command:

sudo ufw status

If ufw is active, there should be a rule that allows samba. If there is no such rule you will need to add it.

References:

https://www.bomski.com/automount-software-raid-array-in-ubuntu/

https://ubuntu.com/tutorials/install-and-configure-samba

Hope this helps

Joe Howell avatar
tr flag
I've been unable to get back to this until just now. Trying your suggestions and will let you know results. Thank you for taking the time to help.
Joe Howell avatar
tr flag
This has corrected the automount issue but has not allowed me to access from windows 10 machines. I get the same permissions error when signing in.
ar flag
@JoeHowell is `ufw` active? Try the command `sudo` ufw status` and report back.
Joe Howell avatar
tr flag
That command returns "Status: inactive"
ar flag
Okay, now we know that ufw is not the problem.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.