Re: ZFS / Boot Environments / Jails / Upgrading form Source Code

2012-10-19 Thread dweimer

On 2012-10-19 02:48, Shane Ambler wrote:

On 19/10/2012 07:44, dweimer wrote:


First step replace the usr/src within the jail with new source using
 svn, easy enough.  Then start make buildworld... oops, I have a
problem now, the usr/obj/usr stuff is now under
/usr/obj/usr/jails/release91rc2..., However I want it to be under
/usr/jails/release91rc2/usr/obj/usr.


If the jails base dir is /usr/obj/usr/jails/release91rc2 then it can
only access files below that base dir. That is part of the jails 
security.


If your jail is based at /usr/obj/usr/jails/release91rc2 then the 
jail

by default will buildworld into /usr/obj of the jail system which
translates to /usr/obj/usr/jails/release91rc2/usr/obj on the base 
system.


You can adjust the settings within the jail but it will always be
within the release91rc2 dir so you can't use the jail to install into
/usr/jails of the base system.


The base of the Jail, is /usr/jails/release91rc2, however, I did forget 
to mention that I was running the buildworld and buildkernel from the 
base system, with the intent to install using the 
DESTDIR=/usr/jails/release91rc2 command line option




From looking at the usr/src/Makefile  It looks like I need to set 
the

 MAKEOBJDIRPREFIX=/usr/jails/relase91rc2/usr/obj/usr/src/tmp
environment variable, but is that the best solution here? There's
also a /usr/obj/lib32 directory (system is running amd64, I assume
this is for 32 bit libraries), so I would likely need to do 
something

here as well, that I haven't gotten to yet.


lib32 is part of the final system - you don't need to handle it
separately. See man src.conf if you want to turn off the creation of
32bit libs.


Got it, Fine with leaving it there, just wanted to know if there was a 
separate option to define where it ended up.



You can set MAKEOBJDIRPREFIX (default /usr/obj ) to define where the
binary files are made.
You can also set DESTDIR (default is / ) for the installworld step to
define where they get installed.


It appears I went to deep on my definition of the MAKOBJDIRPREFIX, made 
the above path after seeing some output at the start of one of my 
buildworld attempts, which is what led me to believe there would be a 
second choice.



When you start a buildworld or buildkernel the compiled binaries are
stored within MAKEOBJDIRPREFIX. When that is complete the 
installworld

or installkernel steps install the files from MAKEOBJDIRPREFIX into
DESTDIR to create a workable system. That prevents a failed build 
from

destroying part of your running system.

If you want to experiment with different versions then you can also 
try-


mkdir /usr/jails
cd /usr/jails
svn co http://svn0.us-west.FreeBSD.org/base/releng/9.0 9.0-src
cd 9.0-src
set MAKEOBJDIRPREFIX = /usr/jails/9.0-obj
set DESTDIR = /usr/jails/9.0-base
make buildworld && make installworld

cd /usr/jails
svn co http://svn0.us-east.FreeBSD.org/base/releng/9.1 9.1-src
cd 9.1-src
set MAKEOBJDIRPREFIX = /usr/jails/9.1-obj
set DESTDIR = /usr/jails/9.1-base
make buildworld && make installworld


Here was the key information I needed, found several examples searching 
but none stated the MAKEOBJDIRPREFIX=, as you state below they are not 
needed for the running system, guessing most people clean them up 
afterwards so they aren't concerned they don't exist in the same boot 
environment in the end.  I prefer to keep them in the same boot 
environment if possible, just so that if I delete a boot environment I 
know I got rid of everything that belonged to it and don't end up 
uselessly eating up extra disk space.  I do delete the /usr/obj/usr 
directory prior to any rebuild, from old documentation I read when I 
first started doing source upgrades as a method of improving the speed 
of the buildworld.  I am sure those were written for a 32bit system, 
which is why the lib32 directory wasn't included in those instructions.



I know the /usr/obj/usr directory can be deleted after the
installation of the source, does the same go for the /usr/obj/lib32
directory?  if so


Anything in MAKEOBJDIRPREFIX (/usr/obj) can be deleted after you have
installed it, including lib32 which are libs to allow running 32bit
programs on a 64bit system.


Looks like I am on the right path, now time to give it a try with the 
new environment variables, thanks for your help Shane.


