Solved Cannot unmount ZFS mountpoint

Hello,
zfs list return
Code:
NAME                                                                USED  AVAIL  REFER  MOUNTPOINT
zroot                                                              67.2G   459G  11.3G  /zroot
zroot@b4iocage                                                     3.35G      -  11.0G  -
zroot/DATA                                                         40.0M   459G   288K  none
zroot/DATA/mysql                                                   13.9M   459G  6.74M  /iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe/root/var/db/mysql
zroot/DATA/mysql/mysql-innodb                                      4.68M   459G  4.68M  /iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe/root/var/db/mysql/mysql-innodb
zroot/DATA/mysql/mysql-innodb-logs                                 2.46M   459G  2.46M  /iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe/root/var/db/mysql/mysql-innodb-logs
zroot/DATA/www                                                     25.9M   459G   288K  none
zroot/DATA/www/mydomain.co.uk                                      25.6M   459G   288K  /iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe/root/home/
zroot/DATA/www/mydomain.co.uk/development                          6.84M   459G  6.84M  /iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root/usr/local/www/development
zroot/DATA/www/mydomain.co.uk/production                           18.5M   459G  18.5M  /iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root/usr/local/www/production
zroot/home                                                          272K   459G   272K  /zroot/home
zroot/home@b4iocage                                                    0      -   272K  -
zroot/iocage                                                       39.0G   459G   623K  /iocage
zroot/iocage/.defaults                                              288K   459G   288K  /iocage/.defaults
zroot/iocage/base                                                  3.44G   459G   288K  /iocage/base
zroot/iocage/base/10.2-RELEASE                                     3.44G   459G   288K  /iocage/base/10.2-RELEASE
zroot/iocage/base/10.2-RELEASE/root                                3.44G   459G   251M  /iocage/base/10.2-RELEASE/root
zroot/iocage/base/10.2-RELEASE/root/bin                            3.40M   459G  3.40M  /iocage/base/10.2-RELEASE/root/bin
zroot/iocage/base/10.2-RELEASE/root/boot                           4.50M   459G  4.50M  /iocage/base/10.2-RELEASE/root/boot
zroot/iocage/base/10.2-RELEASE/root/lib                            18.6M   459G  18.6M  /iocage/base/10.2-RELEASE/root/lib
zroot/iocage/base/10.2-RELEASE/root/libexec                         911K   459G   911K  /iocage/base/10.2-RELEASE/root/libexec
zroot/iocage/base/10.2-RELEASE/root/rescue                         15.8M   459G  15.8M  /iocage/base/10.2-RELEASE/root/rescue
zroot/iocage/base/10.2-RELEASE/root/sbin                           14.0M   459G  14.0M  /iocage/base/10.2-RELEASE/root/sbin
zroot/iocage/base/10.2-RELEASE/root/usr                            3.14G   459G   312K  /iocage/base/10.2-RELEASE/root/usr
zroot/iocage/base/10.2-RELEASE/root/usr/bin                         160M   459G   160M  /iocage/base/10.2-RELEASE/root/usr/bin
zroot/iocage/base/10.2-RELEASE/root/usr/include                    57.9M   459G  57.9M  /iocage/base/10.2-RELEASE/root/usr/include
zroot/iocage/base/10.2-RELEASE/root/usr/lib                         139M   459G   139M  /iocage/base/10.2-RELEASE/root/usr/lib
zroot/iocage/base/10.2-RELEASE/root/usr/lib32                       134M   459G   134M  /iocage/base/10.2-RELEASE/root/usr/lib32
zroot/iocage/base/10.2-RELEASE/root/usr/libdata                     767K   459G   767K  /iocage/base/10.2-RELEASE/root/usr/libdata
zroot/iocage/base/10.2-RELEASE/root/usr/libexec                    9.13M   459G  9.13M  /iocage/base/10.2-RELEASE/root/usr/libexec
zroot/iocage/base/10.2-RELEASE/root/usr/sbin                       30.7M   459G  30.7M  /iocage/base/10.2-RELEASE/root/usr/sbin
zroot/iocage/base/10.2-RELEASE/root/usr/share                       232M   459G   232M  /iocage/base/10.2-RELEASE/root/usr/share
zroot/iocage/base/10.2-RELEASE/root/usr/src                        2.39G   459G  2.39G  /iocage/base/10.2-RELEASE/root/usr/src
zroot/iocage/download                                               603M   459G   288K  /iocage/download
zroot/iocage/download/10.2-RELEASE                                  603M   459G   603M  /iocage/download/10.2-RELEASE
zroot/iocage/jails                                                 31.6G   459G   312K  /iocage/jails
zroot/iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe            3.91G   459G   288K  /iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe
zroot/iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe/root       3.91G   459G  3.91G  /iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe/root
zroot/iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe/root/data   288K   459G   288K  none
zroot/iocage/jails/6abbbfad-ba15-11e5-b091-f04da20055fe            4.07G   949M   288K  /iocage/jails/6abbbfad-ba15-11e5-b091-f04da20055fe
zroot/iocage/jails/6abbbfad-ba15-11e5-b091-f04da20055fe/root       4.07G   949M  4.07G  /iocage/jails/6abbbfad-ba15-11e5-b091-f04da20055fe/root
zroot/iocage/jails/6abbbfad-ba15-11e5-b091-f04da20055fe/root/data   288K   949M   288K  none
zroot/iocage/jails/829611fe-c8dd-11e5-9463-f04da20055fe            3.78G   222M   288K  /iocage/jails/829611fe-c8dd-11e5-9463-f04da20055fe
zroot/iocage/jails/829611fe-c8dd-11e5-9463-f04da20055fe/root       3.78G   222M  3.78G  /iocage/jails/829611fe-c8dd-11e5-9463-f04da20055fe/root
zroot/iocage/jails/829611fe-c8dd-11e5-9463-f04da20055fe/root/data   288K   222M   288K  none
zroot/iocage/jails/8df20909-babe-11e5-8dfa-f04da20055fe            3.89G   459G   288K  /iocage/jails/8df20909-babe-11e5-8dfa-f04da20055fe
zroot/iocage/jails/8df20909-babe-11e5-8dfa-f04da20055fe/root       3.89G   459G  3.89G  /iocage/jails/8df20909-babe-11e5-8dfa-f04da20055fe/root
zroot/iocage/jails/8df20909-babe-11e5-8dfa-f04da20055fe/root/data   288K   459G   288K  none
zroot/iocage/jails/c9d50f6c-c382-11e5-8dfa-f04da20055fe            7.55G   459G   288K  /iocage/jails/c9d50f6c-c382-11e5-8dfa-f04da20055fe
zroot/iocage/jails/c9d50f6c-c382-11e5-8dfa-f04da20055fe/root       7.55G   459G  7.55G  /iocage/jails/c9d50f6c-c382-11e5-8dfa-f04da20055fe/root
zroot/iocage/jails/c9d50f6c-c382-11e5-8dfa-f04da20055fe/root/data   288K   459G   288K  none
zroot/iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe            4.50G  4.50G   288K  /iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe
zroot/iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root       4.50G  4.50G  4.50G  /iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root
zroot/iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root/data   288K  4.50G   288K  none
zroot/iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe            3.86G   459G   288K  /iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe
zroot/iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe/root       3.86G   459G  3.86G  /iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe/root
zroot/iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe/root/data   288K   459G   288K  none
zroot/iocage/releases                                              3.44G   459G   288K  /iocage/releases
zroot/iocage/releases/10.2-RELEASE                                 3.44G   459G   288K  /iocage/releases/10.2-RELEASE
zroot/iocage/releases/10.2-RELEASE/root                            3.44G   459G  3.44G  /iocage/releases/10.2-RELEASE/root
zroot/local                                                         484M   459G   267M  /usr/local
zroot/local@b4iocage                                                217M      -   254M  -
zroot/ports                                                        5.45G   459G  4.51G  /usr/ports
zroot/ports@b4iocage                                                950M      -  3.17G  -
zroot/ports/distfiles                                              11.4M   459G  11.2M  /usr/ports/distfiles
zroot/ports/distfiles@b4iocage                                      216K      -  2.97M  -
zroot/ports/packages                                                192K   459G   192K  /usr/ports/packages
zroot/ports/packages@b4iocage                                          0      -   192K  -
zroot/poudriere                                                    3.45G   459G   288K  /zroot/poudriere
zroot/poudriere/jails                                              3.45G   459G   288K  /zroot/poudriere/jails
zroot/poudriere/jails/freebsd_10-2x64                              3.45G   459G  3.45G  /usr/local/poudriere/jails/freebsd_10-2x64
zroot/poudriere/jails/freebsd_10-2x64@clean                        24.0K      -  3.45G  -
zroot/swap                                                         4.13G   463G   192K  -
zroot/swap@b4iocage                                                    0      -   192K  -
zroot/tmp                                                          2.92M   459G  2.73M  /zroot/tmp
zroot/tmp@b4iocage                                                  192K      -   256K  -
zroot/var                                                          12.0M   459G   416K  /zroot/var
zroot/var@b4iocage                                                     0      -   416K  -
zroot/var/db                                                       10.6M   459G  10.4M  /zroot/var/db
zroot/var/db@b4iocage                                                  0      -  10.4M  -
zroot/var/db/pkg                                                    256K   459G   256K  /zroot/var/db/pkg
zroot/var/db/pkg@b4iocage                                              0      -   256K  -
zroot/var/log                                                       256K   459G   256K  /zroot/var/log
zroot/var/log@b4iocage                                                 0      -   256K  -
zroot/var/mail                                                      256K   459G   256K  /zroot/var/mail
zroot/var/mail@b4iocage                                                0      -   256K  -
zroot/var/run                                                       256K   459G   256K  /zroot/var/run
zroot/var/run@b4iocage                                                 0      -   256K  -
zroot/var/tmp                                                       256K   459G   256K  /zroot/var/tmp
zroot/var/tmp@b4iocage                                                 0      -   256K
                                           0      -   256K  -
