Howto share a TrueNAS ramdisk? Network speed comparision

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
Hello,

how would I create an 8 GByte large ram disk in TrueNAS and share this via SMB?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
mkdir /mnt/RamDisk && mdmfs -M -S -o async -s 8192m md10 /mnt/RamDisk && chown root:wheel /mnt/RamDisk/ && chmod 0775 /mnt/RamDisk

Then configure your share using /mnt/RamDisk as the location.
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
mkdir /mnt/RamDisk && mdmfs -M -S -o async -s 8192m md10 /mnt/RamDisk && chown root:wheel /mnt/RamDisk/ && chmod 0775 /mnt/RamDisk

Then configure your share using /mnt/RamDisk as the location.

Hello @sretalla

thank you - I would never have guessed this command
 

flashdrive

Patron
Joined
Apr 2, 2021
Messages
264
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Code:
        if data['path']:
            await self.validate_path_field(data, schema_name, verrors, bypass=bypass)

            """
            When path is not a clustervolname, legacy behavior is to make all path components
            so skip this step here. This is a very rough check is to prevent users from sharing
            unsupported filesystems over SMB as behavior with our default VFS options in such
            a situation is undefined.
            """
            if not data['cluster_volname'] and os.path.exists(data['path']):
                fstype = (await self.middleware.call('filesystem.statfs', data['path']))['fstype']
                if fstype != 'zfs':
                    verrors.add(f'{schema_name}.path', f'{fstype}: path is not a ZFS dataset')


We do not support sharing non-ZFS volumes over SMB.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Any time you work around our middleware validation, you run risk of a future update breaking your workaround. Just FYI. We've been gradually adding more calls to realpath to resolve symlinks to avoid exposure of unexpected parts of filesystems over our file-sharing protocols.
 
Top