If all goes well on this step, only things I have left to figured out 
and test is creating zfs snapshots by hand of volumes outside my boot 
environment, and mounting those read write within the jailed systems 
base so that I can fully test my applications against the latest live 
data without changing the actual data.  Don't expect to have any trouble 
with this one.


And then last of all need to test removing a HD from my Virtual 
Machine, adding a replacement, and rebuilding the mirror, again don't 
expect this to be a problem, just need to work my way through them and 
get the steps down before I am comfortable doing these procedures on a 
system th

Re: ZFS / Boot Environments / Jails / Upgrading form Source Code

2012-10-19 Thread Shane Ambler

On 19/10/2012 07:44, dweimer wrote:


First step replace the usr/src within the jail with new source using
 svn, easy enough.  Then start make buildworld... oops, I have a
problem now, the usr/obj/usr stuff is now under
/usr/obj/usr/jails/release91rc2..., However I want it to be under
/usr/jails/release91rc2/usr/obj/usr.


If the jails base dir is /usr/obj/usr/jails/release91rc2 then it can
only access files below that base dir. That is part of the jails security.

If your jail is based at /usr/obj/usr/jails/release91rc2 then the jail
by default will buildworld into /usr/obj of the jail system which
translates to /usr/obj/usr/jails/release91rc2/usr/obj on the base system.

You can adjust the settings within the jail but it will always be
within the release91rc2 dir so you can't use the jail to install into
/usr/jails of the base system.


From looking at the usr/src/Makefile  It looks like I need to set the
 MAKEOBJDIRPREFIX=/usr/jails/relase91rc2/usr/obj/usr/src/tmp
environment variable, but is that the best solution here? There's
also a /usr/obj/lib32 directory (system is running amd64, I assume
this is for 32 bit libraries), so I would likely need to do something
here as well, that I haven't gotten to yet.


lib32 is part of the final system - you don't need to handle it
separately. See man src.conf if you want to turn off the creation of
32bit libs.

You can set MAKEOBJDIRPREFIX (default /usr/obj ) to define where the
binary files are made.
You can also set DESTDIR (default is / ) for the installworld step to
define where they get installed.

When you start a buildworld or buildkernel the compiled binaries are
stored within MAKEOBJDIRPREFIX. When that is complete the installworld
or installkernel steps install the files from MAKEOBJDIRPREFIX into
DESTDIR to create a workable system. That prevents a failed build from
destroying part of your running system.

If you want to experiment with different versions then you can also try-

mkdir /usr/jails
cd /usr/jails
svn co http://svn0.us-west.FreeBSD.org/base/releng/9.0 9.0-src
cd 9.0-src
set MAKEOBJDIRPREFIX = /usr/jails/9.0-obj
set DESTDIR = /usr/jails/9.0-base
make buildworld && make installworld

cd /usr/jails
svn co http://svn0.us-east.FreeBSD.org/base/releng/9.1 9.1-src
cd 9.1-src
set MAKEOBJDIRPREFIX = /usr/jails/9.1-obj
set DESTDIR = /usr/jails/9.1-base
make buildworld && make installworld


I know the /usr/obj/usr directory can be deleted after the
installation of the source, does the same go for the /usr/obj/lib32
directory?  if so


Anything in MAKEOBJDIRPREFIX (/usr/obj) can be deleted after you have
installed it, including lib32 which are libs to allow running 32bit
programs on a 64bit system.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


ZFS / Boot Environments / Jails / Upgrading form Source Code

2012-10-18 Thread dweimer
I have been playing around with different build layouts etc trying to 
come up with a plan to make updates smoother and more easily recoverable 
if it goes horribly wrong.  I think I have almost figured things out, 
just have a couple things left to figure out, one of which I am hoping 
someone on this list can help em out with, to save me some trial an 
error.


Steps already figured out, mount new boot environment (using 9.1rc2 to 
test with) in /usr/jails/release91rc2, added the necessary settings to 
rc.conf, started jail, so far so good.  I now know I can run the boot 
environment from within the jail, stop the jail and begin the upgrade 
from source.