When I try to unmount zroot/DATA/www/mydomain.co.uk/production using
Code:
zfs unmount /iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root/usr/local/www/production
I get
Code:
cannot unmount '/iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root/usr/local/www/production': not a mountpoint

Could anyone please tell me what I do wrong?
Also, Is there a way to see the content of a dataset? I am worry my data is gone
 
  • Thanks
Reactions: Oko
The directory isn't a mountpoint, the mountpoint is /iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root/, usr/local/www/production is just a directory underneath that.

Edit: Oh wait, let me check that again.

Yeah, it's a mountpoint. I didn't see the zroot/DATA/ filesystems. In that case it's possible the filesystem is already unmounted. In which case it would be a 'regular' directory. A zfs list does show the mountpoints but not if they're actively mounted or not. Use the mount(8) command to see that.

A zfs unmount zroot/DATA/www/mydomain.co.uk/production will probably tell you it's not mounted.
 
Ok I'll wait.
I've seriouly screw up my system
all web are gone... Is there a way to see if the data is still in the dataset zroot/DATA/www/mydomain.co.uk/production?
 
Is there a way to see if the data is still in the dataset zroot/DATA/www/mydomain.co.uk/production?
Sure, you can try to, temporarily, mount it somewhere else, /mnt for example. Then you can at least see if the files are still there.
 
