svartalf
Cadet
- Joined
- Jul 15, 2018
- Messages
- 2
I'm trying to use that amazing fan controller script by Stux here. It works great by itself, but I thought that it would be nice to put it into a jail, just in case.
The thing is: smartctl is unable to access /dev/ada* disks from the jail.
Right now I ended with a custom devfs ruleset, but smartctl still not able to read data from disk. Is it even possible? I'm mostly a linux user and feeling kind dumb here.
FreeNAS 11.2-BETA1:
0777 mode is too permissive, I know, just tried to get to the point.
UI changes for jail:
After devfs.rules file editing and UI changes:
Inside the jail:
And smartctl in the jail:
Is it possible to pass ada* disks into a jail in that way so smartctl can access them?
The thing is: smartctl is unable to access /dev/ada* disks from the jail.
Right now I ended with a custom devfs ruleset, but smartctl still not able to read data from disk. Is it even possible? I'm mostly a linux user and feeling kind dumb here.
FreeNAS 11.2-BETA1:
freenas# uname -a
FreeBSD freenas.local 11.1-STABLE FreeBSD 11.1-STABLE #0 r325575+b31fa24ea5b(freenas/11-stable): Thu Jul 5 16:57:13 EDT 2018 root@nemesi
s.tn.ixsystems.com:/freenas-11.2-releng/freenas/_BE/objs/freenas-11.2-releng/freenas/_BE/os/sys/FreeNAS.amd64 amd64
freenas# cat /etc/devfs.rules
..
[devfsrules_jail_fan=6]
add include $devfsrules_jail_dhcp
add path 'ada*' unhide
add path 'ada*' mode 0777
0777 mode is too permissive, I know, just tried to get to the point.
UI changes for jail:
Code:
devfs_ruleset=6 mount.devfs=1 # it is a checkbox in UI actually, but I assume it is mapped to 1 mount.fdescfs=1 # checkbox too enforce_statfs=0 allow_mount=1 # checkbox too allow_mount.devfs=1 # checkbox too
After devfs.rules file editing and UI changes:
service devfs restart
iocage restart fan # fan is a jail name here
Inside the jail:
root@fan:~ # ls -la /dev/ada*
crwxrwxrwx 1 root operator 0x5b Jul 15 16:27 /dev/ada0
crwxrwxrwx 1 root operator 0x5c Jul 15 16:27 /dev/ada0p1
crwxrwxrwx 1 root operator 0x62 Jul 15 16:27 /dev/ada0p1.eli
crwxrwxrwx 1 root operator 0x5f Jul 15 16:27 /dev/ada0p2
crwxrwxrwx 1 root operator 0x5e Jul 15 16:27 /dev/ada1
crwxrwxrwx 1 root operator 0x61 Jul 15 16:27 /dev/ada1p1
crwxrwxrwx 1 root operator 0x75 Jul 15 16:27 /dev/ada1p2
crwxrwxrwx 1 root operator 0x73 Jul 15 16:15 /dev/ada2
crwxrwxrwx 1 root operator 0x76 Jul 15 16:15 /dev/ada2p1
crwxrwxrwx 1 root operator 0x77 Jul 15 16:15 /dev/ada2p2
And smartctl in the jail:
root@fan:~ # smartctl -a /dev/ada0
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.1-STABLE amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
/dev/ada0: Operation not permitted
Please specify device type with the -d option.
Use smartctl -h to get a usage summary
Is it possible to pass ada* disks into a jail in that way so smartctl can access them?