First step replace the usr/src within the jail with new source using 
svn, easy enough.  Then start make buildworld... oops, I have a problem 
now, the usr/obj/usr stuff is now under 
/usr/obj/usr/jails/release91rc2..., However I want it to be under 
/usr/jails/release91rc2/usr/obj/usr.


From looking at the usr/src/Makefile  It looks like I need to set the 
MAKEOBJDIRPREFIX=/usr/jails/relase91rc2/usr/obj/usr/src/tmp environment 
variable, but is that the best solution here?
There's also a /usr/obj/lib32 directory (system is running amd64, I 
assume this is for 32 bit libraries), so I would likely need to do 
something here as well, that I haven't gotten to yet.


I know the /usr/obj/usr directory can be deleted after the installation 
of the source, does the same go for the /usr/obj/lib32 directory?  if so 
perhaps it is a better option to make a new zfs data set outside the 
boot environments to mount under /usr/obj directory, let the default 
prefixes handle which sub directory to use, and just delete the 
directories when I am done working with the boot environment.


--
Thanks,
   Dean E. Weimer
   http://www.dweimer.net/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-07 Thread vermaden
> Emacs indents it nicely, and colorizes the
> keywords so that it stands out.

Indentification is not a problem, it work both
in geany and vim.

Probably I haven't made clear what I meant ;)

Take a look at this picture:
http://ompldr.org/vZG50bQ

The brackets in that specific section (asd) are
highlighted, other are not, its not possible with
if/then/fi, only the keywords are highlighted,
but they are highlighted for the whole script so ... ;)

With { } I can also (un)fold the section/function,
its not possible with if/then/fi.

Regards,
vermaden
-- 








































...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-07 Thread Randal L. Schwartz
> "vermaden" == vermaden   writes:

>> Good to see you've finally been burned.
>> You'll never make that mistake again. :)

vermaden> I liked that syntax:

vermaden> ASD && {
vermaden>   asd
vermaden> } || {
vermaden>   bsd
vermaden> }

vermaden> mostly because of syntax highlighting, to be precise highlighting
vermaden> of the second bracket of a pair at editors, nor VIM neither GEANY
vermaden> highlight if/then/elif/else/fi unfortunately, seems that I will have
vermaden> to live with that ;p

Emacs indents it nicely, and colorizes the keywords so that it stands out.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-07 Thread vermaden
> Good to see you've finally been burned.
> You'll never make that mistake again. :)

I liked that syntax:

ASD && {
  asd
} || {
  bsd
}

mostly because of syntax highlighting, to be precise highlighting
of the second bracket of a pair at editors, nor VIM neither GEANY
highlight if/then/elif/else/fi unfortunately, seems that I will have
to live with that ;p

> OK, I'll give that a try. Thanks for being persistent with me.

Did it worked?

Regards,
vermaden
--























...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-05 Thread Randal L. Schwartz
>>>>> "vermaden" == vermaden   writes:


vermaden> To the point, check these two code snippets, they should
vermaden> do EXACLY the same, logic is the same, the differece is
vermaden> only the syntax.

vermaden> snippet 1:

vermaden> [ ${MOUNT} -eq 0 ] && {
vermaden>   zfs set mountpoint=${TMPMNT} ${POOL}/ROOT/${2}
vermaden>   zfs mount ${POOL}/ROOT/${2}
vermaden> } || {
vermaden>   TMPMNT=${MOUNT}
vermaden> }

vermaden> snippet 2:

vermaden> if [ ${MOUNT} -eq 0 ]; then
vermaden>   zfs set mountpoint=${TMPMNT} ${POOL}/ROOT/${2}
vermaden>   zfs mount ${POOL}/ROOT/${2}
vermaden> else
vermaden>   TMPMNT=${MOUNT}
vermaden> fi

No, no and no.  I got burned by that about 30 years ago in shell
programming.  Every time I see someone use that, I shriek just a little
bit.

vermaden> ... or to rewrite it under if/then/else which I did for the whole
vermaden> *beadm* utility and I no longer use || and && syntax,
vermaden> anywhere.

Good to see you've finally been burned.  You'll never make that mistake
again. :)

vermaden> After reboot ...

vermaden> # zfs destroy -R zroot/ROOT
vermaden> # zfs create -o mountpoint=none zroot/ROOT
vermaden> # zfs send zpool@be | zfs recv zroot/ROOT/be
vermaden> # fetch https://raw.github.com/vermaden/beadm/master/beadm
vermaden> # chmod +x beadm
vermaden> # ./beadm list
vermaden> # ./beadm activate be
vermaden> # reboot