Ok the files are still there... pfew
Is it possible to mount the mountpoint in 2 location at the same time?
 
No, not with ZFS. You can mount it on one place with ZFS and use nullfs(5) to mount it on a second.
 
You can add nullfs(5) to fstab, just like any other filesystem. I regularly use it to mount the host's /usr/ports into a jail:
Code:
dice@armitage:~ % cat /etc/fstab.mysql
/jails/basejail /jails/mysql/basejail nullfs ro 0 0
/usr/ports      /jails/mysql/usr/ports nullfs ro 0 0
This example mounts it read-only but read-write should work just as well.
 
Hi,
I don't have a fstab in /etc for my webjail like /etc/fstab.webjail ..
Do I just create one?
touch /etc/fstab.webjail
 
SirDice , I tried to follow your advise but I got the error File name too long
Code:
mount_nullfs -o rw /iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root/usr/local/www/production/httpdocs /iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe/root/home/mydomain/production
mount_nullfs: /iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe/root/home/mydomain/production: File name too long

Looking on google its a bug that exist since FreeBSd 5 :(

Will using fstab solve this issue?
As mentioned above, do I just create the jails fstab?
 
Hmm. That's an interesting one, never encountered it. Adding it to fstab probably isn't going to work, it still needs to be processed by mount_nullfs(8).
 
Hello,
zfs list return
Code:
NAME                                                                USED  AVAIL  REFER  MOUNTPOINT
zroot                                                              67.2G   459G  11.3G  /zroot
zroot@b4iocage                                                     3.35G      -  11.0G  -
zroot/DATA                                                         40.0M   459G   288K  none
zroot/DATA/mysql                                                   13.9M   459G  6.74M  /iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe/root/var/db/mysql
zroot/DATA/mysql/mysql-innodb                                      4.68M   459G  4.68M  /iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe/root/var/db/mysql/mysql-innodb
zroot/DATA/mysql/mysql-innodb-logs                                 2.46M   459G  2.46M  /iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe/root/var/db/mysql/mysql-innodb-logs
zroot/DATA/www                                                     25.9M   459G   288K  none
zroot/DATA/www/mydomain.co.uk                                      25.6M   459G   288K  /iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe/root/home/
zroot/DATA/www/mydomain.co.uk/development                          6.84M   459G  6.84M  /iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root/usr/local/www/development
zroot/DATA/www/mydomain.co.uk/production                           18.5M   459G  18.5M  /iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root/usr/local/www/production
zroot/home                                                          272K   459G   272K  /zroot/home
zroot/home@b4iocage                                                    0      -   272K  -
zroot/iocage                                                       39.0G   459G   623K  /iocage
zroot/iocage/.defaults                                              288K   459G   288K  /iocage/.defaults
zroot/iocage/base                                                  3.44G   459G   288K  /iocage/base
zroot/iocage/base/10.2-RELEASE                                     3.44G   459G   288K  /iocage/base/10.2-RELEASE
zroot/iocage/base/10.2-RELEASE/root                                3.44G   459G   251M  /iocage/base/10.2-RELEASE/root
zroot/iocage/base/10.2-RELEASE/root/bin                            3.40M   459G  3.40M  /iocage/base/10.2-RELEASE/root/bin
zroot/iocage/base/10.2-RELEASE/root/boot                           4.50M   459G  4.50M  /iocage/base/10.2-RELEASE/root/boot
zroot/iocage/base/10.2-RELEASE/root/lib                            18.6M   459G  18.6M  /iocage/base/10.2-RELEASE/root/lib
zroot/iocage/base/10.2-RELEASE/root/libexec                         911K   459G   911K  /iocage/base/10.2-RELEASE/root/libexec
zroot/iocage/base/10.2-RELEASE/root/rescue                         15.8M   459G  15.8M  /iocage/base/10.2-RELEASE/root/rescue
zroot/iocage/base/10.2-RELEASE/root/sbin                           14.0M   459G  14.0M  /iocage/base/10.2-RELEASE/root/sbin
zroot/iocage/base/10.2-RELEASE/root/usr                            3.14G   459G   312K  /iocage/base/10.2-RELEASE/root/usr
zroot/iocage/base/10.2-RELEASE/root/usr/bin                         160M   459G   160M  /iocage/base/10.2-RELEASE/root/usr/bin
zroot/iocage/base/10.2-RELEASE/root/usr/include                    57.9M   459G  57.9M  /iocage/base/10.2-RELEASE/root/usr/include
zroot/iocage/base/10.2-RELEASE/root/usr/lib                         139M   459G   139M  /iocage/base/10.2-RELEASE/root/usr/lib
zroot/iocage/base/10.2-RELEASE/root/usr/lib32                       134M   459G   134M  /iocage/base/10.2-RELEASE/root/usr/lib32
zroot/iocage/base/10.2-RELEASE/root/usr/libdata                     767K   459G   767K  /iocage/base/10.2-RELEASE/root/usr/libdata
zroot/iocage/base/10.2-RELEASE/root/usr/libexec                    9.13M   459G  9.13M  /iocage/base/10.2-RELEASE/root/usr/libexec
zroot/iocage/base/10.2-RELEASE/root/usr/sbin                       30.7M   459G  30.7M  /iocage/base/10.2-RELEASE/root/usr/sbin
zroot/iocage/base/10.2-RELEASE/root/usr/share                       232M   459G   232M  /iocage/base/10.2-RELEASE/root/usr/share
zroot/iocage/base/10.2-RELEASE/root/usr/src                        2.39G   459G  2.39G  /iocage/base/10.2-RELEASE/root/usr/src
zroot/iocage/download                                               603M   459G   288K  /iocage/download
zroot/iocage/download/10.2-RELEASE                                  603M   459G   603M  /iocage/download/10.2-RELEASE
zroot/iocage/jails                                                 31.6G   459G   312K  /iocage/jails
zroot/iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe            3.91G   459G   288K  /iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe
zroot/iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe/root       3.91G   459G  3.91G  /iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe/root
zroot/iocage/jails/1585e91b-cc07-11e5-9463-f04da20055fe/root/data   288K   459G   288K  none
zroot/iocage/jails/6abbbfad-ba15-11e5-b091-f04da20055fe            4.07G   949M   288K  /iocage/jails/6abbbfad-ba15-11e5-b091-f04da20055fe
zroot/iocage/jails/6abbbfad-ba15-11e5-b091-f04da20055fe/root       4.07G   949M  4.07G  /iocage/jails/6abbbfad-ba15-11e5-b091-f04da20055fe/root
zroot/iocage/jails/6abbbfad-ba15-11e5-b091-f04da20055fe/root/data   288K   949M   288K  none
zroot/iocage/jails/829611fe-c8dd-11e5-9463-f04da20055fe            3.78G   222M   288K  /iocage/jails/829611fe-c8dd-11e5-9463-f04da20055fe
zroot/iocage/jails/829611fe-c8dd-11e5-9463-f04da20055fe/root       3.78G   222M  3.78G  /iocage/jails/829611fe-c8dd-11e5-9463-f04da20055fe/root
zroot/iocage/jails/829611fe-c8dd-11e5-9463-f04da20055fe/root/data   288K   222M   288K  none
zroot/iocage/jails/8df20909-babe-11e5-8dfa-f04da20055fe            3.89G   459G   288K  /iocage/jails/8df20909-babe-11e5-8dfa-f04da20055fe
zroot/iocage/jails/8df20909-babe-11e5-8dfa-f04da20055fe/root       3.89G   459G  3.89G  /iocage/jails/8df20909-babe-11e5-8dfa-f04da20055fe/root
zroot/iocage/jails/8df20909-babe-11e5-8dfa-f04da20055fe/root/data   288K   459G   288K  none
zroot/iocage/jails/c9d50f6c-c382-11e5-8dfa-f04da20055fe            7.55G   459G   288K  /iocage/jails/c9d50f6c-c382-11e5-8dfa-f04da20055fe
zroot/iocage/jails/c9d50f6c-c382-11e5-8dfa-f04da20055fe/root       7.55G   459G  7.55G  /iocage/jails/c9d50f6c-c382-11e5-8dfa-f04da20055fe/root
zroot/iocage/jails/c9d50f6c-c382-11e5-8dfa-f04da20055fe/root/data   288K   459G   288K  none
zroot/iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe            4.50G  4.50G   288K  /iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe
zroot/iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root       4.50G  4.50G  4.50G  /iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root
zroot/iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root/data   288K  4.50G   288K  none
zroot/iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe            3.86G   459G   288K  /iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe
zroot/iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe/root       3.86G   459G  3.86G  /iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe/root
zroot/iocage/jails/ff9c18b2-e4a1-11e5-b3ca-f04da20055fe/root/data   288K   459G   288K  none
zroot/iocage/releases                                              3.44G   459G   288K  /iocage/releases
zroot/iocage/releases/10.2-RELEASE                                 3.44G   459G   288K  /iocage/releases/10.2-RELEASE
zroot/iocage/releases/10.2-RELEASE/root                            3.44G   459G  3.44G  /iocage/releases/10.2-RELEASE/root
zroot/local                                                         484M   459G   267M  /usr/local
zroot/local@b4iocage                                                217M      -   254M  -
zroot/ports                                                        5.45G   459G  4.51G  /usr/ports
zroot/ports@b4iocage                                                950M      -  3.17G  -
zroot/ports/distfiles                                              11.4M   459G  11.2M  /usr/ports/distfiles
zroot/ports/distfiles@b4iocage                                      216K      -  2.97M  -
zroot/ports/packages                                                192K   459G   192K  /usr/ports/packages
zroot/ports/packages@b4iocage                                          0      -   192K  -
zroot/poudriere                                                    3.45G   459G   288K  /zroot/poudriere
zroot/poudriere/jails                                              3.45G   459G   288K  /zroot/poudriere/jails
zroot/poudriere/jails/freebsd_10-2x64                              3.45G   459G  3.45G  /usr/local/poudriere/jails/freebsd_10-2x64
zroot/poudriere/jails/freebsd_10-2x64@clean                        24.0K      -  3.45G  -
zroot/swap                                                         4.13G   463G   192K  -
zroot/swap@b4iocage                                                    0      -   192K  -
zroot/tmp                                                          2.92M   459G  2.73M  /zroot/tmp
zroot/tmp@b4iocage                                                  192K      -   256K  -
zroot/var                                                          12.0M   459G   416K  /zroot/var
zroot/var@b4iocage                                                     0      -   416K  -
zroot/var/db                                                       10.6M   459G  10.4M  /zroot/var/db
zroot/var/db@b4iocage                                                  0      -  10.4M  -
zroot/var/db/pkg                                                    256K   459G   256K  /zroot/var/db/pkg
zroot/var/db/pkg@b4iocage                                              0      -   256K  -
zroot/var/log                                                       256K   459G   256K  /zroot/var/log
zroot/var/log@b4iocage                                                 0      -   256K  -
zroot/var/mail                                                      256K   459G   256K  /zroot/var/mail
zroot/var/mail@b4iocage                                                0      -   256K  -
zroot/var/run                                                       256K   459G   256K  /zroot/var/run
zroot/var/run@b4iocage                                                 0      -   256K  -
zroot/var/tmp                                                       256K   459G   256K  /zroot/var/tmp
zroot/var/tmp@b4iocage                                                 0      -   256K
                                           0      -   256K  -
When I try to unmount zroot/DATA/www/mydomain.co.uk/production using
Code:
zfs unmount /iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root/usr/local/www/production
I get
Code:
cannot unmount '/iocage/jails/dbb40c5a-cdd8-11e5-99af-f04da20055fe/root/usr/local/www/production': not a mountpoint

Could anyone please tell me what I do wrong?
Also, Is there a way to see the content of a dataset? I am worry my data is gone

I was just bitten by the same bug trying to access snapshots in .zfs This is apparently well known. I just tried

Code:
iocage stop myjail

Set the hack88 property to “1”:

Code:
iocage set hack88=1

Start jail:

Code:
iocage start myjail

and I can see the content of the Jail snapshots. But I couldn't for the God's sake see anything after the remote replication on the remote server until I saw this post

Example: Copy an iocage jail from server A to server B.

1) stop the jail you want to copy over and snapshot it.

