*New 11.3 series Release:
2019-10-05: XigmaNAS 11.3.0.4.6928 - released, 11.2 series are soon unsupported!

*New 12.0 series Release:
2019-10-05: XigmaNAS 12.0.0.4.6928 - released!

*New 11.2 series Release:
2019-09-23: XigmaNAS 11.2.0.4.6881 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

Ability to set Owner on zfs Volume

Post/Debate your Suggestions & Requests of XigmaNAS here. This ONLY pertains to XigmaNAS.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
lux
Advanced User
Advanced User
Posts: 200
Joined: 23 Jun 2012 11:37
Location: Bielefeld, Germany
Contact:
Status: Offline

Ability to set Owner on zfs Volume

#1

Post by lux » 26 Jan 2017 10:22

Hi all!

I´ve using raw zfs Volumes with Virualbox as raw HDD / https://www.howtoforge.com/using-raw-de ... ualbox-vms - this works so far

all defined Volumes have Owner "root" - i have to set Owner "vboxusers" after every reboot otherwise Vbox have no access to the Volumes :|

please add selectable Owner/User to "disks_zfs_volume_edit.php" - until now i´m using a Script that "chown vboxusers" as Owner 8-)

Thx!

greetings from Germany
Home:11.2.x.6743/emb@32GB USB|1270v2@X9SCA-F|ECC32GB|i340-T4[lagg@GS108Tv2&smb-mch]|M1015@IT|9HDD~40TB@3xRaidZ1+1HDD+2SSD i335&i520+1xi800P@ZIL|~44W idle@SS-400FL2|Nanoxia Deep Silence 6B|24/7
Services: CIFS, FTP, TFTP, SSH, NFS, Rsync, Syncthing, Webserver, BitTorrent, VirtualBox | Extensions: OBI, TheBrig[Emby, certbot, Asterisk] | Extensions self installed: Streamripper, Pi-hole@Debian9 VM
Test:12.x/emb@16GB USB|X3 420e@M4A88TD-V|16GB|i350-T2|M1015@IT|7xHDD+1xSSD[different Size&Brand]RaidZ1+2|for TESTing only

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4921
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Ability to set Owner on zfs Volume

#2

Post by raulfg3 » 26 Jan 2017 10:26

Is not possible to define when create first time the volume?

I remember that is possible to change user & group for Dataset at creation time, but never use volumes so I not totally sure if is posible.
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

User avatar
lux
Advanced User
Advanced User
Posts: 200
Joined: 23 Jun 2012 11:37
Location: Bielefeld, Germany
Contact:
Status: Offline

Re: Ability to set Owner on zfs Volume

#3

Post by lux » 26 Jan 2017 10:37

nope not really - i could set:

Name/Pool/Size/Volume Mode/Compression/Dedup/Sync/Sparse Volume/Block Size & Description

tested on 10.3.0.3.3286 & 10.3.0.3.3450 - will have a look on my testing Machine with 11.0.0.4.3460 this Evening... :mrgreen:
Home:11.2.x.6743/emb@32GB USB|1270v2@X9SCA-F|ECC32GB|i340-T4[lagg@GS108Tv2&smb-mch]|M1015@IT|9HDD~40TB@3xRaidZ1+1HDD+2SSD i335&i520+1xi800P@ZIL|~44W idle@SS-400FL2|Nanoxia Deep Silence 6B|24/7
Services: CIFS, FTP, TFTP, SSH, NFS, Rsync, Syncthing, Webserver, BitTorrent, VirtualBox | Extensions: OBI, TheBrig[Emby, certbot, Asterisk] | Extensions self installed: Streamripper, Pi-hole@Debian9 VM
Test:12.x/emb@16GB USB|X3 420e@M4A88TD-V|16GB|i350-T2|M1015@IT|7xHDD+1xSSD[different Size&Brand]RaidZ1+2|for TESTing only

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4921
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Ability to set Owner on zfs Volume

#4

Post by raulfg3 » 26 Jan 2017 10:45

Checked, is NOT possible: http://wiki.nas4free.org/doku.php?id=do ... mes-volume

Well, perhaps for next releases developers can add access restrictions like does in dataset: http://wiki.nas4free.org/doku.php?id=do ... ts_dataset
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

