David123
Cadet
- Joined
- Feb 11, 2015
- Messages
- 3
Hello,
First of all, I'm new to FreeNAS which can probaly explain the following question... ^^
I'm working on a small script to manualy mount an encrypted ZFS pool.
If I unlock the disk using the GUI, the "df -h" result is :
If I unlock the disk using the script, the "df -h" result is :
When I use the "zpool import" command, all the legacy (.system/...) are not mounted.
I can manually mount it (using for exemple : mount -t zfs DATA/.system /var/db/system) but is it the good way to proceed ?
What should I do to have it all mounted properly ?
Thanks for you help :)
First of all, I'm new to FreeNAS which can probaly explain the following question... ^^
I'm working on a small script to manualy mount an encrypted ZFS pool.
Code:
#!/bin/bash disk1='AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA' disk2='BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB' geliKey='/data/geli/KKKKKKKK-KKKK-KKKK-KKKK-KKKKKKKKKKKK.key' passphrase='/root/mykey.txt' zpoolName='MYPOOL' geli attach -j $passphrase -k $geliKey /dev/gptid/$disk1 geli attach -j $passphrase -k $geliKey /dev/gptid/$disk2 zpool import -R /mnt $zpoolName
If I unlock the disk using the GUI, the "df -h" result is :
Code:
[root@lab-nas] /var# df -h Filesystem Size Used Avail Capacity Mounted on freenas-boot/ROOT/default 3.8G 933M 2.9G 24% / devfs 1.0k 1.0k 0B 100% /dev tmpfs 32M 5.3M 26M 17% /etc tmpfs 4.0M 8.0k 4M 0% /mnt tmpfs 332M 62M 270M 19% /var freenas-boot/grub 2.9G 7.8M 2.9G 0% /boot/grub DATA 1.9G 108k 1.9G 0% /mnt/DATA DATA/.system 1.9G 752k 1.9G 0% /var/db/system DATA/.system/cores 1.9G 700k 1.9G 0% /var/db/system/cores DATA/.system/samba4 1.9G 300k 1.9G 0% /var/db/system/samba4 DATA/.system/syslog-ffb84ccc300c4843b1352f93d2beb43e 1.9G 240k 1.9G 0% /var/db/system/syslog-ffb84ccc300c4843b1352f93d2beb43e DATA/.system/rrd-ffb84ccc300c4843b1352f93d2beb43e 1.9G 96k 1.9G 0% /var/db/system/rrd-ffb84ccc300c4843b1352f93d2beb43e
If I unlock the disk using the script, the "df -h" result is :
Code:
root@lab-nas] /var# df -h Filesystem Size Used Avail Capacity Mounted on freenas-boot/ROOT/default 3.8G 933M 2.9G 24% / devfs 1.0k 1.0k 0B 100% /dev tmpfs 32M 5.3M 26M 17% /etc tmpfs 4.0M 8.0k 4M 0% /mnt tmpfs 332M 62M 270M 19% /var freenas-boot/grub 2.9G 7.8M 2.9G 0% /boot/grub DATA 1.9G 108k 1.9G 0% /mnt/DATA
When I use the "zpool import" command, all the legacy (.system/...) are not mounted.
I can manually mount it (using for exemple : mount -t zfs DATA/.system /var/db/system) but is it the good way to proceed ?
What should I do to have it all mounted properly ?
Thanks for you help :)