Setting a different default source address

2008-10-30 Thread Chris Hastie
Is it possible to set a default source address on a machine?

I have an ADSL connection with a fixed IP and a further /29 routed to
it. Until recently I used an ADSL router which acquired the connection
IP, and then the first of the /29 on the internal interface.

In an effort to conserve both IPs and the number of machines I have
running I have recently changed to using an ADSL modem (Vigor Draytek
110) which essentially does no more than change the PPPoA to PPPoE. A
FreeBSD machine then handles the connection using ppp.

The machine in question has always used one of the /29 addresses, and
continues to do so (this is assigned to its DMZ facing NIC, vr0). Now,
of course, outgoing packets are using the connection address, which is
assigned to tun0.

Whilst I can override this on an application by application basis for
many things (eg postfix smtp_bind_address parameter, ping -S switch) is
there any way to override it system wide, so that the address from the
/29 is used by default?

I think I succeeded in doing something similar for an IPv6 tunnel by not
assigning an IP address to gif0 and configuring the routing as follows
in rc.conf:

ipv6_defaultrouter=-interface gif0

But I'm not clear whether this would work with ppp, and if so, how to do it.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mysql and BIND 9.4.2

2008-08-12 Thread Chris Hastie
On 11/08/08 23:23, Johnson, James wrote:
 Thanks Chris, I'll look into this. Have you or anyone you know ever set
 something like this before? What I'm trying to do is replace our name
 servers, they will be Virtualized.


   

