Re: How to mirror the FreeBSD OS on two disks

2012-07-12 Thread Joseph Lenox

On 07/12/2012 05:47 AM, Mike Clarke wrote:

On Wednesday 11 July 2012 16:20:41 Joseph Lenox wrote:

What about a ZFS root? Just make sure both disks are in the BIOS/EFT
boot order.
http://www.aisecure.net/2011/11/28/root-zfs-freebsd9/

Something else we noticed on our site is that backup of a system
snapshot can be quickly restored using just a live CD (do up to step 5,
then replace steps 6-7 with a zfs receive of the desired snapshot).

Since the system is to be restored from the snapshot then I suppose most of
steps 8 to 12 wouldn't be needed either. But what about step 5 before the
restore:

zpool export zroot
zpool import -o cachefile=/var/tmp/zpool.cache zroot

And then step 10 after running zfs receive

cp /var/tmp/zpool.cache /mnt/boot/zfs/zpool.cache

Are these steps needed when restoring from a snapshot?
I believe preserving the zpool cache is important, but I haven't tested 
not doing so. Logically, the zroot is still new, and the restore from 
snapshot would still populate the cachefile (which would default to 
writing in the live CD's /var/tmp, not the target system's /var/tmp.


Here's my suggested instructions, adapted from 
http://www.aisecure.net/2012/01/16/rootzfs/ and my own experimentation, 
for restoring from a snapshot. It can also be used to clone a system 
configuration from one system to another (very convenient). This is for 
single-drive, just set up a mirror in the initial steps if you are going 
that route.


1. Boot from a FreeBSD9 installation DVD or memstick and choose Live CD.
2. Create the necessary partitions on the disk(s) and add ZFS aware
   boot code.

   gpart create -s gpt ada0

   gpart add -b 34 -s 94 -t freebsd-boot ada0

   gpart add -t freebsd-zfs -l disk0 ada0

   gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0

3. Align the Disks for 4K and create the pool.

   gnop create -S 4096 /dev/gpt/disk0

   zpool create -o altroot=/mnt -o cachefile=/var/tmp/zpool.cache zroot 
/dev/gpt/disk0.nop

   zpool export zroot

   gnop destroy /dev/gpt/disk0.nop

   zpool import -o altroot=/mnt -o cachefile=/var/tmp/zpool.cache zroot

4. Set the bootfs property on zroot.

   zpool set bootfs=zroot zroot

5. Mount the memory stick containing the snapshot. Most memory sticks
   are formatted fat32 or ntfs, and the LiveCD will at least read ntfs.

   mount -t ntfs /da0s1 /media/

 * This assumes that the memory stick is NTFS formatted and it ends
   up as da0 in the system.
6. Receive snapshot.

   gunzip -dc /media/snapshot_name.gz | zfs receive -vF zroot

 * snapshot_name.gz is a placeholder for the actual name of the
   file on the media. I've assumed that the snapshot is gzip'd,
   otherwise cat the snapshot file.
7. Copy zpool.cache (very important!!!)

   cp /var/tmp/zpool.cache /mnt/boot/zfs/zpool.cache

8. If this is a clone of another system, edit pre-existing rc.conf and
   rc.local.conf files to suit new network configuration.
 * Specifically, the hostname and the IP need to change if the new
   system is on the network.
9. Reboot
 * Remember to set the correct boot drive in new system BIOS.


--
--Joseph Lenox, BS, MS
I'm an engineer. I solve problems.

___
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: How to mirror the FreeBSD OS on two disks

2012-07-11 Thread Joseph Lenox
What about a ZFS root? Just make sure both disks are in the BIOS/EFT 
boot order.

http://www.aisecure.net/2011/11/28/root-zfs-freebsd9/

Something else we noticed on our site is that backup of a system 
snapshot can be quickly restored using just a live CD (do up to step 5, 
then replace steps 6-7 with a zfs receive of the desired snapshot).


On 07/11/2012 04:18 AM, miles kuo wrote:

Hi all,

I have two SAS disks for the FreeBSD install. I want to install the freeBSD
on one disk and mirror to another disk. Just like the AIX Mirror.

Any changes will sync between the two disks. And if  one disk crashed or
disconnected, the OS could continue running on another disk.

Does the FreeBSD support the disk mirror? How to implement it?
___
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



--
--Joseph Lenox, BS, MS
I'm an engineer. I solve problems.

___
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: encrypted ZFS root and encrypted swap OOTB?

2012-07-11 Thread Joseph Lenox

On 07/09/2012 06:55 PM, David Christensen wrote:

I wrote:
 
https://www.dan.me.uk/blog/2012/05/06/full-disk-encryption-with-zfs-root-for-freebsd-9-x/



On 07/09/2012 09:43 AM, Colin Barnabas wrote:

Perhaps this will help-
http://www.aisecure.net/2011/11/28/root-zfs-freebsd9/


Thanks for the reply.  :-)


