Using spare disk space

NethServer Version: NethServer release 7.2.1511 (rc1)

I’ve installed NS on a PC with a 1TB hard drive. NS has taken 50GB as the root partition. How do I make the rest of the drive available for Samba shares etc?

please post here the result of:

df -h


fdisk -l

[root@nethserver ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   50G  3.0G   48G   6% /
devtmpfs                 3.8G     0  3.8G   0% /dev
tmpfs                    3.9G     0  3.9G   0% /dev/shm
tmpfs                    3.9G   25M  3.8G   1% /run
tmpfs                    3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/mapper/centos-home  873G   33M  873G   1% /home
/dev/sda1                497M  158M  339M  32% /boot
tmpfs                    780M     0  780M   0% /run/user/0
[root@nethserver ~]# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=3979976k,nr_inodes=99499                             4,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relat                             ime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=62                             0,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,seclabel,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xa                             ttr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,de                             vices)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatim                             e,cpuacct,cpu)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,fr                             eezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,ne                             t_cls)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,mem                             ory)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blki                             o)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hu                             getlb)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpu                             set)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime                             ,perf_event)
configfs on /sys/kernel/config type configfs (rw,relatime)
/dev/mapper/centos-root on / type xfs (rw,relatime,seclabel,attr2,inode64,noquot                             a)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=31,pgrp=1,time                             out=300,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel)
/dev/mapper/centos-home on /home type xfs (rw,relatime,seclabel,attr2,inode64,no                             quota)
/dev/sda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=798028k,                             mode=700)
[root@nethserver ~]# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x0009f404

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048  1953523711   976248832   8e  Linux LVM

Disk /dev/mapper/centos-root: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/centos-swap: 8455 MB, 8455716864 bytes, 16515072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/centos-home: 937.5 GB, 937464692736 bytes, 1830985728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

You already use the rest of the disk

1 Like

It does indeed look like it doesn’t it!
I wasn’t aware of it though because it’s hidden away as far as the web interface for NS is concerned.
When you create a new share it doesn’t give you the option of where the share should be created, it just puts it in the root partition.
Is it possible to create a share on a different partition?

It’d be good to have some visibility of other drives and partitions that are available, perhaps it could go in the “Disk Usage” section.

you’ve likely used a custom partition

can you explain us EXACLTY how did you setup your server?

all the steps, thank you

Boot up using NS 7 Beta 2 disk
Select NS interactive installation
Localisation > London, English UK
Security Policy > Common Profile
Installation Source > Local Media
Software Selection > Minimal Install
Installation Destination > sda, automatic partitioning, reclaim space, delete all
kdump > enabled
Wired Ethernet
Begin Installation…
Set root password
Installation completes and the system reboots.
Log in using the web interface.
Go through First Config Wizard, enter FQDN, confirm timezone (London), TCP port 2222, leave smarthost unticked, useage stats on, apply changes.
Set wired interface to a static IP
Software center > Install all updates, install Account provider: Samba Active Directory and File Server
Provide IP address for DC, create bridge ticked, NetBIOS name already entered.
Shared folders > create new, name: nethshare, owning group: Domain users, Allow write permission: yes, Allow read to everyone: no, guest access: none, browseable: Yes, recycle bin: No
Create a mapped connection to the new drive from Windows, available space 49.9GB

If you want (custom) diskpartitioning during install, you must use the advanced install option. Then you can partition the disk any way you like.

Is that what I need to do? I’d have thought automatic partitioning should do something sensible with the drive and let you use the extra space when you create a shared folder.
Selecting custom partitioning seems to detract from the nice and easy installation process, and it’s not obvious when you install NS that that’s what you need to do should you want to create a shared folder that isn’t on the root partition.
It’s a shame you can’t manage drives and partitions from within NS, I know they have their reasons for not including a disk management facility (in case someone does something that breaks their server), but to me this is quite important. How does NS cope should I add another drive later on?
I can get around this by just not using shared folders on NS, it’s just a shame as it’s so nearly a complete server system.

Sorry if I come across as ungrateful, I’m really not and am dead impressed with NS as a whole. Maybe I’m just not using it right, I still don’t know how I’m to create a share on the ‘other’ bit of the drive!

This is where your cli skills come into play. You will have to add a new drive in fstab manually. There are many websites where you can find info how to do this.
One of them is this one:

hi @Mattallyc @robb

It is not a standard way and I have not tested it only for testing.

  • I mounted a disk on a path (eg. /disknew)
  • I moved the folder of shares (/var/lib/nethserver/ibay) in /disknew/ibay
  • I created a symbolic link to the original location

ln -s /disknew/ibay /var/lib/nethserver/ibay

All new shares are created in the new disk.
In the dashboard you see only the root space (and not the added disk)

It might work?

It should work. You need to add /disknew/ibay/ path into backup custom.include: IIRC duplicity does not follow symlinks.

1 Like

Or use an bind mount instead of a symlink.

Make sure you understand the differences as they both offer the same features, but with subtle differences.