zfs snapshot -r rpool/iocage/jails/943d33f3-ebf1-11e4-8a0b-00144fcaa900@now

2) host B: start netcat on the remote host B, listening on port 1337 for
30 seconds.

nc -w 30 -l 1337 | zfs receive
rpool/iocage/jails/943d33f3-ebf1-11e4-8a0b-00144fcaa900


3) host A: zfs send the snapshot to host B.

zfs send -R rpool/iocage/jails/943d33f3-ebf1-11e4-8a0b-00144fcaa900@now
| nc my.destination.host 1337

4) host B: Set hostid of the moved jail to the hostid of host B.
(cat /etc/hostid)

"iocage set hostid $HOSTID_OF_HOST_B"
 
Oko, thank you very much for sharing your finding :)
BTW are you still on FreeBSD 10.2 or have you move to 10.3?
If 10.3, how did you do it as iocaeg isn't providing support anymore :(
 
Oko, thank you very much for sharing your finding :)
BTW are you still on FreeBSD 10.2 or have you move to 10.3?
If 10.3, how did you do it as iocaeg isn't providing support anymore :(
I have been using TrueOS/PC-BSD 10.3 after it came out. Somebody forked is still maintaining iocage after 1.7.3 when original author abandoned and it is 1.7.6 now and works as advertised. The bigger problem is that PC-BSD is dead and they are no longer provide quarterly updates.They expect people to move to 12.0 current and test new tools for IXsystems which I can't effort to do on production systems. I have to migrate everything to vanilla 11.00 when it stabilizes.
 
