Re: ZFS mounting order

2012-05-20 Thread Goran Lowkrantz

Hi,

Assuming that you are using some version of diskless (man diskless), I 
build NAS boxes using NanoBSD (man nanobsd) and in that setup, I need to 
move the cache from /boot/zfs to /etc/zfscache so the cache can be mapped 
to the files copied to the cfg partision. So I added the following file to 
rc.d/zpool


---
#!/bin/sh
#
# $FreeBSD: $
#

# PROVIDE: zpool
# REQUIRE: hostid
# BEFORE: zvol
# KEYWORD: nojail

. /etc/rc.subr

name=zpool
rcvar=zfs_enable
start_cmd=zpool_start
required_modules=zfs

zpool_start()
{
   if [ ! -z $zpool_cache -a -r $zpool_cache ]; then
   zpool import -c $zpool_cache -a
   fi
}

load_rc_config $name
run_rc_command $1
---

This works very well for a disk server from USB, CF or mSATA SSD.

I am not sure the BEFORE tag was required to make sure that this is the 
first ZFS related script run, before zvol, as zpool is sorted before zvol 
but I was not sure exactly how rcorder sorts.


/glz

--On Sunday, 20 May, 2012 10:41 AM -0400 Chris Brennan 
li...@xaerolimit.net wrote:



Greetings!

I have a FreeBSD 9 system with 3 different ZFS pools on it. I am
booting from a ro CF Card w/o any major issues, the problem I am
encountering is that zroot needs to be mounted at boot first, because
it contains /usr, zhome and tank contain other various sub-partitions
of /usr.

Also, zroot causes me a lot of problems when I try to do zpool
import, when zpool gets to probing zroot, I get g_vfs errors printed
to the console and the hacnine hangs till I reset it (which is
obviously not acceptable behavior.) I was able to get around this when
booting to my cf card by making / ro, which was my intention all along
for that media.) I suspect this happens because there is a on that
volume that is trying to replace something on / on either the USB boot
img or on my CF card and this might be causing either to freak out.

So I dunno what to do to get this working the way it should and some
guidence would be greatly appreciated!

--

Chris Brennan | http://xaerolimit.net | http://xaerolimit.net/forum
A: Yes.
 Q: Are you sure?
 A: Because it reverses the logical flow of conversation.
 Q: Why is top posting frowned upon?
http://xkcd.com/84/ | http://xkcd.com/149/ | http://xkcd.com/549/
GPG: D5B20C0C (6741 8EE4 6C7D 11FB 8DA8  9E4A EECD 9A84 D5B2 0C0C)


___
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





___
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: foo; no such thing as a dual-nic atom firewall

2010-11-24 Thread Goran Lowkrantz

--On November 23, 2010 17:43:12 -0800 Gary Kline kl...@thought.org wrote:


Maybe someone on-list can help me; after 5+ hours of clicking and
typing, I can't find an atom cpu computer with dual NICs.  I
_thought_ I'd found a computer to replace to Kayak firewall
[pfSense], but nada.

Any wizards on this list have a clue?

--
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service
UnixJourney Toward the Dawn, E-Book: http://www.thought.org
The 7.97a release of Jottings: http://jottings.thought.org



I run pfSense on this
http://www.supermicro.com/products/motherboard/ATOM/ICH9/X7SPE.cfm?typ=HIPMI=Y
in this
http://www.supermicro.com/products/chassis/1U/503/SC503L-200.cfm

- glz
___
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: Problem running custom startup script at proper time

2010-09-19 Thread Goran Lowkrantz
--On Sunday, September 19, 2010 2:39 PM -0700 Aaron drizzt...@gmail.com 
wrote:



Doh! Forgot to reply to the mailing list.


