How to add space to the samba shares?

How to add space to the samba shares?

I have a nethserver version 6.8, with a single 60GB SSD disk.
Now I need more space for the samba shares.

So I followed the how to How to add a disk in Nethserver with LVM but I can not get the new space to be usable.

What am I doing wrong?

my server output to df -hl command:

Filesystem Size Used Avail Use% Mounted on
51G 24G 26G 48% /
tmpfs 1.8G 0 1.8G 0% /dev/shm
/dev/sdc1 504M 120M 359M 25% /boot
917G 72M 871G 1% /var/lib/nethserver/ibay/hddados

You mounted the new disk on /var/lib/nethserver/hddados
If you create a share called hddados, you will be able to access the new disk on that share.
If you want all shares to be on that new disk, you should mount the new disk on /var/lib/nethserver/ibay and copy all content from the current disk in /var/lib/nethserver/ibay to the new disk.


Hello robb, thanks for the quick reply.
I had already created the hddados share but when saving it gives an error and I lose access to the other shares.

I think that giving the error will not run the entire script and will have the shares visible but disabled

It could be a problem of access rights?


Nice to see my how-to is usefull and helfllup.

At each step in the how-to there’s a way to check if thing are going well.

Your mount point is not usual, and I wiil recomand to think well about this particularity.

Try to mount the disk in another place, like /opt for exemple.
Perhaps there’s internals netserver scripts (e-smith layer) that’s interfering in the process.

It a good way to start to investigate :wink:

What’ s about the idea of Giacomo in this thread at the second message, to replace the standard share folder with same named (hard)link to the new folder?

The method you have chosen is to create an additional LVM volume and to migrate the data to the new and larger volume.

The other method is to add the new disk to the current LVM and extend the space. Most find this method easier than migrating the data and fixing any potential permissions issues.

You can do this by doing the following:

  1. Identify the new disk fdisk -l and assign a partition to it. For this exercise, lets call it /dev/sdb1.
  2. Run pvcreate /dev/sdb1.
  3. Run vgdisplay and you should see VolGroup-lv_root in the list.
  4. Run vgextend VolGroup-lv_root /dev/sdb1 and you should get a response similar to the following Volume group "vgextend VolGroup-lv_root" successfully extended.
  5. Run pvscan and you should see the various disks that make up the LVM.
  6. Now we need to tell the logical volume to use the new space. Confirm the name of the logical volume by running lvdisplay.
  7. Run the command lvextend /dev/VolGroup-lv_root/root /dev/sdb1
  8. You should see the following to lines appear:
    Extending logical volume root to xxx.xx GiB (where xxx.xx is the new size of the volume)
    Logical volume root successfully resized
  9. You can then run vgdisplay and lvdisplay again to confirm the size of the volume group and logical volume respectively.
  10. However if you run a df command to see available disk space it will not have changed yet as there is one final step, we need to resize the file system using the resize2fs command in order to make use of this space.
  11. resize2fs /dev/VolGroup-lv_root/root (If you are running XFS on Centos 7, use the xfs_growfs command instead)
  12. Depending on the speeds of the disks involved and the size of the disk you are adding to the LVM it may take a few minutes for this task to complete.

I would definitely choose this option in a production environment.


Hope this is of some help!


Hi @ppaes

In the past, to solve this problem, I have installed a drive (as you did) and I proceeded as follows

I mounted the disk in the directory /mnt/newdisk (not in /var/lib/nethserver/ibay):
I copied folder ibay to the new disk

cp -Rf /var/lib/nethserver/ibay /mnt/newdisk/

I renamed the original ibay

mv /var/lib/nethserver/ibay /var/lib/nethserver/ibay.ori

I created a symbolic link

ln -s /mnt/newdisk/ibay /var/lib/nethserver/ibay

The directory /mnt/newdisk/ibay must be added manually to the backup

Once everything is working I deleted the old Ibay

rm -Rf /var/lib/nethserver/ibay.ori