STFW I already found various manual instructions.  I'm looking for 
something easier/ simpler that is built in to the installer, similar 
to Debian and Windows.  It appears FreeBSD doesn't have that feature.
That's because nobody has decided to implement that feature in the 
installer (which was just completely re-done and simplified). If you 
wanted to put something together (using the freebsd-installer source as 
a base) that adds a menu system for queuing up the relevant commands, I 
don't think anyone will complain.


--
--Joseph Lenox, BS, MS
I'm an engineer. I solve problems.

___
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


NFSv4 stronger authentication required error

2012-01-05 Thread Joseph Lenox
I've run into a strange problem while trying to mount from FreeBSD 
9.0-RC3 to anything I can find using NFSv4.


The command I'm using is:

#mount -v gorkon:/dustbin /tmp/test

This returns the following immediate information on a Debian 6 Linux box:
mount: no type was given - I'll assume nfs because of the colon
mount.nfs: timeout set for Thu Jan  5 17:37:40 2012
mount.nfs: trying text-based options 
'vers=4,addr=[serverip],clientaddr=[cllientaddr]'

mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting gorkon:/dustbin

There's no log entry that I can find on the server (gorkon), and the 
following log entry is in my syslog for the debian box:


[30082.224612] RPC: server gorkon requires stronger authentication.

The NFS server has nfsuserd running, rpcbind running. I've tried to set 
the share in /etc/exports to use sec=sys (and connect the same way). I 
don't have Kerberos set up on this network, and I'm not about to start. 
The Debian NFSv4 servers do connect to a Solaris 10 NFSv4 server, and 
the FreeBSD box can't mount its own shares over NFS if I force use of 
nfsv4 (error is mount_nfs: /tmp/test, : Permission denied). A FreeBSD 
8.2-RELEASE box won't mount either, same error.


The Solaris 10 box also cannot mount the FreeBSD box's mount. The error 
for this machine is :


genunix: [ID 664466 kern.notice]  NFS compound failed for server gorkon: 
error 7
genunix: [ID 532867 kern.warning] WARNING: NFS server initial call to 
gorkon failed: permission denied.


NFSv3 mounts work fine.

Anyone know what's going on?
___
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: Pci express ZFS card?

2011-09-23 Thread Joseph Lenox

On 09/21/2011 09:16 AM, Eduardo Morras wrote:


Hi, i have this used pci express industrial card (PCIe 2.0 x4) with 1GB:

http://www.ieiworld.com/product_groups/industrial/content.aspx?gid=1101cid=08141333914287007902id=0A263601401161285688 



I want to install a NanoBSD with ZFS and 3 Sata disks. Unfortunately i 
know nothing about this topic. Does anynone know if this type of cards 
can be connected to a server? Can i access the zfs raidz on it 
througth the pci express interface?


The card documentation says nothing about its use on normal pc as 
expansion card, only on pci express backplanes.


TIA
I would posit that it is only for use as on a PCI Express backplane; I 
don't even see how it would fit in a standard PCI Express slot (seeing 
as the backplane connector is physically longer than the PCI Express 
connector). Moreover, the card itself looks like a system-on-a-board (a 
complete computer system on a single mainboard).


--Joseph Lenox
___
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: FreeBSD 8.1-RELEASE Installation success

2010-10-29 Thread Joseph Lenox

 On 10/25/2010 09:18 PM, Michael D. Norwick wrote:
I have not looked at PC-BSD because I thought the BSD's were all 
somewhat similar (powerful, stable, and secure).  I only moved off of 
Debian due to feature bloat and the 'Fedoraizing' it (debian) is 
experiencing.  Richard Bejtlich talks so highly of FreeBSD in his TAO 
of Network Security Monitoring book.  Anyway, please forgive me for 
not providing more information on the above build issue.  I should 
have been more patient.


I remember seeing that the Debian Project is elevating their 
GNU/kFreeBSD distro set to official for Lenny.


I use FreeBSD for my home server, Debian Lenny for my laptop and our new 
lab machines (running EDA tools)... and am stuck with Solaris for the 
time being. *jedi hand wave* Pay no attention to that Win7 VM--it's just 
there for OneNote 2010.


--Joseph Lenox
___
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: Zpool import failure, metadata checksum fails 8.0-RELEASE

2010-05-21 Thread Joseph Lenox

Update --

Updated to 8.0-STABLE (tagged 8.1-PRERELEASE), zpool is sitting at 
tx-tx state (according to top).


The root cause of this was apparently an enabled write cache on the sata 
controller (an adaptec model, can handle its own RAID5)+inopportune 
power failure; I've disabled it going forward.


