FreeBSD

ZFS details – just in case

I use a ZFS array for backups. The data is first copied to this array, and later copied to tape. This post contains some information which might be useful should I need to replace one of the drives in the array. We have 10 HDD in this system. Two are used in a gmirror for the base OS: ada8 ada9 Seven are active in an array: ada0 ada2 ada3 ada4 ada5 ada6 ada07 […]

ZFS details – just in case Read More »

Sending out a URL for password reset

Quite some time ago, FreshPorts and The FreeBSD Diary both moved from clear text passwords to password hashes. As such, you are no longer able to recover your password. You had to email me. This is extra work for everyone. Let us automate this. The first, step, is a table: create table user_password_reset( user_id int not null, date_requested timestamp with time zone default (‘now’::text)::timestamp(6) with time zone, ip_address inet not null, token text

Sending out a URL for password reset Read More »

More RAID oddness

After running the 3Ware diagnostic script, the status of the array went to OK. A short time later, it reverted to this $ sudo /usr/local/sbin/tw_cli info c0 u0 Unit UnitType Status %RCmpl %V/I/M Port Stripe Size(GB) ———————————————————————— u0 RAID-0 OK – – – 64K 195.548 u0-0 UNKNOWN UNKNOWN – – p0 – 104.314 u0/v0 Volume – – – – – 195.548 But this differs from the web output (image) which is rather similar

More RAID oddness Read More »

FreeBSD 7.3 – you don’t want 16 CPUs

Oh… Apparently this afflicted 7.3-RELEASE for a short while, then was corrected in 7.3-STABLE. So I’m not sure what problem I was encountering below. The consensus now is I was hitting MAXCPU. But I should have hit that on 7.2. I upgraded a VM to FreeBSD 7.3 from 7.2 and now it won’t boot. It stops probing at MDT: Found CPU APIC ID 15 ACPI ID 15: disabled. Tried booting in single user,

FreeBSD 7.3 – you don’t want 16 CPUs Read More »

ZFS & gmirror & drive renumbering

I am impressed…. my gmirror array continued to work even after the drives were renamed from da20 and da24 to ada0 and ada1. This happened when I tried out the ahci(4) for my SATA drives. It’s the type of thing I’m striving for soon in my ZFS array. All this started when I wanted to find out about making my ZFS array more resilient. See http://docs.freebsd.org/cgi/getmsg.cgi?fetch=663685+0+current/freebsd-stable (which is the top level post of

ZFS & gmirror & drive renumbering Read More »

A simple nested loop

In a previous post, I wrote about a suspected LIMIT problem. It turns out that suspicion proved correct. The solution was to move to a nested query which limits the underlying data and then allows the outer query to grab all the associated fluff that surrounds it. Here is the fix to the original code: $ cvs di -ub commits_by_committer.php Index: commits_by_committer.php =================================================================== RCS file: /home/repositories/freshports-1/classes/commits_by_committer.php,v retrieving revision 1.3 diff -u -b -r1.3

A simple nested loop Read More »

How many FreshPorts accounts are enough?

I found this interesting. The usual FreshPorts logging indicated an unusual number of account creations in a short amount of time. So I went looking. I found one IP address had created 20 logins. freshports.org=# SELECT ip_address, freshports.org-# count(ip_address) freshports.org-# FROM users freshports.org-# GROUP BY ip_address freshports.org-# ORDER BY 2 DESC freshports.org-# LIMIT 2; ip_address | count —————+——- 0.0.0.0 | 1203 95.211.27.210 | 38 (2 rows) freshports.org=# Ignore that 0.0.0.0. That indicates a

How many FreshPorts accounts are enough? Read More »

Bacula – errors with 5.0.0 backup catalog

While creating the FreeBSD package for 5.0.0, I noticed a few new things to be aware of. With 5.0.0 comes a new backup catalog script. It parses the bacula-dir.conf file and extracts what it needs from that. This means you only need to specify the database connection information in one place and it is not passed to a script via the command line. If you see this error while running that script: 25-Jan

Bacula – errors with 5.0.0 backup catalog Read More »

Scroll to Top