vermaden> Now You should have a working system with boot environments.

OK, I'll give that a try. Thanks for being persistent with me.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-04 Thread vermaden
> And no difference on 8.3 :(
> 
> Should there have been a "promote" in there somewhere?  It looks like
> the boot env is still dependent on the very old zroot.

Hi,

I have just recreated from scratch Your zroot root
setup under VirtualBox and tested it deeply.

There was an interesting BUG in the *beadm* utility,
or maybe it is a BUG in sh(1), I do not have that
good knowledge of POSIX/sh(1) standards.

To the point, check these two code snippets, they should
do EXACLY the same, logic is the same, the differece is
only the syntax.

snippet 1:

[ ${MOUNT} -eq 0 ] && {
  zfs set mountpoint=${TMPMNT} ${POOL}/ROOT/${2}
  zfs mount ${POOL}/ROOT/${2}
} || {
  TMPMNT=${MOUNT}
}

snippet 2:

if [ ${MOUNT} -eq 0 ]; then
  zfs set mountpoint=${TMPMNT} ${POOL}/ROOT/${2}
  zfs mount ${POOL}/ROOT/${2}
else
  TMPMNT=${MOUNT}
fi

But unfortunately, it comes out that its not the same ...

[ ${MOUNT} -eq 0 ] && {
  zfs set mountpoint=${TMPMNT} ${POOL}/ROOT/${2}
  zfs mount ${POOL}/ROOT/${2}
  # IF THIS LINE ABOVE FAILS (NOT RETURN 0) THEN
  # TMPMNT=${MOUNT} BELOW WILL BE EXECUTED
} || {
  TMPMNT=${MOUNT}
}

The sollution can be put command that will always
work (return 0 on exit) like that:

[ ${MOUNT} -eq 0 ] && {
  zfs set mountpoint=${TMPMNT} ${POOL}/ROOT/${2}
  zfs mount ${POOL}/ROOT/${2}
  echo 1> /dev/null 2> /dev/null
} || {
  TMPMNT=${MOUNT}
}

... or to rewrite it under if/then/else which I did for the whole
*beadm* utility and I no longer use || and && syntax, anywhere.

As for Your problems, this worked for me on this VirtualBox test
environment.

# zfs promote zroot
# zfs rollback zpool@be
# zfs set mountpoint=/mnt zroot
[ set vfs.root.mountfrom="zfs:zroot" in /mnt/boot/loader.conf ]
# zpool set bootfs=zroot zroot
# zfs set mountpoint=none zroot
# reboot

These above should bring back to the start point before
You entered my instructions to try *beadm* and BEs.

After reboot ...

# zfs destroy -R zroot/ROOT
# zfs create -o mountpoint=none zroot/ROOT
# zfs send zpool@be | zfs recv zroot/ROOT/be
# fetch https://raw.github.com/vermaden/beadm/master/beadm
# chmod +x beadm
# ./beadm list
# ./beadm activate be
# reboot

Now You should have a working system with boot environments.

Both GitHub and SourceForce have the latest fixed *beadm* version.

Regards,
vermaden
-- 








































...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-04 Thread Bryan Drewery


On 5/4/2012 5:10 PM, Randal L. Schwartz wrote:
>> "Randal" == Randal L Schwartz  writes:
> 
> Randal> Oh wait, it looks like zroot is still holding 1.04G of data... will
> Randal> that ever go away?  Shouldn't all the data be in the /ROOT/xxx
> Randal> items?
> 
> And worse, the things from the readme don't work:
> 
> locohost# ./beadm create upgrade
> cannot create 'zroot/ROOT/upgrade': invalid property ''
> cannot open 'zroot/ROOT/upgrade': dataset does not exist
> Created successfully
> 
> So, no joy on this yet.
> 
> This is FreeBSD 8.2.
> 
Hi,

Those errors will be fixed in the next release, out in the next day or so.

Still testing it.

If you want to help test, it's out on vermaden's github right now.

An updated port will be available soon as well.

Regards,
Bryan Drewery
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-04 Thread Randal L. Schwartz
> "Randal" == Randal L Schwartz  writes:

Randal> This is FreeBSD 8.2.

And no difference on 8.3 :(

Should there have been a "promote" in there somewhere?  It looks like
the boot env is still dependent on the very old zroot.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-04 Thread Randal L. Schwartz
> "Randal" == Randal L Schwartz  writes:

Randal> Oh wait, it looks like zroot is still holding 1.04G of data... will
Randal> that ever go away?  Shouldn't all the data be in the /ROOT/xxx
Randal> items?

And worse, the things from the readme don't work:

locohost# ./beadm create upgrade
cannot create 'zroot/ROOT/upgrade': invalid property ''
cannot open 'zroot/ROOT/upgrade': dataset does not exist
Created successfully

So, no joy on this yet.

This is FreeBSD 8.2.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-04 Thread Randal L. Schwartz
> "Randal" == Randal L Schwartz  writes:

> "vermaden" == vermaden   writes:
vermaden> # fetch https://github.com/vermaden/beadm/blob/master/beadm

Randal> and after reboot, "zfs set mountpoint=none zroot" would also seem to
Randal> clean that up.

Oh wait, it looks like zroot is still holding 1.04G of data... will
that ever go away?  Shouldn't all the data be in the /ROOT/xxx items?

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-04 Thread Randal L. Schwartz
> "vermaden" == vermaden   writes:

vermaden> # fetch https://github.com/vermaden/beadm/blob/master/beadm

Heh.  That's HTML.  I think you want

fetch https://raw.github.com/vermaden/beadm/master/beadm

vermaden> # chmod +x beadm
vermaden> # ./beadm list
vermaden> # ./beadm activate default
vermaden> # reboot

vermaden> Be sure to use the latest *beadm* from one of these:
vermaden> https://raw.github.com/vermaden/beadm/master/beadm
vermaden> https://sourceforge.net/projects/beadm/

vermaden> Let me know how these instructions work, especially if You got
vermaden> any errors or an unbootable system.

Oh, that worked perfectly, except for an error message during the
create.

and after reboot, "zfs set mountpoint=none zroot" would also seem to
clean that up.

vermaden> It would be best if You would test this zpool root to sys/ROOT/be 
transition under VirtualBox for 100% safety ;)

vermaden> Regards,
vermaden> vermaden
vermaden> -- 








































vermaden> ...
vermaden> ___
vermaden> freebsd-questions@freebsd.org mailing list
vermaden> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
vermaden> To unsubscribe, send any mail to 
"freebsd-questions-unsubscr...@freebsd.org"



-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-04 Thread vermaden
> I have zfs-on-root using the classical documentation (everything under
> zpool, possibly with some sub-mounts, but I've left those out lately).
> 
> Is there a way to transition my system to a form that beadm expects?
> I tried just running it, and it's upset that zpool/ROOT doesn't exist.

Hi,

I would suggest using something like that:

# zfs create -o mountpoint=none zpool/ROOT
# zfs snapshot zpool@be
# zfs clone zpool@be zpool/ROOT/default
# fetch https://github.com/vermaden/beadm/blob/master/beadm
# chmod +x beadm
# ./beadm list
# ./beadm activate default
# reboot

Be sure to use the latest *beadm* from one of these:
https://raw.github.com/vermaden/beadm/master/beadm
https://sourceforge.net/projects/beadm/

Let me know how these instructions work, especially if You got any errors or an 
unbootable system.

It would be best if You would test this zpool root to sys/ROOT/be transition 
under VirtualBox for 100% safety ;)

Regards,
vermaden
-- 








































...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-04 Thread Randal L. Schwartz
>>>>> "vermaden" == vermaden   writes:

vermaden> I have just created new HOWTO [1] on how to use Boot Environments on
vermaden> FreeBSD with new created utility *beadm* that I put on
vermaden> SourceForge [2].

I have zfs-on-root using the classical documentation (everything under
zpool, possibly with some sub-mounts, but I've left those out lately).

Is there a way to transition my system to a form that beadm expects?
I tried just running it, and it's upset that zpool/ROOT doesn't exist.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
 http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-03 Thread vermaden
"Kalle Møller" :
> And I forgot
> 
> If I do a create and destroy, I would assume my system
> was back to same state, but you keep the snapshot
> when I destroy the clone, dont know if its working as
> intended (better safe to keep it than sorry) or you just
> didn't think of it :)

I added automatic deletion of snapshot origins at later
versions, the 0.1 is now in Ports, but at SourceForge [1]
or GitHub [2] there is 0.4 version already, so get the
latest one, test more and let me know how the latest
version works for You ;)

[1] https://sourceforge.net/projects/beadm/
[2] https://github.com/vermaden/beadm

Regards,
vermaden
-- 








































...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-03 Thread vermaden
Hi,

> I just tested your tool the last few days and I must say I love
> it already. Though I can get one of the commands to work
> - might be me or the syntax
> 
> beadm create [-e nonActiveBe | beName@snapshot] beName
> 
> I read it as you can do the following
> 
> beadm create beName@snapshot beName
> 
> Is that correct or is it
> 
> beadm create -e beName@snapshot beName
> 
> Well neither of those seems to work for me, can you give an example of the 
> use?
> 
> Thanks
> Kalle

There are only 3 possible ways:

1. beadm create beName - this will create BE beName from currently booted BE.

2. beadm create -e nonActiveBe beName - this will create BE beName from other 
BE called nonActiveBe

3. beadm create -e beName@snapshot beName - this will create BE beName from 
existing beName@snapshot snapshot

At least these are the same possibilities that beadm(1M) at Illumos/Solaris 
provides.

Hope that helps ;)