I've done some searching through the 'net and haven't found any useful 
info for this type of situation--apparently Solaris just flags the pool 
as having soft errors and the user is expected to move on from there. As 
far as I can tell, the pool MUST be imported to perform any other kind 
of operation on it--you can't even destroy the pool. I don't know if 
recreating the pool from the underlying system destroys the data.


I'm going to leave it for 24 hours and double check to make sure the 
process is truly stuck (although I'm pretty sure it is). The current 
system install is a rebuild on different media--I do have the original 
HDD with the OS install on it, but any attempts to access the pool on 
that drive gives the same symptoms.


--Joseph Lenox

Command:
/sbin/zpool import -p failmode=panic -f valkyrie

PID   username THR PRI NICE SIZE   RES STATE C TIME WCPU COMMAND
 root  1  44   015668K  1936K tx-tx   1  0:00   
0.00%   zpool



/var/log/messages excerpt:

May 21 00:58:31 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd3 offset=494926778368 size=1024
May 21 00:58:31 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd1 offset=494926778368 size=1024
May 21 00:58:31 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd4 offset=494926778368 size=1024
May 21 00:58:31 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd5 offset=494926778368 size=1024
May 21 00:58:31 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd0 offset=494926778880 size=512
May 21 00:58:31 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd2 offset=494926778880 size=512
May 21 00:58:31 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd0 offset=129568120320 size=1024
May 21 00:58:31 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd2 offset=129568120320 size=1024
May 21 00:58:31 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd1 offset=129568120320 size=1024
May 21 00:58:31 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd3 offset=129568120320 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd4 offset=129568120320 size=512
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd5 offset=129568120320 size=512
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd4 offset=289968832000 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd5 offset=289968832000 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd0 offset=289968832512 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd2 offset=289968832512 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd1 offset=289968832512 size=512
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd3 offset=289968832512 size=512
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd3 offset=494926778368 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd1 offset=494926778368 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd4 offset=494926778368 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd5 offset=494926778368 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd0 offset=494926778880 size=512
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd2 offset=494926778880 size=512
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd0 offset=129568120320 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd2 offset=129568120320 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd1 offset=129568120320 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd3 offset=129568120320 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd4 offset=129568120320 size=512
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd5 offset=129568120320 size=512
May 21 00:58:32 silmeria root: ZFS: checksum mismatch, zpool=valkyrie 
path=/dev/aacd4 offset=289968832000 size=1024
May 21 00:58:32 silmeria root: ZFS: checksum mismatch

Zpool import failure, metadata checksum fails 8.0-RELEASE

2010-05-20 Thread Joseph Lenox

Hello, all--

An unexpected powercycle apparently introduced (thanks to my system's 
RAID controller) metadata checksum errors on the system. Attempts to 
import that pool on any system hangs the command (such that it cannot 
even be killed).


I tried pulling out the OpenSolaris (2009.07) cd that I had on-hand, but 
the livecd couldn't find any of the pools in the system--so no help there.


I'm certain a scrub will fix the metadata problems (with or without 
dataloss, the data isn't critical enough to worry about losing a file or 
ten -- losing everything is more of a pain).


Anyone have any ideas for how I can get this pool fixed? I'm working on 
getting 8.0-STABLE sources downloaded (via cvsup) for testing.


--Joseph Lenox
___
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: FreeBSD Version recommend for OLD machine

2010-03-16 Thread Joseph Lenox
I had my fileserver running on a P3-1Ghz with Freebsd-8 for a good long 
while. I eventually replaced it with a dual-socket opteron board I got 
on ebay for something like $50 after shipping (with processors, seller 
was getting rid of 600 or so blades).


I'm pretty sure the auction is still up if anyone cares. The board runs 
great with FBSD 8.0-Release amd64


On 3/16/2010 5:46 PM, Kevin Kinsey wrote:

alexus wrote:
On Tue, Mar 16, 2010 at 3:21 PM, andrew clarke m...@ozzmosis.com 
wrote:
On Fri 2010-03-12 00:16:35 UTC-0500, Steve Bertrand 
(st...@ibctech.ca) wrote:



The machine has a Motherboard that supports 2 double pentium III
processors with 1GB of ram and a hard disk with 40GB.

I run FreeBSD 7.2 on a headless 1 GHz Pentium III with 256 MB RAM.
...


Again... so long as the system won't change its overall process
objectives, go to the recent production release, but instead of
assigning 256M for /, throw 2G at it to be safe.

2 GB for / seems excessive to me.  1 GB should be plenty.  I have 500
MB allocated for FreeBSD 7.2:


i'd go w/ 8.0 worse case scenario 7.2
and put more memory in that machine it's embarassing :)


Bah, it's got more than an iPhone. :-D

KDK


___
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