Add raid drive and move samba shares

NethServer Version: your_version
Module: your_module

Hi, Newbie to both nethserver and centos here,
I have setup nethserver on a 2tb drive and all working ok, I have added 2x2tb drives to the machine with raid1, all working and patitioned.
now I would like to move the current “share” from the os drive to the new raid and don’t have a clue where to start, cockpit only allows to create shares not edit location.
any help greatly appreciated.

Hi and welcome to the Nethserver Community!

You have 3 x 2TB HDD? Maybe this or parts of it are a solution for you:
mini-HowTo install NethServer-7 with Software-Raid1 and migrate to Raid5

Edit: With 3 HDDs you could do Raid 5 and get 4TB…

If you mount the Raid1 volume as /var/lib/nethserver/ibay/ all newly created shares will be created on the Raid1 volume.
Each share will be there as /var/lib/nethserver/ibay/[sharename]
Make sure to add an entry in fstab to make the mount permanent.

beware: if you already have shares with data in /var/lib/nethserver/ibay/* make sure to copy move the data first to another location, because after you mount the new volume, the shares on the single disk will not be available anymore. (the location /var/lib/nethserver/ibay/ will point to the new volume and not to the old single disk)

/edit: thnx @Andy_Wismer, changed my wording… :slight_smile:

1 Like


Hi Robb

Better to “move” the data, otherwise the disk space will be limited, but you can’t remove the files / folders anymore… They’re hidden, as the mount point lies above, so are not accessible until umounting /var/lib/nethserver/ibays/… But still use up the space. :frowning:

My 2 cents

1 Like

Thanks Andy,
I dont need to move the data in the share, I’m just wanting to create new shares, but not on the local drive, I’ve got a fresh 2tb raid that’s set up and ready to go in cockpit but don’t know how to tell the shared drives/samba section to create shares on that drive instead of the default local drive if that makes sense ?

Hi Robb,
so if I do that all “new” shares will be created on the raid ?, will the current share on the local drive still be available ?

can that be done post install and data on the drive ?
I have 3 x 2tb drives currently in the server
1 x 2tb install of nethserver, nextcloud, share etc
2 x 2tb fresh raid1
if i create a raid 5 out of the 3 disks wont it kill the os drive etc ?
sorry if this sounds dumb, like I say im just getting into this area.

Theoretically yes, It can be difficult, especially If it is the first time…
It is maybe better to start from scratch with 2 disks in raid 1 and migrate later to raid 5…

Can you please show us your disk-layout with:



cat /proc/mdstat


sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 1.8T 0 part
├─VolGroup-lv_root 253:0 0 1.8T 0 lvm /
└─VolGroup-lv_swap 253:1 0 7.8G 0 lvm [SWAP]
sdb 8:16 0 1.8T 0 disk
└─sdb1 8:17 0 1.8T 0 part
└─md127 9:127 0 1.8T 0 raid1
└─vgroup0-lvol0 253:2 0 1.8T 0 lvm
sdc 8:32 0 1.8T 0 disk
└─sdc1 8:33 0 1.8T 0 part
└─md127 9:127 0 1.8T 0 raid1
└─vgroup0-lvol0 253:2 0 1.8T 0 lvm
sr0 11:0 1 1024M 0 from


cat /proc/mdstat

Personalities : [raid1]
md127 : active raid1 sdb1[0] sdc1[1]
1953381376 blocks super 1.2 [2/2] [UU]
bitmap: 0/15 pages [0KB], 65536KB chunk

unused devices:


OK, as you said… I am not sure atm if I can help you without reinstalling the server…

This is the layout how it should look like with raid 1:

How much data do you have on sda?

I quickly installed a virtual testserver:

Tomorrow I will do some tests…

Thanks, much appreciated :+1:

A while ago I created a video on how to install nethserver with a seperate RAID1 volume for all nethserver data. If you want the RAID1 volume only for samba shares, change the mountpoint for the raid1 volume from /var/lib/nethserver to /var/lib/nethserver/ibay However, I strongly advice to set the mountpoint at /var/lib/nethserver so all your data is on a more reliable raid1 volume.
As said by @fausp, you could opt for a Raid5 and use that volume to install nethserver on. This could be a good idea when all disks have the same size and you want to maximize the amount of available diskspace. Do keep in mind that a Raid5 volume has significant slower write speed than a Raid1 volume.