Regards,
vermaden

-- 








































...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-02 Thread Kalle Møller
And I forgot

If I do a create and destroy, I would assume my system was back to
same state, but you keep the snapshot when I destroy the clone, dont
know if its working as intended (better safe to keep it than sorry) or
you just didn't think of it :)

http://pastebin.com/XdYZ2eGR

main# zfs list -t all
NAME USED  AVAIL  REFER  MOUNTPOINT
sys 1.45G  6.36G31K  none
sys/ROOT 430M  6.36G31K  none
sys/ROOT/clean   430M  6.36G   430M  legacy
sys/swap1.03G  7.39G16K  -
main# beadm create main
Created successfully
main# zfs list -t all
NAME  USED  AVAIL  REFER  MOUNTPOINT
sys  1.45G  6.36G31K  none
sys/ROOT  430M  6.36G31K  none
sys/ROOT/clean430M  6.36G   430M  legacy
sys/ROOT/clean@main  0  -   430M  -
sys/ROOT/main   1K  6.36G   430M  none
sys/swap 1.03G  7.39G16K  -
main# beadm destroy main
Are you sure you want to destroy 'main'?
This action cannot be undone (y/[n]): y
Destroyed successfully
main# zfs list -t all
NAME  USED  AVAIL  REFER  MOUNTPOINT
sys  1.45G  6.36G31K  none
sys/ROOT  430M  6.36G31K  none
sys/ROOT/clean430M  6.36G   430M  legacy
sys/ROOT/clean@main  0  -   430M  -
sys/swap 1.03G  7.39G16K  -
main#