Nope, that didn't work either. Darn. Maybe I'll just have to modify
the /etc/rc.d/zfs script to run the for loop first :(


Do you load zfs.ko in loader.conf? I have built a few NAS systems on 
NanoBSD and found that I had to wait loading zfs until I had go the cache 
file copied from backup storage as I am using the diskless setup.


Could it be that you need to run your script before loading zfs.ko?

Cheers,
Göran



On Sun, Sep 19, 2010 at 14:04, Boris Samorodov b...@ipt.ru wrote:

On Sun, 19 Sep 2010 13:55:41 -0700 Aaron wrote:

On Sun, Sep 19, 2010 at 13:27, Boris Samorodov b...@ipt.ru wrote:
 On Sun, 19 Sep 2010 12:40:52 -0700 Aaron wrote:

 # PROVIDE: gnop

 What if you try PROVIDE: disks instead?



No good. I also tried the following in the gnop script:



# PROVIDE: gnop
# REQUIRE: mountcritlocal
# BEFORE: zfs


/etc/rc.d/geli has this:
-
# PROVIDE: disks
# REQUIRE: initrandom
# KEYWORD: nojail
-

Seems that that should work for you. If not I'm out of ideas
for now.


The services -r looks promising, but the dmesg is still the same :(
 When I disable zfs auto-mount, and then run it manually after boot,
it uses the .nop devices that were created correctly as it should.



EXCERPT services -r
/etc/rc.d/mdconfig
/etc/rc.d/mountcritlocal
/etc/rc.d/gnop
/etc/rc.d/zfs


--
WBR, Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone  Internet SP
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve


___
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





___
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: Backup and FreeBSD/ZFS

2010-02-03 Thread Goran Lowkrantz
I have been using Amanda straight from the port, it supports both tar from 
snapshots if you need to be able to retrieve individual files from the 
backup and zfs send if recovery at filesystem level is OK.


--glz

--On Wednesday, February 03, 2010 11:05 AM +0100 Svein Skogen (Listmail 
Account) svein-listm...@stillbilde.net wrote:



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm currently considering switching my Backend (Running WSS2008
Enterprise) to FreeBSD RELENG_8+zfs, however my last melee with ZFS and
backups to Autoloader (HP 1/8 G2 LTO-3 job) didn't quite turn out in my
favour.

Seems FreeBSD has a decent backup solution for UFS/2 (dump/restore) but
such luxuries where nowhere to be found for ZFS (but the performance was
quite good!).

So, my question is this: Can someone point me to the proper place to
start reading on getting RELENG_8+zfs backed up to tape robotics (or
more specifically: LTO-3 with a HP autoloader)? Will going the
Opensolaris route be easier? (I had hoped to be able to use net/istgt/
from ports, but I guess I could find a different solution to that
problem in Solaris).

Any pointers would really help me here. The storage backend will be on
MFI arrays (set up with redundant striping + automagic weekly
consistency checks of the arrays).

//Svein

- --
- +---+---
  /\   |Svein Skogen   | sv...@d80.iso100.no
  \ /   |Solberg Østli 9| PGP Key:  0xE5E76831
   X|2020 Skedsmokorset | sv...@jernhuset.no
  / \   |Norway | PGP Key:  0xCE96CE13
|   | sv...@stillbilde.net
 ascii  |   | PGP Key:  0x58CD33B6
 ribbon |System Admin   | svein-listm...@stillbilde.net
Campaign|stillbilde.net | PGP Key:  0x22D494A4
+---+---
|msn messenger: | Mobile Phone: +47 907 03 575
|sv...@jernhuset.no | RIPE handle:SS16503-RIPE
- +---+---
 If you really are in a hurry, mail me at
   svein-mob...@stillbilde.net
 This mailbox goes directly to my cellphone and is checked
even when I'm not in front of my computer.
- 
 Picture Gallery:
  https://gallery.stillbilde.net/v/svein/
- 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktpSlIACgkQODUnwSLUlKRvRQCcCKgCzTSCr9PVfyQ9cveGkuUd
xTIAn2IWherBzlLTu/02CBLJMo34Ky2m
=ruSv
-END PGP SIGNATURE-
___
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




... the future isMobile

 Goran Lowkrantz goran.lowkra...@ismobile.com
 System Architect, isMobile, Aurorum 2, S-977 75 Luleå, Sweden
 Phone: +46(0)920-75559
 Mobile: +46(0)70-587 87 82 Fax: +46(0)70-615 87 82

http://www.ismobile.com ...
___
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: Backup and FreeBSD/ZFS

2010-02-03 Thread Goran Lowkrantz
Yes, I have three sets running  that way, my home systems using a Dell 122 
and a 5 rack config at work with a 7x200G Tandberg  and a  48 slot 4U IBM 
beast. All are using the mtx changer scripts that come with Amanda.


-glz

--On Wednesday, February 03, 2010 8:22 PM +0100 Svein Skogen (Listmail 
Account) svein-listm...@stillbilde.net wrote:



-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 03.02.2010 17:41, Goran Lowkrantz wrote:

I have been using Amanda straight from the port, it supports both tar
from snapshots if you need to be able to retrieve individual files from
the backup and zfs send if recovery at filesystem level is OK.



Does Amanda handle splitting a backup over several tapes (and using the
autoloader under FreeBSD?)

//Svein

- --
- +---+---
  /\   |Svein Skogen   | sv...@d80.iso100.no
  \ /   |Solberg Østli 9| PGP Key:  0xE5E76831
   X|2020 Skedsmokorset | sv...@jernhuset.no
  / \   |Norway | PGP Key:  0xCE96CE13
|   | sv...@stillbilde.net
 ascii  |   | PGP Key:  0x58CD33B6
 ribbon |System Admin   | svein-listm...@stillbilde.net
Campaign|stillbilde.net | PGP Key:  0x22D494A4
+---+---
|msn messenger: | Mobile Phone: +47 907 03 575
|sv...@jernhuset.no | RIPE handle:SS16503-RIPE
- +---+---
 If you really are in a hurry, mail me at
   svein-mob...@stillbilde.net
 This mailbox goes directly to my cellphone and is checked
even when I'm not in front of my computer.
- 
 Picture Gallery:
  https://gallery.stillbilde.net/v/svein/
- 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktpzQoACgkQODUnwSLUlKT1KwCgqZjUakGildXBWt4WRF/k6x5b
NPwAn0uMvmseUwXHCpcxAu9uzdQfMhnJ
=hAB3
-END PGP SIGNATURE-
___
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




... the future isMobile

 Goran Lowkrantz goran.lowkra...@ismobile.com
 System Architect, isMobile, Aurorum 2, S-977 75 Luleå, Sweden
 Phone: +46(0)920-75559
 Mobile: +46(0)70-587 87 82 Fax: +46(0)70-615 87 82

http://www.ismobile.com ...
___
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


Bulding release in a jail????

2010-02-02 Thread Goran Lowkrantz
I am trying to get a working release build environment in a jail but it 
fails because the release script needs to mount devfs in the chrooted build 
environment and the md devices used to build the images.


I have set the following syscontrols
vfs.usermount=1
security.jail.mount_allowed=1
security.jail.chflags_allowed=1

but still can't mount inside the jail.

I have tried to make the to jail the chroot filesystem and can mount it 
within the jail (but not umount it???) but still can't mount the md devices 
on this jaild filesystem.


Is it possible to build a release in a jail? What am I missing?

/glz

___
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: Bulding release in a jail????

2010-02-02 Thread Goran Lowkrantz
Well, it's not the jail devfs that's the problem, it's the one that needs 
to be mounted in the jailed release chroot, in my case under 
/usr/jails/release/usr/home/release/8/dev.


The jail devfs is where it should be, /usr/jails/release/dev, that's no 
problem.


/glz


--On February 2, 2010 15:12:24 +0100 Christer Solskogen 
christer.solsko...@gmail.com wrote:



On Tue, Feb 2, 2010 at 2:28 PM, Goran Lowkrantz
goran.lowkra...@ismobile.com wrote:


but still can't mount inside the jail.



Try adding jail_jailname_devfs_enable=YES in rc.conf and restart your
jail.

--
chs,




... the future isMobile

 Goran Lowkrantz goran.lowkra...@ismobile.com
 System Architect, isMobile AB
 Sandviksgatan 81, PO Box 58, S-971 03 Luleå, Sweden
 Mobile: +46(0)70-587 87 82
http://www.ismobile.com ...
___
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