I've been using btrfs for a few years and this week decided to make a dedicated NAS instead of relying on my PC. Installation of Debian and OMV went smoothly and I transplanted my data disks from my PC into my new (as new as you can get on freecycle and ebay for a £25 outlay ) NAS. A few clicks and by btrfs RAID1 mirror was back.
My NAS box is running OMV 3.0.59 erasmus, 64-bit AMD 4.7.0 backport kernel and omvextrasorg 3.4.15. (I'm using the 4.7 kernel because I use btrfs on my disks and want to use the most recent btrfs-progs that is currently available)
I hit a snag when I tried to setup NFS shares for my various subvolumes which I have named using the semi-adopted convention of using an '@' symbol to prefix subvolume names to make it easy to distinguish subvolumes from directories at a glance, e.g. subvolume '@photos' vs a directory, e.g. 'Maldives_XMAS_2017'. However, it is impossible to share the subvolumes directly because of the '@' symbol in their names. As a workaround I have created symlinks to my subvolumes for now.
The recreate the problem simply create a subvolume called '@test' then try to share it using OMV's NFS add share GUI which fails with:
fsname: Failed to match exactly one schema.
Error #0:
exception 'OMV\Json\SchemaValidationException' with message 'fsname: Failed to match exactly one schema.' in /usr/share/php/openmediavault/json/schema.inc:688 Stack trace:
#0 /usr/share/php/openmediavault/json/schema.inc(375): OMV\Json\Schema->checkOneOf('/media/24e40b77...', Array, 'fsname')
#1 /usr/share/php/openmediavault/json/schema.inc(297): OMV\Json\Schema->validateString('/media/24e40b77...', Array, 'fsname')
#2 /usr/share/php/openmediavault/json/schema.inc(257): OMV\Json\Schema->validateType('/media/24e40b77...', Array, 'fsname')
#3 /usr/share/php/openmediavault/config/datamodel.inc(155): OMV\Json\Schema->validate('/media/24e40b77...', 'fsname')
#4 /usr/share/php/openmediavault/config/configobject.inc(189): OMV\Config\DataModel->validateProperty('fsname', '/media/24e40b77...')
#5 /usr/share/php/openmediavault/config/configobject.inc(271): OMV\Config\ConfigObject->set('fsname', '/media/24e40b77...', true)
#6 /usr/share/php/openmediavault/config/configobject.inc(233): OMV\Config\ConfigObject->setFlatAssoc(Array, true, false)
#7 /usr/share/openmediavault/engined/rpc/nfs.inc(192): OMV\Config\ConfigObject->setAssoc(Array)
#8 [internal function]: OMVRpcServiceNfs->setShare(Array, Array)
#9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(124): call_user_func_array(Array, Array)
#10 /usr/share/php/openmediavault/rpc/rpc.inc(84): OMV\Rpc\ServiceAbstract->callMethod('setShare', Array, Array)
#11 /usr/sbin/omv-engined(516): OMV\Rpc\Rpc::call('NFS', 'setShare', Array, Array, 1)
#12 {main}
Alles anzeigen
The problem does not occur when I dont use the '@' symbol in the subvolume name, e.g. test2 created with 'btrfs sub cre test2' can be shared without issue. Creating a symlink 'ln -s @test test3' and sharing the 'test3' symlink also works without problem.
Is this actually a bug in OMV or am I doing something wrong .
Thanks in advance,
Sophie x