User avatar
lux
Advanced User
Advanced User
Posts: 200
Joined: 23 Jun 2012 11:37
Location: Bielefeld, Germany
Contact:
Status: Offline

Re: Ability to set Owner on zfs Volume

#5

Post by lux » 26 Jan 2017 10:55

this would be very nice! ;)

Thx to all Dev's for their great Work :!:
Home:11.2.x.6743/emb@32GB USB|1270v2@X9SCA-F|ECC32GB|i340-T4[lagg@GS108Tv2&smb-mch]|M1015@IT|9HDD~40TB@3xRaidZ1+1HDD+2SSD i335&i520+1xi800P@ZIL|~44W idle@SS-400FL2|Nanoxia Deep Silence 6B|24/7
Services: CIFS, FTP, TFTP, SSH, NFS, Rsync, Syncthing, Webserver, BitTorrent, VirtualBox | Extensions: OBI, TheBrig[Emby, certbot, Asterisk] | Extensions self installed: Streamripper, Pi-hole@Debian9 VM
Test:12.x/emb@16GB USB|X3 420e@M4A88TD-V|16GB|i350-T2|M1015@IT|7xHDD+1xSSD[different Size&Brand]RaidZ1+2|for TESTing only

User avatar
ms49434
Developer
Developer
Posts: 718
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: Ability to set Owner on zfs Volume

#6

Post by ms49434 » 26 Jan 2017 17:47

Please have a look into the following solution (pool name is tank, zvol name is vmstore):

webgui:
- create pool
- create zvol
cli:
- initialise zvol: gpart create -s GPT /dev/zvol/tank/vmstore
- partition zvol: gpart add -t freebsd-ufs /dev/zvol/tank/vmstore
- format partition: newfs -U /dev/zvol/tank/vmstorep1
webgui:
- create mount point, custom device, /dev/zvol/tank/vmstorep1, ufs, assign access rights for user root, group vboxusers, access rights 770
- configure vbox to use mount point

A second solution would be to configure access to zvol via iscsi but I don't know if you want to go down that route.
1) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, SLOG: Samsung 850 Pro, L2ARC: Samsung 850 Pro, Pool 2: 1x Samsung 860 EVO 1TB , services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

User avatar
tony1
Moderator
Moderator
Posts: 172
Joined: 14 Jul 2016 19:04
Status: Offline

Re: Ability to set Owner on zfs Volume

#7

Post by tony1 » 26 Jan 2017 18:40

I just use System > Advanced > Command Scripts postinit/shutdown to start and stop the VM.
problem solved!

chown is a handy command.

it's very simple and in my opinion the gui really doest need to be cluttered with simple tasks.

just my opinion

raw disks work nice with zvol.

I might also mention if you plan on utilizing zfs-snapshots shut down the vm first. snapshot it then power back on.

I have edited this post to show command scripts that work very well for me.

System > Advanced > Command Scripts
chown vboxusers:wheel /dev/zvol/tank/zvol && sudo -u vboxusers VBoxManage startvm vmname --type headless (postinit)
sudo -u vboxusers VBoxManage controlvm vmname acpipowerbutton (shutdown)

armin_bl
NewUser
NewUser
Posts: 2
Joined: 13 Feb 2018 12:06
Status: Offline

Re: Ability to set Owner on zfs Volume

#8

Post by armin_bl » 26 Feb 2018 10:57

Sorry for jumping into this thread so late.

I'm quiet new to NAS4Free. I switched from a individual system and I've been running the N4F machine since two weeks now with six VMs. Three of the VMs are running on ZVOLs and I also figured out how to change the ownership of these by running postinit commands.
My commands look similar to those you posted.
tony1 wrote:
26 Jan 2017 18:40
[...]
System > Advanced > Command Scripts
chown vboxusers:wheel /dev/zvol/tank/zvol && sudo -u vboxusers VBoxManage startvm vmname --type headless (postinit)
sudo -u vboxusers VBoxManage controlvm vmname acpipowerbutton (shutdown)
Now I saw that N4F shuts down the VMs by itsself, using ACPI when stopping or rebooting. So I do not use the shutdown command anymore.
Is there any reason for using the seperate command to properly shutdown the VMs instead of trusting in N4F itsself?

Post Reply

Return to “Suggestions & Requests”