Kalle


On Wed, May 2, 2012 at 10:10 AM, Kalle Møller
 wrote:
> Hi vermaden
>
> I just tested your tool the last few days and I must say I love it
> already. Though I can get one of the commands to work - might be me or
> the syntax
>
> beadm create [-e nonActiveBe | beName@snapshot] beName
>
> I read it as you can do the following
>
> beadm create beName@snapshot beName
>
> Is that correct or is it
>
> beadm create -e beName@snapshot beName
>
> Well neither of those seems to work for me, can you give an example of the 
> use?
>
> Thanks
>
> Kalle
>
> On Fri, Apr 27, 2012 at 1:08 AM, vermaden  wrote:
>> Hi,
>>
>> I have just created new HOWTO [1] on how to use Boot Environments on
>> FreeBSD with new created utility *beadm* that I put on SourceForge [2].
>>
>> Feel free to send Your ideas/critique about it.
>>
>> [1] http://forums.freebsd.org/showthread.php?t=31662
>> [2] https://sourceforge.net/projects/beadm/
>>
>> Regards,
>> vermaden
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ...
>> ___
>> freebsd-questions@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
>
>
>
> --
>
> Med Venlig Hilsen
>
> Kalle R. Møller



--

Med Venlig Hilsen

Kalle R. Møller
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-05-02 Thread Kalle Møller
Hi vermaden

