Adding a share in smb (External Disk)

Hello everyone, I would like to use a disk already mounted on /mnt/2tb and recorded on cockpit. I don’t see any way to manage the share. Suggestions? Thank you.

1 Like

@france

Hi Francesco

Easy:

  1. Make sure the disk is in fstab for automounting when rebooted.
  2. Create the share as you want in Cockpit.
  3. Create a symlink from /var/lib/nethserver/ibay/SHARE to /mnt/2tb/

Finished - Test it from a Workstation in your Network!

Note: Also check that this disk is included in your Backups - it should!

My 2 cents
Andy

2 Likes

Thank you Andy, now I understand! So I create a share, which will clearly have to point with links on the 2TB route! Correct?

Yes!
This will work.

And as it’s a new share, you don’t need to copy over stuff… :slight_smile:

PS: I edited your titel, so it’s more relevant for others searching… :slight_smile:

2 Likes

Andy, however, the disk and a non-exte external proxmox qcow2 virtual disk.

Hi

To the NethServer, it IS an external disk, as it wasn’t there when installing… :slight_smile:

If it’s a real external disk, or a virtual disk, it doesn’t really matter.
In both cases you need to make sure it’s mounted at boot…

If it’s formatted so Linux can read it, even better.

1 Like

Hi Andy, I think I make some mistakes because I can’t mount the folder that is mounted on another disk correctly: wink:

  • UUID=d1e2b91d-c773-4bd2-89bd-cea291089837 /mnt/5gb auto defaults 0 0 (fstab)

/mnt/5gb
[root@golub 5gb]# ls
share

share → /var/lib/nethserver/ibay/share

As you can see on fstab there is the mounting point and from GUI the same.

Schermata 2022-03-16 alle 09.03.41

Buon Giorno Francesco!

Possibilita in englesi?

Possible to see this in english?

I can order food when in Italy, I can speak a bit. But professional IT terms my Italian is very weak…

My 2 cents
Andy

@france

In my above “instruction”, the SHARE was written in capital, so you could use your own.
In Italian companies, I think something like “pubblico” is often used… :slight_smile:

The disk only needs to be mounted once, eg. continue using /mnt/5gb…
That is then symlinked to /var/lib/nethserver/ibay/SHARE so both are essentially the same.

Generally:

ln -s /Path/to/file /Path/to/symlink

Here:

ln -s /var/lib/nethserver/ibay/SHARE /mnt/5gb/SHARE

Note: You must first remove the folder SHARE under /var/lib/nethserver/ibay/, as a symlink is a file, and the target is what replaces the folder. The folder /mnt/5gb/SHARE replaces the symlink file /var/lib/nethserver/ibay/SHARE, or seen the other way around, the file /var/lib/nethserver/ibay/SHARE points to the folder /mnt/5gb/SHARE.

My 2 cents
Andy

Hi Andy, I tried everything again and it works correctly. I wonder why this change is not implemented on the cockpit, which in my opinion I consider important.

@france

Hi Francesco

No idea - but it’s eay enough to implement without fiddling around with e-smith templates…

My 2 cents
Andy

It’s possible to change the mount point of the new volume in cockpit. This way you don’t need a symlink.

grafik

3 Likes

Yes Markuz, but what I don’t understand, maybe I start to age… is that I add your disk that will be mounted on /mnt/xxx where I’m going to create the shared folder, because you inserted a Mount point different from the physical path of the disk?

Your volumes mountpoint actually is /mnt/xxx and you just need to change that mountpoint. There’s no physical path involved.

EDIT:

To clarify:

If you create a shared folder named test, it is located in /var/lib/nethserver/ibay/test

In this case you just need to change the mount point of the volume to /var/lib/nethserver/ibay/test

2 Likes

Ok, I want to try again with another qcow disk. At the moment, thank you as always.

1 Like

Hi Markuz, yes, I tried how you wrote and it works perfectly. So once created and partitioned, the disconnect is simply called the Mount point. I think that in simple scenarios, I get lost in a glass of water … Thank you

2 Likes