Hi Oko so iocage 1.7.6 should be ok with FreeBSD 10.3?
Do you know where I can find the iocage fork?

Thank you
 
Hi Oko so iocage 1.7.6 should be ok with FreeBSD 10.3?
Do you know where I can find the iocage fork?

Thank you
The website is still the same

https://github.com/iocage/iocage

and owned by the old developers but there are patches. When you install 1.7.6 and if you run
Code:
iocage --version
it will list

Code:
root@backup1:~ # iocage --version
iocage 1.7.4 (2016/02/17)

but don't be fooled it patched 1.7.4 version which is free of import bug.

Code:
root@backup1:/usr/ports/sysutils/iocage # ls
Makefile        distinfo        pkg-descr       pkg-plist       work
root@backup1:/usr/ports/sysutils/iocage # make install clean
===>  Installing for iocage-1.7.6
===>  Checking if iocage already installed
===>   iocage-1.7.6 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of iocage
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/iocage




I tested Jail export, moved the files to another server and did jail import and work as advertised. You could also do jail snapshot then zfs send that snapshot to /zroot/iocage/ and just update hostid with the one you find
in /etc/hostid of the target server and everything will magically work. You might need to fix network interfaces if the target server has different hardware.
 
Looks like iocage still being developed: https://github.com/iocage/iocage/commits/master
But I also did not find anything related to the new implementation. Perhaps the development of a strictly kept secret from the public ;-) Does anyone know anything about this?
I heard rumors at 2016 BSDCan that somebody is taking over the project but I have not seeing any public announcement. I have being discussing this issue with one of the developers as I feel very strongly that iocage have reached sweet spot in the terms of the production usability. Personally I am heavy user of iocage.
 
Back
Top