I just tested your tool the last few days and I must say I love it
already. Though I can get one of the commands to work - might be me or
the syntax

beadm create [-e nonActiveBe | beName@snapshot] beName

I read it as you can do the following

beadm create beName@snapshot beName

Is that correct or is it

beadm create -e beName@snapshot beName

Well neither of those seems to work for me, can you give an example of the use?

Thanks

Kalle

On Fri, Apr 27, 2012 at 1:08 AM, vermaden  wrote:
> Hi,
>
> I have just created new HOWTO [1] on how to use Boot Environments on
> FreeBSD with new created utility *beadm* that I put on SourceForge [2].
>
> Feel free to send Your ideas/critique about it.
>
> [1] http://forums.freebsd.org/showthread.php?t=31662
> [2] https://sourceforge.net/projects/beadm/
>
> Regards,
> vermaden
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ...
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"



-- 

Med Venlig Hilsen

Kalle R. Møller
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-04-27 Thread vermaden
> Hi,
> 
> do you know manageBE? Google for it, it is the first
> hit. This works for me like a charm since about a year.
> 
> Bye,
> Alexander.

Hi,

yes I know and used manageBE for a while, I even mentioned it
in the HOWTO (quote below) but thought that making *beadm*
that is compatible with Illumos/Solaris version would be nice
idea, *beadm* is also more comfortable to use, at least for me.

Mine *beadm* has also a feature to activate BE's from other
machines.
 
> Illumos/Solaris has the beadm(1M) [4] utility and while
> Philipp Wuensche wrote the manageBE script as
> replacement [5], it uses older style used at times when
> OpenSolaris (and SUN) were still having a great time.
> I last couple of days writing an up-to-date replacement for
> FreeBSD compatible beadm utility, and with some tweaks
> from today I just made it available at SourceForge [6] if You
> wish to test it. Currently its about 200 lines long, so it should
> be pretty simple to take a look at it. I tried to make it as
> compatible as possible with the 'upstream' version, along
> with some small improvements, it currently supports basic
> functions like list, create, destroy and activate.

(...)

> There are several subtle differences between mine
> implementation and Philipp's one, he defines and then relies
> upon ZFS property called freebsd:boot-environment=1 for
> each boot environment, I do not set any other additional
> ZFS properties. There is already org.freebsd:swap property
> used for SWAP on FreeBSD, so we may use org.freebsd:be in
> the future, but is just a thought, right now its not used. My
> version also supports activating boot environments received
> with zfs recv command from other systems (it just updates
> appreciate /boot/zfs/zpool.cache file).

Regards,
vermaden





























...

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


HOWTO: FreeBSD ZFS Madness (Boot Environments)

2012-04-26 Thread vermaden
Hi,

I have just created new HOWTO [1] on how to use Boot Environments on
FreeBSD with new created utility *beadm* that I put on SourceForge [2].

Feel free to send Your ideas/critique about it.

[1] http://forums.freebsd.org/showthread.php?t=31662
[2] https://sourceforge.net/projects/beadm/

Regards,
vermaden






































...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Boot Environments

2011-06-30 Thread krad
On 30 June 2011 08:43, Dick Hoogendijk  wrote:

> On solaris you can have different BE's (boot environments) using ZFS.
> Is this possible with FreeBSD ZFS? I can't recall ever have seen a tool
> like BEadm (solaris).
> But maybe using ZFS manually I can get more BE's?
> __**_
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions<http://lists.freebsd.org/mailman/listinfo/freebsd-questions>
> To unsubscribe, send any mail to "freebsd-questions-**
> unsubscr...@freebsd.org "
>

 im not aware of any specific tools to do it but i have mimicked opensolaris
be's on my bsd machines. After all most of it is just monkeying around with
zfs fs cloning and setting the DESTDIR variable when you install updates
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Boot Environments

2011-06-30 Thread Dick Hoogendijk

On solaris you can have different BE's (boot environments) using ZFS.
Is this possible with FreeBSD ZFS? I can't recall ever have seen a tool 
like BEadm (solaris).

But maybe using ZFS manually I can get more BE's?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"