Date: Tue, 07 Nov 2023 04:48:01 +0000 From: DtxdF <DtxdF@disroot.org> To: freebsd-jail@freebsd.org Subject: =?US-ASCII?Q?Re=3A_I_can_get_zfs_snapshot/rollback_in_a_jail_to_work_?= =?US-ASCII?Q?99=25_but_it_isn=27t_quite_100=25?= =?US-ASCII?Q?_working=2E_What_am_I_missing=3F?= Message-ID: <EC308FD9-A793-4B54-9DBB-8B4E36591961@disroot.org> In-Reply-To: <CAHnbxSSra=JQ0iqne0NBomrexSxu8ar7ZViq7tfKVDsO7vczAg@mail.gmail.com> References: <CAHnbxSRuwGwdB0PULA4LEKTWTJw6oA6VeX_7PL4TMgAv_YS=vw@mail.gmail.com> <A696936B-D83F-4B7B-B037-F51CF47C44A9@disroot.org> <CAHnbxSSra=JQ0iqne0NBomrexSxu8ar7ZViq7tfKVDsO7vczAg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
------QIZC0QV9PW0K46HSTWP6PXS1PWWPCU Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > So as I mentioned I=E2=80=99ve able to mail the dataset=2E It gets mounte= d upon starting the jail=2E It shows up in =E2=80=9Czfs list=E2=80=9D=2E If you can see your dataset with `zfs-list(8)` it does not mean that it is= mounted=2E You should check it using `mount -t zfs` or `zfs mount`=2E > And when I do zfs snapshot on the dataset it appears to create the snaps= hot as it shows up in a =E2=80=9Czfs list -t snapshot=E2=80=9D but the snap= dir isn=E2=80=99t visible even after setting snapdir to visible, and when I= rollback using the snapshot it doesn=E2=80=99t actually rollback=2E You can create snapshots and run `zfs-rollback(8)` even when your dataset = is not mounted and it will not fail=2E --- I have seen your `rc=2Econf(5)` from your jail and it sets `zfs_enable` to= `YES`=2E As I mentioned, it doesn't work at startup and maybe it's a bug= =2E When your jail is started you can run `service zfs start` and it will w= ork=2E That rc script knows it is inside a jail so it just runs `zfs mount = -a` and `zfs umount -a` (when running `service zfs stop`)=2E I don't recommend using that rc script to mount your datasets because when= you run `service zfs stop` it will try to unmount `/` which is an error=2E= As a workaround use the approach I share with you: mount and unmount your = datasets using your `jail=2Econf(5)` (see the AppJail template example)=2E ------QIZC0QV9PW0K46HSTWP6PXS1PWWPCU Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <!DOCTYPE html><html><body><div dir=3D"auto">> So as I mentioned I=E2=80= =99ve able to mail the dataset=2E It gets mounted upon starting the jail=2E= It shows up in =E2=80=9Czfs list=E2=80=9D=2E<br><br>If you can see your da= taset with `zfs-list(8)` it does not mean that it is mounted=2E You should = check it using `mount -t zfs` or `zfs mount`=2E<br><br>> And when I do z= fs snapshot on the dataset it appears to create the snapshot as it shows up= in a =E2=80=9Czfs list -t snapshot=E2=80=9D but the snapdir isn=E2=80=99t = visible even after setting snapdir to visible, and when I rollback using th= e snapshot it doesn=E2=80=99t actually rollback=2E<br><br>You can create sn= apshots and run `zfs-rollback(8)` even when your dataset is not mounted and= it will not fail=2E<hr>I have seen your `rc=2Econf(5)` from your jail and = it sets `zfs_enable` to `YES`=2E As I mentioned, it doesn't work at startup= and maybe it's a bug=2E When your jail is started you can run `service zfs= start` and it will work=2E That rc script knows it is inside a jail so it = just runs `zfs mount -a` and `zfs umount -a` (when running `service zfs sto= p`)=2E<br><br>I don't recommend using that rc script to mount your datasets= because when you run `service zfs stop` it will try to unmount `/` which i= s an error=2E As a workaround use the approach I share with you: mount and = unmount your datasets using your `jail=2Econf(5)` (see the AppJail template= example)=2E</div></body></html> ------QIZC0QV9PW0K46HSTWP6PXS1PWWPCU--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EC308FD9-A793-4B54-9DBB-8B4E36591961>