I have several nameservers running from a replicated MySQL database, on
both Ubuntu and FreeBSD, and in the past on Debian. It's not really a
FreeBSD issue this, so you might be better off with the bind-dlz-testers
mailing list (http://bind-dlz.sourceforge.net/mailing_list.html).
There's a good deal of information on configuring bind-dlz on the
bind-dlz site, and a good deal of information on configuring replication
in MySQL on the MySQL site. Here are a few pointers from my experience:

Like any database project, spend some time thinking carefully about your
database schema before you start. As I recall, the examples on the
bind-dlz site place SOA records and other RRs in the same table. I
prefer to separate these out, eg

--
-- Table structure for table `dns_rr`
--

CREATE TABLE `dns_rr` (
  `rr_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `zone` varchar(255) NOT NULL DEFAULT '',
  `host` varchar(255) NOT NULL DEFAULT '@',
  `ttl` mediumint(8) unsigned NOT NULL DEFAULT '86400',
  `rr_type` enum('A','','MX','PTR','NS','TXT','CNAME','RP','SRV')
NOT NULL DEFAULT 'A',
  `mx_priority` smallint(5) unsigned DEFAULT NULL,
  `rr_data` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`rr_id`),
  KEY `zone` (`zone`),
  KEY `zone_host` (`zone`(250),`host`(250)),
  KEY `rr_type` (`rr_type`),
  KEY `zone_host_type` (`zone`(245),`host`(245),`rr_type`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1;

-- 

--
-- Table structure for table `dns_soa`
--

CREATE TABLE `dns_soa` (
  `zone` varchar(255) NOT NULL DEFAULT '',
  `ttl` mediumint(8) unsigned NOT NULL DEFAULT '86400',
  `primary_ns` varchar(255) NOT NULL DEFAULT 'ns0.example.com.',
  `resp_person` varchar(255) DEFAULT 'hostmaster',
  `serial` bigint(20) unsigned DEFAULT '1',
  `refresh` mediumint(8) unsigned DEFAULT '3600',
  `retry` mediumint(8) unsigned DEFAULT '600',
  `expire` int(10) unsigned DEFAULT '2419200',
  `minimum` mediumint(8) unsigned DEFAULT '1800',
  `owner` varchar(30) NOT NULL DEFAULT '',
  `active` enum('yes','no') NOT NULL DEFAULT 'no',
  PRIMARY KEY (`zone`),
  KEY `owner` (`owner`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

If you plan on running bind chroot bear in mind that if you connect to
MySQL with a unix socket, you need the socket to be in the chroot. An
alternative, with slightly more overhead, is to connect with TCP. But
don't forget that if you specify the host as 'localhost' the mysql
client will try to use unix sockets - you need to specify it as
127.0.0.1 to force TCP.

Spend some time tuning MySQL. In particular, make sure the query cache
is adequate. Query responses are quite small, so I've found reducing
query_cache_min_res_unit to 1k useful.

It may be worth considering running a separate instance of MySQL just
for bind so that it can be tuned to that specific purpose and the query
cache isn't filled with non bind related queries. Bear in mind that
storing your zone data in MySQL is considerably slower than bind's
default in memory system, so on a busy system you need to get every
ounce of performance out of MySQL.

Don't use a bind-dlz installation as a caching nameserver. Apart from
the usual reasons to keep caching resolvers and authoritative name
servers apart, firing recursive queries at bind massively increases the
number of sql queries - bind-dlz will have to execute queries in order
to work out that it is not authoritative for the requested domain. All
these queries on random domains will fill MySQL's query cache with stuff
that might not be asked again and you'll see a reduction in query cache
hit rate.

HTH

-- 
Chris Hastie
Find tree care advice at http://www.tree-care.info/


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Monitoring raid health with mpt

2008-08-11 Thread Chris Hastie
I have a Dell PowerEdge 860 with SAS 5iR RAID controller and FreeBSD
6.2. The controller is configured for RAID 1. The controller is
recognised as mpt0 and seen as a SCSI device da0. All seems to be
working fine, but is there any way to tell if one of the disks fails?
Lots of searching has suggested that most people reckon 'no', but some
reckon sysctl -a | grep nonoptimal_volumes should come up with something
useful. I've had a poke around in the source, which is probably
pointless since my knowledge of C is next to zilch. But it looks like a
number of sysctl oids are defined in mpt_raid.c: vol_member_wce,
vol_queue_depth, vol_resync_rate and nonoptimal_volumes. I see none of
these, just a couple from mpt.c:

paddington# sysctl dev.mpt.0
dev.mpt.0.%desc: LSILogic SAS/SATA Adapter
dev.mpt.0.%driver: mpt
dev.mpt.0.%location: slot=8 function=0
dev.mpt.0.%pnpinfo: vendor=0x1000 device=0x0054 subvendor=0x1028
subdevice=0x1f09 class=0x01
dev.mpt.0.%parent: pci2
dev.mpt.0.debug: 3
dev.mpt.0.role: 1

Should I expect to see some other values? Will the nonoptimal_volumes
value turn up if a drive fails? Or will I see some messages in syslog?
Anything that will give me some notice of a failed drive would help -
the machine is colocated so keeping an eye open for flashing LEDs isn't
really an option :(

This is the relevant bit of demesg:

mpt0: LSILogic SAS/SATA Adapter port 0xec00-0xecff mem
0xfe9fc000-0xfe9f,0xfe9e-0xfe9e irq 16 at device 8.0 on pci2
mpt0: [GIANT-LOCKED]
mpt0: MPI Version=1.5.13.0
mpt0: mpt_cam_event: 0x16
mpt0: Unhandled Event Notify Frame. Event 0x16 (ACK not required).
mpt0: mpt_cam_event: 0x12
mpt0: Unhandled Event Notify Frame. Event 0x12 (ACK not required).
mpt0: mpt_cam_event: 0x12
mpt0: Unhandled Event Notify Frame. Event 0x12 (ACK not required).
mpt0: mpt_cam_event: 0x16
mpt0: Unhandled Event Notify Frame. Event 0x16 (ACK not required).
mpt0: mpt_cam_event: 0xb
mpt0: Unhandled Event Notify Frame. Event 0xb (ACK not required).

da0 at mpt0 bus 0 target 0 lun 0
da0: Dell VIRTUAL DISK 1028 Fixed Direct Access SCSI-5 device
da0: 300.000MB/s transfers, Tagged Queueing Enabled
da0: 237464MB (486326272 512 byte sectors: 255H 63S/T 30272C)
Trying to mount root from ufs:/dev/da0s1a



-- 
Chris Hastie
Find tree care advice at http://www.tree-care.info/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: mysql and BIND 9.4.2

2008-08-11 Thread Chris Hastie
On 11/08/08 19:17, Johnson, James wrote:
 Does any know how to make mysql and BIND work together.

  
   

Configure bind with --with-dlz-mysql. I seem to recall that using
--disable-threads is also recommended with MySql. Lots of info at
http://bind-dlz.sourceforge.net/

There is an issue with bind giving up if the MySQL server goes away,
which is helped by this patch:

--- contrib/dlz/drivers/dlz_mysql_driver.c.orig 2007-11-15
09:08:05.0 +
+++ contrib/dlz/drivers/dlz_mysql_driver.c  2007-11-15
09:10:49.0 +
@@ -923,6 +923,13 @@
pass = getParameterValue(argv[1], pass=);
socket = getParameterValue(argv[1], socket=);

+if(mysql_options((MYSQL *) dbi-dbconn, MYSQL_OPT_RECONNECT,1)) {
+   isc_log_write(dns_lctx, DNS_LOGCATEGORY_DATABASE,
+ DNS_LOGMODULE_DLZ, ISC_LOG_ERROR,
+ Could not set database reconnect option);
+}
+
+
for (j=0; dbc == NULL  j  4; j++)
dbc = mysql_real_connect((MYSQL *) dbi-dbconn, host,
 user, pass, dbname, port, socket,


-- Chris Hastie Find tree care advice at http://www.tree-care.info/

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Xerox Phaser 6110 printer

2008-08-11 Thread Chris Hastie
On 11/08/08 17:33, Mike Clarke wrote:
 Does anybody have a Xerox Phaser 6110 printer working with FreeBSD? My 
 current inkjet is on it's last legs and the 6110 looks like a good deal 
 at only 90 GBP for a colour laser. It's listed in the OpenPrinting 
 database as working mostly but I'm not sure if that applies to 
 FreeBSD as well as Unix and how good mostly is.

   

I've never had any trouble with my 6120, but I guess the crucial
difference is the PostScript support in the 6120.


-- 
Chris Hastie
Find tree care advice at http://www.tree-care.info/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Cleaning data off a remote machine

2008-07-28 Thread Chris Hastie
I'm about to give up a FreeBSD dedicated server and would like to make sure I
don't inadvertantly leave any bits of sensitive data on it. What is the best
way to remove all data from the hard drive? I have no problem if this removes
the OS along the way, but ideally I would like to be able to do what ever I do
from an SSH session. If there's no alternative I can arange KVMoIP console
access.

Thanks

-- 
Chris Hastie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Which version with a Xeon X3210

2007-11-04 Thread Chris Hastie
I've just ordered a new server based on the Intel Xeon X3210. This is a
quad core processor supporting the Intel 64 (formerly known as IntelĀ®
EM64T, according to the flyer) instruction set.

I plan to install FreeBSD 6.2 on it, but I'm not clear whether I should
be using the AMD64 version or the x86 version.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: USB mass storage woes

2006-11-16 Thread Chris Hastie

On Wed, 15 Nov 2006, Chris Hastie [EMAIL PROTECTED] wrote

But with the WD drive I see only one line:

umass0: Western Digital External HDD, rev 2.00/6.02, addr 2


Well it appears that I have solved this problem by recompiling the 
kernel with


device  ehci

It could, of course, be that I left the drive plugged in when I rebooted 
after compiling and it works OK as long as it is there at boot time. But 
I can unplug and replug it at will now.


So I hit another problem, which I'll raise in another post...
--
Chris Hastie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Big external drives - which filesystem?

2006-11-16 Thread Chris Hastie
I've just acquired a Western Digital 200GB USB 2 external HDD. After 
some initial glitches my FreeBSD 5.4-RELEASE machine seems to recognise 
it fine.


It comes pre-formatted with a single FAT32 file system (although 
confusingly there is a note in the manual about FAT32 not supporting 
partitions 32 GB and suggesting you change it to NTFS).


Attempting to mount this hits the mountmsdosfs(); disk too big, sorry 
problem.


The primary intended use for this drive is for off-site backups, but it 
would be useful if it was formatted such that I can easily plug it into 
Windows boxes to get at files occasionally. What are my best options for 
achieving this?


The MSDOSFS_LARGE kernel option seems to come with a lot of warnings and 
caveats. Is it really as ropey as it sounds? Is NTFS an option? Or would 
I be better partitioning the drive into two FAT32 partitions of  128GB 
each? If I go down that route how does this appear to FreeBSD - 
presumably as different slices on da0 which are mounted separately? Or 
am I just asking for trouble using these filesystems and should just 
stick to ufs2 and abandon any plans to maintain compatibility with 
windows machines?


Thanks for your help.
--
Chris Hastie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


USB mass storage woes

2006-11-15 Thread Chris Hastie

Hi

I've just bought a Western Digital 200GB USB hard drive that I would 
like to connect to my FreeBSD 5.4-RELEASE system. However, when I 
connect it I don't get a device which I can mount. I have a 1GB flash 
drive that works fine - giving this on the console on connection.


umass0: cnmemory-drive cnmemory, rev 2.00/2.00, addr 2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: cnmemory cnmemory 6.51 Removable Direct Access SCSI-0 device
da0: 1.000MB/s transfers
da0: 953MB (1952767 512 byte sectors: 64H 32S/T 953C)

But with the WD drive I see only one line:

umass0: Western Digital External HDD, rev 2.00/6.02, addr 2

camcontrol devlist returns nothing, though camcontrol devlist -v gives:

ash# camcontrol devlist -v
scbus0 on umass-sim0 bus 0:
scbus-1 on xpt0 bus 0:
 at scbus-1 target -1 lun -1 (xpt0)

The SCSI and USB parts of my kernel config are, I think, straight from 
the GENERIC:


# SCSI peripherals
device  scbus   # SCSI bus (required for SCSI)
device  ch  # SCSI media changers
device  da  # Direct Access (disks)
device  sa  # Sequential Access (tape etc)
device  cd  # CD
device  pass# Passthrough device (direct SCSI access)
device  ses # SCSI Environmental Services (and SAF-TE)

# USB support
device  uhci# UHCI PCI-USB interface
device  ohci# OHCI PCI-USB interface
#device  ehci# EHCI PCI-USB interface (USB 2.0)
device  usb # USB Bus (required)
#device udbp# USB Double Bulk Pipe devices
device  ugen# Generic
device  uhid# Human Interface Devices
device  ukbd# Keyboard
device  ulpt# Printer
device  umass   # Disks/Mass storage - Requires scbus and da
device  ums # Mouse
device  urio# Diamond Rio 500 MP3 player
device  uscanner# Scanners

Has anyone any suggestions as to how to get this to work?
--
Chris Hastie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


PCI card not recognised

2006-05-19 Thread Chris Hastie
I've just received an OEM Wildcard X100P FXO card. Installing into my 
FreeBSD 5.4-RELEASE box it doesn't appear to be recognised at all. Since 
it's the first time I've put a PCI card in this machine I've just 
dropped a Netgear ethernet card in to make sure there isn't something 
fundamentally wrong with the motherboard, but that works fine.


Is there anything else I should check / try before assuming the X100P is 
faulty?


Output of pciconf -l -v below (after the Netgear card went back to where 
it belongs):


[EMAIL PROTECTED]:0:0:  class=0x06 card=0x31161106 chip=0x31161106 rev=0x00 
hdr=0x00
vendor   = 'VIA Technologies Inc'
device   = 'VT8375 ProSavageDDR PM266/KM266 CPU to PCI Bridge'
class= bridge
subclass = HOST-PCI
[EMAIL PROTECTED]:1:0: class=0x060400 card=0x0080 chip=0xb0911106 rev=0x00 
hdr=0x01
vendor   = 'VIA Technologies Inc'
device   = 'VT8633 Apollo Pro 266 CPU to AGP Controller'
class= bridge
subclass = PCI-PCI
[EMAIL PROTECTED]:16:0:class=0x0c0300 card=0x30381106 chip=0x30381106 
rev=0x80 hdr=0x00
vendor   = 'VIA Technologies Inc'
device   = 'VT82x UHCI USB 1.1 Controller (All VIA Chipsets)'
class= serial bus
subclass = USB
[EMAIL PROTECTED]:16:1:class=0x0c0300 card=0x30381106 chip=0x30381106 
rev=0x80 hdr=0x00
vendor   = 'VIA Technologies Inc'
device   = 'VT82x UHCI USB 1.1 Controller (All VIA Chipsets)'
class= serial bus
subclass = USB
[EMAIL PROTECTED]:16:2:class=0x0c0300 card=0x30381106 chip=0x30381106 
rev=0x80 hdr=0x00
vendor   = 'VIA Technologies Inc'
device   = 'VT82x UHCI USB 1.1 Controller (All VIA Chipsets)'
class= serial bus
subclass = USB
[EMAIL PROTECTED]:16:3:class=0x0c0320 card=0x73801462 chip=0x31041106 
rev=0x82 hdr=0x00
vendor   = 'VIA Technologies Inc'
device   = 'VT6202 USB 2.0 Enhanced Host Controller'
class= serial bus
subclass = USB
[EMAIL PROTECTED]:17:0:class=0x060100 card=0x31771106 chip=0x31771106 
rev=0x00 hdr=0x00
vendor   = 'VIA Technologies Inc'
device   = 'VT8235 PCI to ISA Bridge'
class= bridge
subclass = PCI-ISA
[EMAIL PROTECTED]:17:1:  class=0x01018a card=0x73801462 chip=0x05711106 
rev=0x06 hdr=0x00
vendor   = 'VIA Technologies Inc'
device   = 'VT82 EIDE Controller (All VIA Chipsets)'
class= mass storage
subclass = ATA
[EMAIL PROTECTED]:17:5:class=0x040100 card=0x73801462 chip=0x30591106 
rev=0x50 hdr=0x00
vendor   = 'VIA Technologies Inc'
device   = 'VT8233/33A/8235/8237 AC97 Enhanced Audio Controller'
class= multimedia
subclass = audio
[EMAIL PROTECTED]:18:0:  class=0x02 card=0x738c1462 chip=0x30651106 
rev=0x74 hdr=0x00
vendor   = 'VIA Technologies Inc'
device   = 'VT6102 Rhine II PCI Fast Ethernet Controller'
class= network
subclass = ethernet
[EMAIL PROTECTED]:0:0: class=0x03 card=0x73891462 chip=0x8d045333 rev=0x00 
hdr=0x00
vendor   = 'S3 Graphics Co., Ltd.'
device   = '86C420 ProSavage DDR'
class= display
subclass = VGA

--
Chris Hastie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [Fwd: Re: Problems with Postfix port]

2006-04-20 Thread Chris Hastie

On Wed, 19 Apr 2006, Marcus Alves Grando [EMAIL PROTECTED] wrote:


It's a known problem.

Use mail/postfix-policyd-spf instead of SPF patch.



Probably be good if the SPF option wasn't available in mail/postfix then :)

Ironically, I don't need the SPF patch because I do SPF lookups, amongst many
other things, in a home spun policy daemon. But including it caused spawn to
fail meaning I couldn't run that policy daemon.


Paul Schmehl wrote:

I'm forwarding this to the ports list.  Obviously someone needs to look
in to the libspfs port and fix the problem with it.

 Original Message 
Subject: Re: Problems with Postfix port
Date: Wed, 19 Apr 2006 20:57:55 +0100
From: Chris Hastie [EMAIL PROTECTED]
To: freebsd-questions@freebsd.org
References: [EMAIL PROTECTED]
[EMAIL PROTECTED] [EMAIL PROTECTED]

On Wed, 19 Apr 2006, Paul Schmehl [EMAIL PROTECTED] wrote

Kevin Kinsey wrote:

To build Postfix on FreeBSD you MUST USE the FreeBSD
getopt() system routine, not the GNU version.

Is this likely to be the case if I installed from the port? If so,
how  do I get
around it? And any suggestions about spawn?

Thanks


 It doesn't seem likely to me that this is the problem,


To me either.  I ran into a problem a while back with Postfix, and
that's the same answer they gave me.  It turned out to be a problem
with SPF.  Once I deselected that, postfix compiled fine.


Ah, I think they are connected. I had a response off list that suggested
adding -DPREPEND_PLUS_TO_OPTSTRING to  MAKEFILEFLAGS in the postfix
makefile. A google on this led me to a suggestion from Wietse that this
hack is unnecessary and Perhaps you linked Postfix with some
third-party library (SSL? SASL? SQL?) that includes its own
brain-damaged getopt() routine.

Digging a bit deeper, I spotted a suggestion that SPF might be that
third-party library, so recompiled without that option and bingo! It all
works again.


--
Marcus Alves Grando
marcus(at)corp.grupos.com.br  |  Grupos Internet S/A
  mnag(at)FreeBSD.org |  FreeBSD.org
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]





--
Chris Hastie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Problems with Postfix port

2006-04-19 Thread Chris Hastie
Yesterday I upgraded a 5.1 system to 5.4. I then cvsuped the ports tree and
rebuilt Postfix from mail/postfix.

I am having problems with spawn and pipe. Spawn complains

postfix/spawn[36315]: fatal: unknown user name: nobody

although nobody is a user on the system. Changing the the user in master.cf does
not improve things.

Pipe complains

postfix/pipe[38272]: fatal: invalid option: ?

I've asked the question on the postfix-users list, and with respect to the pipe
problem Wietse has responded:

 postfix/pipe[38272]: fatal: invalid option: ?

You built Postfix with the GNU version of the getopt()
system routine. That version is not compatible with
the FreeBSD getopt() system routine.

To build Postfix on FreeBSD you MUST USE the FreeBSD
getopt() system routine, not the GNU version.

Is this likely to be the case if I installed from the port? If so, how do I get
around it? And any suggestions about spawn?

Thanks
-- 
Chris Hastie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problems with Postfix port

2006-04-19 Thread Chris Hastie

On Wed, 19 Apr 2006, Kevin Kinsey [EMAIL PROTECTED] wrote:


Chris Hastie wrote:


Yesterday I upgraded a 5.1 system to 5.4. I then cvsuped the ports tree and
rebuilt Postfix from mail/postfix.

I am having problems with spawn and pipe. Spawn complains

postfix/spawn[36315]: fatal: unknown user name: nobody

Pipe complains

postfix/pipe[38272]: fatal: invalid option: ?

I've asked the question on the postfix-users list, and with respect 
to the pipe

problem Wietse has responded:

 postfix/pipe[38272]: fatal: invalid option: ?

You built Postfix with the GNU version of the getopt()
system routine. That version is not compatible with
the FreeBSD getopt() system routine.



It doesn't seem likely to me that this is the problem,
unless one of a couple of things has occurred:  one
would be that the port maintainer has written a broken
Makefile or made some related error, and the other that
FreeBSD's getopt() has changed in some way.  Neither
of these seems too likely, either.

However, systems do change, and it's a long, long way
from 5.1 to 5.4.  Did you carefully read /usr/src/UPDATING?
/usr/ports/UPDATING?


I did my best to read through /usr/src/UPDATING, but as you say, it's a long
long way from 5.1 to 5.4, so there's an awful lot to take in. I confess I
haven't looked at /usr/ports/UPDATING, but will.


It might be wise to use portupgrade -rR or something
similar to update PostFix, or, if this isn't a production box,
uninstall and reinstall the port (though that seems too
Microsoftie to me)


Sounds like what I did. make. make deinstall. make reinstall.

The getopt thing doesn't seem to explain the problem with spawn, since it
reports the username it doesn't recognise in the error, suggesting that it did
at least understand the arguments passed.

--
Chris Hastie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Problems with Postfix port

2006-04-19 Thread Chris Hastie

On Wed, 19 Apr 2006, Paul Schmehl [EMAIL PROTECTED] wrote

Kevin Kinsey wrote:

To build Postfix on FreeBSD you MUST USE the FreeBSD
getopt() system routine, not the GNU version.

Is this likely to be the case if I installed from the port? If so, 
how  do I get

around it? And any suggestions about spawn?

Thanks


 It doesn't seem likely to me that this is the problem,


To me either.  I ran into a problem a while back with Postfix, and 
that's the same answer they gave me.  It turned out to be a problem 
with SPF.  Once I deselected that, postfix compiled fine.


Ah, I think they are connected. I had a response off list that suggested 
adding -DPREPEND_PLUS_TO_OPTSTRING to  MAKEFILEFLAGS in the postfix 
makefile. A google on this led me to a suggestion from Wietse that this 
hack is unnecessary and Perhaps you linked Postfix with some 
third-party library (SSL? SASL? SQL?) that includes its own 
brain-damaged getopt() routine.


Digging a bit deeper, I spotted a suggestion that SPF might be that 
third-party library, so recompiled without that option and bingo! It all 
works again.

--
Chris Hastie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Vinum and upgrading from 5.1-RELEASE

2006-04-13 Thread Chris Hastie
I tried to upgrade from 5.1-RELEASE to 5_RELENG last night and hit big
problems with vinum. 5_RELENG in retrospect was an error I suspect, as
what I really wanted was 5.4-RELEASE.

The system has two mirrored disks, with Vinum used for the root
filesystem. make buildworld, make buildkernel and make installkernel
happened without complaint. But on rebooting vinum loaded, but failed to
load any volumes. Consequently the root filesystem didn't mount.

I ended up manually mounting ad0s1a, then in a desperate attempt to get
out of the situation

mount -u -w /
mount /dev/ad2s1a /root
cd /boot
mv kernel kernel.55
mv kernel.old kernel
cd /root/boot
mv kernel kernel.55
mv kernel.old kernel
reboot

To my surprise and relief this worked and I managed to get more or less
back to where I started.

But what do I need to do now to upgrade this system and have it actually
work?

For info, output of vinum dumpconfig below:

Drive chaucer:  Device /dev/ad0s1h
Created on xxx at Mon Sep 29 21:14:13 2003
Config last updated Thu Apr 13 07:59:46 2006
Size:  58946229760 bytes (56215 MB)
volume rootvol state up
volume varvol state up
volume tempvol state up
volume usrvol state up
plex name rootvol.p0 state up org concat vol rootvol
plex name rootvol.p1 state up org concat vol rootvol
plex name varvol.p0 state up org concat vol varvol
plex name varvol.p1 state up org concat vol varvol
plex name tempvol.p0 state up org concat vol tempvol
plex name tempvol.p1 state up org concat vol tempvol
plex name usrvol.p0 state up org concat vol usrvol
plex name usrvol.p1 state up org concat vol usrvol
sd name rootvol.p0.s0 drive shakespeare len 524288s driveoffset 265s state up 
plex rootvol.p0 plexoffset 0s
sd name rootvol.p1.s0 drive chaucer len 524288s driveoffset 265s state up plex 
rootvol.p1 plexoffset 0s
sd name varvol.p0.s0 drive shakespeare len 31457280s driveoffset 524553s state 
up plex varvol.p0 plexoffset 0s
sd name varvol.p1.s0 drive chaucer len 31457280s driveoffset 524553s state up 
plex varvol.p1 plexoffset 0s
sd name tempvol.p0.s0 drive shakespeare len 1048576s driveoffset 31981833s 
state up plex tempvol.p0 plexoffset 0s
sd name tempvol.p1.s0 drive chaucer len 1048576s driveoffset 31981833s state up 
plex tempvol.p1 plexoffset 0s
sd name usrvol.p0.s0 drive shakespeare len 82098946s driveoffset 33030409s 
state up plex usrvol.p0 plexoffset 0s
sd name usrvol.p1.s0 drive chaucer len 82098946s driveoffset 33030409s state up 
plex usrvol.p1 plexoffset 0s

Drive /dev/ad0s1h: 54 GB (58946229760 bytes)
Drive shakespeare:  Device /dev/ad2s1h
Created on xxx at Mon Sep 29 21:14:13 2003
Config last updated Thu Apr 13 07:59:46 2006
Size:  58946229760 bytes (56215 MB)
volume rootvol state up
volume varvol state up
volume tempvol state up
volume usrvol state up
plex name rootvol.p0 state up org concat vol rootvol
plex name rootvol.p1 state up org concat vol rootvol
plex name varvol.p0 state up org concat vol varvol
plex name varvol.p1 state up org concat vol varvol
plex name tempvol.p0 state up org concat vol tempvol
plex name tempvol.p1 state up org concat vol tempvol
plex name usrvol.p0 state up org concat vol usrvol
plex name usrvol.p1 state up org concat vol usrvol
sd name rootvol.p0.s0 drive shakespeare len 524288s driveoffset 265s state up 
plex rootvol.p0 plexoffset 0s
sd name rootvol.p1.s0 drive chaucer len 524288s driveoffset 265s state up plex 
rootvol.p1 plexoffset 0s
sd name varvol.p0.s0 drive shakespeare len 31457280s driveoffset 524553s state 
up plex varvol.p0 plexoffset 0s
sd name varvol.p1.s0 drive chaucer len 31457280s driveoffset 524553s state up 
plex varvol.p1 plexoffset 0s
sd name tempvol.p0.s0 drive shakespeare len 1048576s driveoffset 31981833s 
state up plex tempvol.p0 plexoffset 0s
sd name tempvol.p1.s0 drive chaucer len 1048576s driveoffset 31981833s state up 
plex tempvol.p1 plexoffset 0s
sd name usrvol.p0.s0 drive shakespeare len 82098946s driveoffset 33030409s 
state up plex usrvol.p0 plexoffset 0s
sd name usrvol.p1.s0 drive chaucer len 82098946s driveoffset 33030409s state up 
plex usrvol.p1 plexoffset 0s

Drive /dev/ad2s1h: 54 GB (58946229760 bytes)


and /etc/fstab
# DeviceMountpoint  FStype  Options DumpPass#
/dev/ad0s1b noneswapsw  0   0
/dev/ad2s1b noneswapsw  0   0
/dev/vinum/rootvol  /   ufs rw  1   
1
/dev/vinum/tempvol  /tmpufs rw  2   
2
/dev/vinum/usrvol   /usrufs rw  2   
2
/dev/vinum/varvol   /varufs rw,userquota
2   2
/dev/ad1s1d /bakufs rw  2   
2


-- 
Chris Hastie
___
freebsd-questions

Re: Vinum and upgrading from 5.1-RELEASE

2006-04-13 Thread Chris Hastie

On Thu, 13 Apr 2006, Emil Thelin [EMAIL PROTECTED] wrote:


On Thu, 13 Apr 2006, Chris Hastie wrote:


I tried to upgrade from 5.1-RELEASE to 5_RELENG last night and hit big
problems with vinum. 5_RELENG in retrospect was an error I suspect, as
what I really wanted was 5.4-RELEASE.


Since 5.3 you should probably use the geom-aware gvinum instead of vinum.

I think the manual says that both vinum and gvinum can be used for  5.3
but I've never actually got vinum to work on  5.3.


Any hints as to how I make this migration? Is it as simple as putting
geom_vinum_load=YES in /boot/loader.conf, or is there further configuration
to do? Is gvinum happy with the same configuration data as vinum? Presumably
device names are different so I'll have to change /etc/fstab accordingly?


--
Chris Hastie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


How to upgrade from 5.2.1 to 5.3 with only remote access

2004-12-22 Thread Chris Hastie
Hi
I'm sure there must be documentation on this, but I just can't find it. 
Plenty of stuff on upgrading from 4.x to 5.3, but nothing on upgrading 
from 5.2.1

The situation is that I have a remote, leased server running 5.2.1. I 
have ssh access only, no console access or terminal server, so anything 
involving single user mode is not an option. I believe the original 
installation was a binary installation, though I have since installed 
some of the source (using sysinstall) so that I could customise the 
kernel.

What is the most sensible way to set about performing this upgrade? Is 
it even possible?

Thanks
--
Chris Hastie
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Fatal trap 12: page trap while in kernel mode

2003-11-07 Thread Chris Hastie
I have a nasty feeling that this may be a hardware problem rather than
FreeBSD, but any pointers appreciated.

Over the last couple of days, with no changes in configuration, one of
my boxes has started to die with increasing frequency, throwing up
errors like this:

Fatal trap 12: Page trap while in kernel mode
Fault virtual address   = 0x2c2
fault code  = supervisor writ, page not present
instruction pointer = 0x8:0xc0272faf
stack pointer   = 0x10:0xd54e8cf4
frame pointer   = 0x10:0xd54e8d0c
code segment= bas 0x0, limit 0xff, type 0x1b
= DPL0, pres1, def 32 1, gran1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 15 (random)
trap number = 12
panic: page fault
syncing disks, buffers remaining... panic: free locked buf
Terminate ACPI

Although it announces that it is about to reboot, it just goes to a
blank console in which even the reset button has no effect (actually it
does cause the HDD LED to flicker for a few seconds).

Increasingly, cycling the power goes to the same foreboding blank
monitor without even a murmur from the BIOS, let alone an attempt to
boot FreeBSD.

All the hardware is around two months old - an MSI KM2M motherboard with
AMD Athlon 2200, 512MB RAM and 2 x 60 GB HDD in software RAID 1 using
Vinum. FreeBSD is 5.1 RELEASE.
-- 
Chris Hastie
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


sasl 2.1.15 - applications crash when authenticating

2003-10-07 Thread Chris Hastie
I've been trying to get Cyrus imapd 2.1.15 installed on FreeBSD 
5.1-RELEASE machine. Initially I used cyrus-sasl 2.1.13 because that is 
what is in the ports tree for 5.1 (although it is broken when used with 
MySQL 4). I've just tried using sasl 2.1.15 but still get the same 
problem.

That is, when a user tries to authenticate to imapd it dies with a 
signal 11, or on authenticating to Postfix the cause of death is 
reported as signal 6. Either way, authenticating to either app is 
impossible.

I'm using auxprop, have checked permissions on sasldb2 and have trawled 
everything I can find for answers and go no where. Perhaps I'm just 
looking in the wrong place, but some help here would be greatly 
appreciated.
--
Chris Hastie
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Periodic error messages with Postfix - unsupported: -bh

2003-10-06 Thread Chris Hastie
Hi

A couple of days ago I installed Postfix on a new FreeBSD 5.1 system and 
since then the daily reporting run produces this:

| Oct  6 03:01:01 ash postfix/sendmail [1135]: fatal: unsupported: -bh

I presume something somewhere is calling sendmail with the -bh flag. Any 
clues as to how to change this, and what to change it to?
--
Chris Hastie
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Software RAID-1 - root filesystem confusion

2003-09-25 Thread Chris Hastie
On Sun, 21 Sep 2003, Matthew Seaman [EMAIL PROTECTED] 
wrote
On Sun, Sep 21, 2003 at 11:15:41AM +0100, Chris Hastie wrote:
I'm looking at building a FreeBSD server with two identical 60GB hard
drives configured with software RAID-1. What would be the best way to
set about this?
The Handbook is your friend:

   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/vinum-root.html
snip
In fact, unless your hardware requires you to run 5.x, I'd strongly
recommend that you stick with 4.8-RELEASE (or 4.9-RELEASE due out in
the next few weeks).
Thanks. I read that handbook chapter, together with 
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/vinum/index.html 
and lots of other stuff, and I think my head is about to explode :)

Since this isn't really a production server I'm afraid I ignored your 
advice and went for 5.1. I partitioned the disks much as described in 
the 'Bootstrapping Vinum' article. I've just about got my head around 
how the setup described there works, but it seems there are better ways 
of doing things on 5.1. Trouble is, I can't work out what they are, or 
how to get from where I am to there.

It seems I need to create a vinum volume for my root filesystem. I can't 
(I think) just create a volume overlapping the existing root filesystem 
because it is at the beginning of the disk. Without allowing for Vinum's 
headers my MBR is likely to get trashed.

Compared to the example in the handbook life is slightly complicated by 
the fact that I have swap partitions second on both disks, so I'm 
guessing I need two vinum partitions per disk, one overlapping 
everything before the swap, and one overlapping everything after.

So, can I copy my root filesystem to somewhere else, create a vinum 
volume for root somewhere near the beginning of the disk but allowing 
for the requisite 265 blocks at the beginning and then copy the root 
filesystem back to this? I'm presuming some of this may need to be done 
from a fixit media.

Or should I just start again with a different arrangements of 
partitions? I've done nothing but install vanilla 5.1 so far, so this is 
not a major problem. Except that the machine boots fine off a CD, but 
then refuses to see the CD as installation media so I had to install 
over FTP - not the fastest way of doing things :(

Thanks for any help
--
Chris Hastie
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Software RAID-1

2003-09-21 Thread Chris Hastie
I'm looking at building a FreeBSD server with two identical 60GB hard 
drives configured with software RAID-1. What would be the best way to 
set about this? Vinum or RaidFrame (which it appears from release notes 
/ errata doesn't work on 5.1) or something else? And what is a sensible 
procedure to get something like this working on a fresh install?
--
Chris Hastie
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]