|
|
January 21st, 2012
Here is the start of a query for pulling out travel requirements for conference attendees.
SELECT P.last_name, P.first_name,
CPT.arrival_from,
CPT.arrival_to,
CPT.need_accommodation
FROM conference_person_travel CPT, conference_person CP, conference C, person P
WHERE CPT.need_accommodation
AND CPT.conference_person_id = CP.conference_person_id
AND P.person_id = CP.person_id
AND CP.conference_id = C.conference_id
AND C.acronym = 'BSDCan2012'
Posted in General | No Comments »
January 8th, 2012
I just bought and downloaded memtestosx.
Last login: Sun Jan 8 16:14:10 on ttys001
[dan@dent:~] $ /Volumes/memtest_422/memtest/memtest ; exit;
Memtest version 4.22 (64-bit)
Copyright (C) 2004 Charles Cazabon
Copyright (C) 2004-2008 Tony Scaminaci (Macintosh port)
Licensed under the GNU General Public License version 2 only
NOTE: No command-line arguments have been specified
Using defaults: Test all available memory, one test pass, no logfile
Mac OS X 10.7.2 (11C74) running in multiuser mode
Memory Page Size: 4096
System has 8 Intel core(s) with SSE
Requested memory: 2099MB (2201194496 bytes)
Available memory: 2099MB (2201194496 bytes)
Allocated memory: 2099MB (2201194496 bytes) at local address 0x0000000101000000
Attempting memory lock... locked successfully
Partitioning memory into 2 comparison buffers...
Buffer A: 1049MB (1100597248 bytes) starts at local address 0x0000000101000000
Buffer B: 1049MB (1100597248 bytes) starts at local address 0x000000014299c800
Running 1 test sequence... (CTRL-C to quit)
Test sequence 1 of 1:
Running tests on full 2099MB region...
Stuck Address : ok
Linear PRN : ok
Running comparison tests using 1049MB buffers...
Random Value : ok
Compare XOR : ok
Compare SUB : ok
Compare MUL : ok
Compare DIV : ok
Compare OR : ok
Compare AND : ok
Sequential Increment: ok
Solid Bits : ok
Block Sequential : ok
Checkerboard : ok
Bit Spread : ok
Bit Flip : ok
Walking Ones : ok
Walking Zeroes : ok
All tests passed! Execution time: 606 seconds.
logout
[Process completed]
Posted in General | No Comments »
December 30th, 2011
After a very long effort, this is the solution:
CREATE OR REPLACE FUNCTION conflict.conflict_statistics(conference_id integer, OUT conflict_level text, OUT conflicts integer)
RETURNS SETOF record
LANGUAGE plpgsql
AS $function$
#variable_conflict use_variable
DECLARE
conflict TEXT;
conflict_rows INTEGER;
BEGIN
FOR conflict_level IN
SELECT conflict_level.conflict_level FROM conflict.conflict_level WHERE conflict_level.conflict_level <> ’silent’ ORDER BY rank
LOOP
conflicts = 0;
FOR conflict IN
SELECT conference_phase_conflict.conflict
FROM
conflict.conference_phase_conflict
INNER JOIN conference ON (
conference.conference_id = conference_id AND
conference.conference_phase = conference_phase_conflict.conference_phase )
WHERE conference_phase_conflict.conflict_level = conflict_level
LOOP
EXECUTE ‘SELECT count(1) FROM conflict.conflict_’ || conflict || ‘(’ || conference_id || ‘);’ INTO STRICT conflict_rows;
conflicts := conflicts + conflict_rows;
END LOOP;
RETURN NEXT;
END LOOP;
END;
$function$
Posted in General | 1 Comment »
October 6th, 2011
Today I received this rather devious spam. Invoke education, children, libraries, and hope that someone will link to their site. I’m not sure *why* they want this particular site promoted. There’s not much useful information there. No attempt to sell anything. I’m confused.
Perhaps this was legit. But then, if you search for certain phrases contained in this email, you’ll see other such posts. I’m certain it’s spam.
By, the way, I’ve amended their URLs by appending .invalid to them. No sense giving them a link.
Received: from mx.districtlibrary.org ([173.234.9.58]) by na3sys009amx170.postini.com ([74.125.148.10]) with SMTP;
Thu, 06 Oct 2011 08:00:34 PDT
To: help@racingsystem.com
From: agriffin@districtlibrary.org.invalid
Subject: Fan Mail/Question on the Racing System Links pg.
Date: Thu, 6 Oct 2011 10:57:39 -0400
X-pstn-neptune: 0/0/0.00/0
X-pstn-levels: (S: 9.25315/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
Message-ID: <2615178027880354086370761583678@psmtp.com>
X-pstn-settings: 2 (0.5000:0.5000) s cv gt3 gt2 gt1
X-pstn-addresses: from [1862/74]
Hi,
I just wanted to send out a quick thank you letter in regards to your racing system links page -
(http://www.racingsystem.com/links.html). I’m a librarian and used some of your resources for the
sports of our new site. Great leads there, I appreciate it
I planned on having the students that participated with the site, mail out a handwritten thank you note,
but we’ve been so busy I haven’t had a chance. So I’m writing on their behalf today as well. As a small
token of our appreciation, I wanted to share another resource that might be perfect for your page. This
page has been popular among the staff here that are avid cyclists:
“A Guide to Bike Racing for Beginners and Competitors” - (http://www.cyclesport.com.invalid/guide-to-bike-
racing-for-beginners-and-competitors/).
I hope you like the link and thanks again for the help.
Sincerely,
Anne Griffin
P.S. I think the students would get a kick out of hearing from a friend in cyberspace. If you include the
link and don’t mind giving me a shout back, I’ll show them that you used our suggestion
Posted in General, Open Source | No Comments »
June 20th, 2011
As part of my magical Bacula website, I wanted to know when my tape drive required a cleaning tape. It appears that smartctl will reveal this information:
[dan@kraken:/usr/home/dan] $ sudo /usr/local/sbin/in/smartctl -d scsi -x /dev/nsa0
Password:
smartctl 5.39.1 2010-01-28 r3054 [FreeBSD 8.2-STABLE amd64] (local build)
Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net
Device: DEC TZ89 (C) DEC Version: 2561
Serial number: CXA02S1766
Device type: tape
Local Time is: Tue Jun 21 00:22:26 2011 UTC
Temperature Warning Disabled or Not Supported
TapeAlert Supported
TapeAlert Errors (C=Critical, W=Warning, I=Informational):
[0x14] C: The tape drive needs cleaning:
1. If the operation has stopped, eject the tape and clean the drive.
2. If the operation has not stopped, wait for it to finish and then
clean the drive.
Check the tape drive users manual for device specific cleaning instructions.
Error counter log:
Errors Corrected by Total Correction Gigabytes Total
ECC rereads/ errors algorithm processed uncorrected
fast | delayed rewrites corrected invocations [10^9 bytes] errors
read: 0 0 0 0 0 0.023 0
write: 0 0 15 15 0 3.611 0
Last n error events log page
Error event 0:
Packet # 211 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22282/353/0A4E0714/1/80/02/00
Error event 1:
Error event 2:
Packet # 212 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22307/353/0A4E7DB4/1/80/02/00
Error event 3:
Error event 4:
Packet # 213 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22309/353/0A4EB06D/1/80/02/00
Error event 5:
Error event 6:
Packet # 214 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22313/353/0A4E7DB4/1/80/02/00
Error event 7:
Error event 8:
Packet # 215 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22318/353/0A4E7DB4/1/80/02/00
Error event 9:
Error event 10:
Packet # 216 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22337/353/7098FB99/1/80/02/00
Error event 11:
Error event 12:
Packet # 217 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22361/353/7098FB99/1/80/02/00
Error event 13:
Error event 14:
Packet # 218 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22385/353/7098FB99/1/80/02/00
Error event 15:
Error event 16:
Packet # 219 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22409/353/7098FB99/1/80/02/00
Error event 17:
Error event 18:
Packet # 220 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22433/353/0A4EA033/1/80/02/00
Error event 19:
Error event 20:
Packet # 221 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22457/353/0A4EA033/1/80/02/00
Error event 21:
Error event 22:
Packet # 222 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22458/353/0A4EB06D/1/80/02/00
Error event 23:
Error event 24:
Packet # 223 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22481/353/0A4EA033/1/80/02/00
Error event 25:
Error event 26:
Packet # 224 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22505/353/0A4EA033/1/80/02/00
Error event 27:
Error event 28:
Packet # 225 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22506/353/0A4EB06D/1/80/02/00
Error event 29:
Error event 30:
Packet # 226 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22560/353/16A280CB/1/80/02/00
Error event 31:
Error event 32:
Packet # 227 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22602/353/48C6831E/1/80/02/00
Error event 33:
Error event 34:
Packet # 228 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22625/353/0A4E7213/1/80/02/00
Error event 35:
Error event 36:
Packet # 229 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22626/353/48C6831E/1/80/02/00
Error event 37:
Error event 38:
Packet # 230 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22649/353/0A4E7213/1/80/02/00
Error event 39:
Error event 40:
Packet # 231 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22650/353/48C6831E/1/80/02/00
Error event 41:
Error event 42:
Packet # 232 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22673/353/0A4E7213/1/80/02/00
Error event 43:
Error event 44:
Packet # 233 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22674/353/48C6831E/1/80/02/00
Error event 45:
Error event 46:
Packet # 234 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22697/353/0A4E7213/1/80/02/00
Error event 47:
Error event 48:
Packet # 235 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22721/353/0A4E7213/1/80/02/00
Error event 49:
Error event 50:
Packet # 236 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22793/353/4F5B1D10/1/80/02/00
Error event 51:
Error event 52:
Packet # 237 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22817/353/4F5B1D10/1/80/02/00
Error event 53:
Error event 54:
Packet # 238 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22833/353/4F5B1D10/1/80/02/00
Error event 55:
Error event 56:
Packet # 239 - Event: A401 [V97-0 29-DEC-1999] 616:41:33.323 POH/PC= 22841/353
11004F5B 1D100101 00400000 10100027 65B20000 0A0B0000 00000000 00000000
00060001 A1920000 00000000 00000000 00000000 00000000 00000000 00000000
0000
Error event 57:
0000 00000000 00000000 00000000
Error event 58:
Packet # 240 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22841/353/4F5B1D10/3/0C/00/00
Error event 59:
Error event 60:
Packet # 241 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22841/353/4F5B1D10/3/0C/00/00
Error event 61:
Error event 62:
Packet # 242 - Event: A401 [V97-0 29-DEC-1999] 616:42:05.351 POH/PC= 22841/353
11004F5B 1D100101 00400000 13000027 65D60000 0A0C0000 00000000 00000000
00060001 A19F0000 00000000 00000000 00000000 00000000 00000000 00000000
0000
Error event 63:
0000 00000000 00000000 00000000
Error event 64:
Packet # 243 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22841/353/4F5B1D10/3/80/01/00
Error event 65:
Error event 66:
Packet # 244 - Event: A401 [V97-0 29-DEC-1999] 616:42:34.111 POH/PC= 22841/353
11004F5B 1D100101 00400000 13000027 65D60000 0A0C0000 00000000 00000000
00060001 A3860000 00000000 00000000 00000000 00000000 00000000 00000000
0000
Error event 67:
0000 00000000 00000000 00000000
Error event 68:
Packet # 245 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22841/353/4F5B1D10/3/0C/00/00
Error event 69:
Error event 70:
Packet # 246 - Event: A401 [V97-0 29-DEC-1999] 617:19:25.841 POH/PC= 22842/353
11004F5B 912A0101 00400000 10100003 65A80000 0A1C0000 00000000 00000000
00020002 86640000 00000000 00000000 00000000 00000000 00000000 00000000
0000
Error event 71:
0000 00000000 00000000 00000000
Error event 72:
Packet # 247 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22842/353/4F5B912A/3/0C/00/00
Error event 73:
Error event 74:
Packet # 248 - Event: A401 [V97-0 29-DEC-1999] 617:19:58.191 POH/PC= 22842/353
11004F5B 912A0101 00400000 13000003 65CC0000 0A1D0000 00000000 00000000
00020002 866C0000 00000000 00000000 00000000 00000000 00000000 00000000
0000
Error event 75:
0000 00000000 00000000 00000000
Error event 76:
Packet # 249 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22842/353/4F5B912A/3/80/01/00
Error event 77:
Error event 78:
Packet # 250 - Event: A401 [V97-0 29-DEC-1999] 617:20:27.305 POH/PC= 22842/353
11004F5B 912A0101 00400000 13000003 65CC0000 0A1D0000 00000000 00000000
00020002 88520000 00000000 00000000 00000000 00000000 00000000 00000000
0000
Error event 79:
0000 00000000 00000000 00000000
Error event 80:
Packet # 251 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22842/353/4F5B912A/3/0C/00/00
Error event 81:
Error event 82:
Packet # 252 - Event: A401 [V97-0 29-DEC-1999] 617:28:03.290 POH/PC= 22842/353
11000A4E 21940101 00400000 10100001 65D90000 0A200000 00000000 00000000
00020001 45A60000 00000000 00000000 00000000 00000000 00000000 00000000
0000
Error event 83:
0000 00000000 00000000 00000000
Error event 84:
Packet # 253 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22842/353/0A4E2194/3/0C/00/00
Error event 85:
Error event 86:
Packet # 254 - Event: A401 [V97-0 29-DEC-1999] 617:28:37.765 POH/PC= 22842/353
11000A4E 21940101 00400000 13000001 65FE0000 0A210000 00000000 00000000
00020001 45AC0000 00000000 00000000 00000000 00000000 00000000 00000000
0000
Error event 87:
0000 00000000 00000000 00000000
Error event 88:
Packet # 255 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22842/353/0A4E2194/3/80/01/00
Error event 89:
Error event 90:
Packet # 0 - Event: A401 [V97-0 29-DEC-1999] 617:29:08.860 POH/PC= 22842/353
11000A4E 21940101 00400000 13000001 65FE0000 0A210000 00000000 00000000
00020001 45AD0000 00000000 00000000 00000000 00000000 00000000 00000000
000000
Error event 91:
00 00000000 00000000 00000000
Error event 92:
Packet # 1 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22842/353/0A4E2194/3/0C/00/00
Error event 93:
Error event 94:
Packet # 2 - SCSI Event: POH/PC/MID/SK/ASC/ASCQ/AddErr=22889/353/4F5B6963/1/80/02/00
Error event 95:
Device does not support Self Test logging
Device does not support Background scan results logging
scsiPrintSasPhy Log Sense Failed [unsupported field in scsi command]
[dan@kraken:/usr/home/dan] $
This information is available only upon the first query. The query clears the flag. I’ll need to write a script to detect, then store this flag.
Posted in General | 1 Comment »
May 31st, 2011
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
One is spare:
- ada1
There is another spare HDD, but it is not installed because of lack of space.
The zpool
# zpool status
pool: storage
state: ONLINE
scrub: scrub completed after 6h7m with 0 errors on Tue May 24 09:13:12 2011
config:
NAME STATE READ WRITE CKSUM
storage ONLINE 0 0 0
raidz2 ONLINE 0 0 0
gpt/disk01-live ONLINE 0 0 0
gpt/disk02-live ONLINE 0 0 0
gpt/disk03-live ONLINE 0 0 0
gpt/disk04-live ONLINE 0 0 0
gpt/disk05-live ONLINE 0 0 0
gpt/disk06-live ONLINE 0 0 0
gpt/disk07-live ONLINE 0 0 0
errors: No known data errors
The gpart
$ gpart list
Geom name: ada0
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 3907029134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada0p1
Mediasize: 2000188135936 (1.8T)
Sectorsize: 512
Mode: r1w1e2
rawuuid: 3ec562f0-99d6-11df-83c1-001b2151ab2d
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: disk06-live
length: 2000188135936
offset: 1048576
type: freebsd-zfs
index: 1
end: 3906619500
start: 2048
Consumers:
1. Name: ada0
Mediasize: 2000398934016 (1.8T)
Sectorsize: 512
Mode: r1w1e3
Geom name: ada2
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 3907029134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada2p1
Mediasize: 2000188135936 (1.8T)
Sectorsize: 512
Mode: r1w1e2
rawuuid: 4bc24c69-9cab-11df-83c1-001b2151ab2d
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: disk01-live
length: 2000188135936
offset: 1048576
type: freebsd-zfs
index: 1
end: 3906619500
start: 2048
Consumers:
1. Name: ada2
Mediasize: 2000398934016 (1.8T)
Sectorsize: 512
Mode: r1w1e3
Geom name: ada3
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 3907029134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada3p1
Mediasize: 2000188135936 (1.8T)
Sectorsize: 512
Mode: r1w1e2
rawuuid: c7729bb2-9d10-11df-83c1-001b2151ab2d
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: disk02-live
length: 2000188135936
offset: 1048576
type: freebsd-zfs
index: 1
end: 3906619500
start: 2048
Consumers:
1. Name: ada3
Mediasize: 2000398934016 (1.8T)
Sectorsize: 512
Mode: r1w1e3
Geom name: ada4
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 3907029134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada4p1
Mediasize: 2000188135936 (1.8T)
Sectorsize: 512
Mode: r1w1e2
rawuuid: 20d23d98-9da5-11df-83c1-001b2151ab2d
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: disk03-live
length: 2000188135936
offset: 1048576
type: freebsd-zfs
index: 1
end: 3906619500
start: 2048
Consumers:
1. Name: ada4
Mediasize: 2000398934016 (1.8T)
Sectorsize: 512
Mode: r1w1e3
Geom name: ada5
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 3907029134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada5p1
Mediasize: 2000188135936 (1.8T)
Sectorsize: 512
Mode: r1w1e2
rawuuid: 4ed25145-9dd7-11df-83c1-001b2151ab2d
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: disk04-live
length: 2000188135936
offset: 1048576
type: freebsd-zfs
index: 1
end: 3906619500
start: 2048
Consumers:
1. Name: ada5
Mediasize: 2000398934016 (1.8T)
Sectorsize: 512
Mode: r1w1e3
Geom name: ada6
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 3907029134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada6p1
Mediasize: 2000188135936 (1.8T)
Sectorsize: 512
Mode: r1w1e2
rawuuid: 2c3c7d97-9e28-11df-83c1-001b2151ab2d
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: disk05-live
length: 2000188135936
offset: 1048576
type: freebsd-zfs
index: 1
end: 3906619500
start: 2048
Consumers:
1. Name: ada6
Mediasize: 2000398934016 (1.8T)
Sectorsize: 512
Mode: r1w1e3
Geom name: ada7
modified: false
state: OK
fwheads: 16
fwsectors: 63
last: 3907029134
first: 34
entries: 128
scheme: GPT
Providers:
1. Name: ada7p1
Mediasize: 2000188135936 (1.8T)
Sectorsize: 512
Mode: r1w1e2
rawuuid: 4324754d-99d6-11df-83c1-001b2151ab2d
rawtype: 516e7cba-6ecf-11d6-8ff8-00022d09712b
label: disk07-live
length: 2000188135936
offset: 1048576
type: freebsd-zfs
index: 1
end: 3906619500
start: 2048
Consumers:
1. Name: ada7
Mediasize: 2000398934016 (1.8T)
Sectorsize: 512
Mode: r1w1e3
Geom name: mirror/gm0
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 156301424
first: 63
entries: 4
scheme: MBR
Providers:
1. Name: mirror/gm0s1
Mediasize: 80026329600 (75G)
Sectorsize: 512
Mode: r5w5e9
attrib: active
rawtype: 165
length: 80026329600
offset: 32256
type: freebsd
index: 1
end: 156301487
start: 63
Consumers:
1. Name: mirror/gm0
Mediasize: 80026361344 (75G)
Sectorsize: 512
Mode: r5w5e14
Geom name: mirror/gm0s1
modified: false
state: OK
fwheads: 255
fwsectors: 63
last: 156301424
first: 0
entries: 8
scheme: BSD
Providers:
1. Name: mirror/gm0s1a
Mediasize: 1073741824 (1.0G)
Sectorsize: 512
Mode: r1w1e1
rawtype: 7
length: 1073741824
offset: 0
type: freebsd-ufs
index: 1
end: 2097151
start: 0
2. Name: mirror/gm0s1b
Mediasize: 6442450944 (6.0G)
Sectorsize: 512
Mode: r1w1e0
rawtype: 1
length: 6442450944
offset: 1073741824
type: freebsd-swap
index: 2
end: 14680063
start: 2097152
3. Name: mirror/gm0s1d
Mediasize: 4294967296 (4.0G)
Sectorsize: 512
Mode: r1w1e1
rawtype: 7
length: 4294967296
offset: 7516192768
type: freebsd-ufs
index: 4
end: 23068671
start: 14680064
4. Name: mirror/gm0s1e
Mediasize: 4294967296 (4.0G)
Sectorsize: 512
Mode: r1w1e1
rawtype: 7
length: 4294967296
offset: 11811160064
type: freebsd-ufs
index: 5
end: 31457279
start: 23068672
5. Name: mirror/gm0s1f
Mediasize: 63920202240 (60G)
Sectorsize: 512
Mode: r1w1e1
rawtype: 7
length: 63920202240
offset: 16106127360
type: freebsd-ufs
index: 6
end: 156301424
start: 31457280
Consumers:
1. Name: mirror/gm0s1
Mediasize: 80026329600 (75G)
Sectorsize: 512
Mode: r5w5e9
camcontrol identify:
[dan@kraken:~/bacula] $ sudo camcontrol identify
camcontrol: subcommand "identify" requires a valid device identifier
[dan@kraken:~/bacula] $ sudo camcontrol identify ada0
pass0: <hitachi HDS722020ALA330 JKAOA28A> ATA-8 SATA 2.x device
pass0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
protocol ATA/ATAPI-8 SATA 2.x
device model Hitachi HDS722020ALA330
firmware revision JKAOA28A
serial number JK1131YAHLJWLV
WWN 5000cca221d68596
cylinders 16383
heads 16
sectors/track 63
sector size logical 512, physical 512, offset 0
LBA supported 268435455 sectors
LBA48 supported 3907029168 sectors
PIO supported PIO4
DMA supported WDMA2 UDMA6
media RPM 7200
Feature Support Enabled Value Vendor
read ahead yes yes
write cache yes yes
flush cache yes yes
overlap no
Tagged Command Queuing (TCQ) no no
Native Command Queuing (NCQ) yes 32 tags
SMART yes yes
microcode download yes yes
security yes no
power management yes yes
advanced power management yes no 0/0x00
automatic acoustic management yes no 254/0xFE 128/0x80
media status notification no no
power-up in Standby yes no
write-read-verify no no
unload no no
free-fall no no
data set management (TRIM) no
[dan@kraken:~/bacula] $ sudo camcontrol identify ada1
pass1: <hitachi HDS722020ALA330 JKAOA3MA> ATA-8 SATA 2.x device
pass1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
protocol ATA/ATAPI-8 SATA 2.x
device model Hitachi HDS722020ALA330
firmware revision JKAOA3MA
serial number JK11A8B9J0671F
WWN 5000cca222dc4662
cylinders 16383
heads 16
sectors/track 63
sector size logical 512, physical 512, offset 0
LBA supported 268435455 sectors
LBA48 supported 3907029168 sectors
PIO supported PIO4
DMA supported WDMA2 UDMA6
media RPM 7200
Feature Support Enabled Value Vendor
read ahead yes yes
write cache yes yes
flush cache yes yes
overlap no
Tagged Command Queuing (TCQ) no no
Native Command Queuing (NCQ) yes 32 tags
SMART yes yes
microcode download yes yes
security yes no
power management yes yes
advanced power management yes no 0/0x00
automatic acoustic management no no
media status notification no no
power-up in Standby yes no
write-read-verify no no
unload no no
free-fall no no
data set management (TRIM) no
[dan@kraken:~/bacula] $ sudo camcontrol identify ada2
pass2: <hitachi HDS722020ALA330 JKAOA28A> ATA-8 SATA 2.x device
pass2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
protocol ATA/ATAPI-8 SATA 2.x
device model Hitachi HDS722020ALA330
firmware revision JKAOA28A
serial number JK1130YAH531ST
WWN 5000cca221d068d5
cylinders 16383
heads 16
sectors/track 63
sector size logical 512, physical 512, offset 0
LBA supported 268435455 sectors
LBA48 supported 3907029168 sectors
PIO supported PIO4
DMA supported WDMA2 UDMA6
media RPM 7200
Feature Support Enabled Value Vendor
read ahead yes yes
write cache yes yes
flush cache yes yes
overlap no
Tagged Command Queuing (TCQ) no no
Native Command Queuing (NCQ) yes 32 tags
SMART yes yes
microcode download yes yes
security yes no
power management yes yes
advanced power management yes no 0/0x00
automatic acoustic management yes no 254/0xFE 128/0x80
media status notification no no
power-up in Standby yes no
write-read-verify no no
unload no no
free-fall no no
data set management (TRIM) no
[dan@kraken:~/bacula] $ sudo camcontrol identify ada3
pass3: <hitachi HDS722020ALA330 JKAOA28A> ATA-8 SATA 2.x device
pass3: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
protocol ATA/ATAPI-8 SATA 2.x
device model Hitachi HDS722020ALA330
firmware revision JKAOA28A
serial number JK1131YAGGUVAV
WWN 5000cca221c6be3b
cylinders 16383
heads 16
sectors/track 63
sector size logical 512, physical 512, offset 0
LBA supported 268435455 sectors
LBA48 supported 3907029168 sectors
PIO supported PIO4
DMA supported WDMA2 UDMA6
media RPM 7200
Feature Support Enabled Value Vendor
read ahead yes yes
write cache yes yes
flush cache yes yes
overlap no
Tagged Command Queuing (TCQ) no no
Native Command Queuing (NCQ) yes 32 tags
SMART yes yes
microcode download yes yes
security yes no
power management yes yes
advanced power management yes no 0/0x00
automatic acoustic management yes no 254/0xFE 128/0x80
media status notification no no
power-up in Standby yes no
write-read-verify no no
unload no no
free-fall no no
data set management (TRIM) no
[dan@kraken:~/bacula] $ sudo camcontrol identify ada4
pass4: <hitachi HDS722020ALA330 JKAOA28A> ATA-8 SATA 2.x device
pass4: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
protocol ATA/ATAPI-8 SATA 2.x
device model Hitachi HDS722020ALA330
firmware revision JKAOA28A
serial number JK1130YAH5AYTT
WWN 5000cca221d08681
cylinders 16383
heads 16
sectors/track 63
sector size logical 512, physical 512, offset 0
LBA supported 268435455 sectors
LBA48 supported 3907029168 sectors
PIO supported PIO4
DMA supported WDMA2 UDMA6
media RPM 7200
Feature Support Enabled Value Vendor
read ahead yes yes
write cache yes yes
flush cache yes yes
overlap no
Tagged Command Queuing (TCQ) no no
Native Command Queuing (NCQ) yes 32 tags
SMART yes yes
microcode download yes yes
security yes no
power management yes yes
advanced power management yes no 0/0x00
automatic acoustic management yes no 254/0xFE 128/0x80
media status notification no no
power-up in Standby yes no
write-read-verify no no
unload no no
free-fall no no
data set management (TRIM) no
[dan@kraken:~/bacula] $ sudo camcontrol identify ada5
pass5: <hitachi HDS722020ALA330 JKAOA28A> ATA-8 SATA 2.x device
pass5: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
protocol ATA/ATAPI-8 SATA 2.x
device model Hitachi HDS722020ALA330
firmware revision JKAOA28A
serial number JK1130YAH324ST
WWN 5000cca221cf7cb3
cylinders 16383
heads 16
sectors/track 63
sector size logical 512, physical 512, offset 0
LBA supported 268435455 sectors
LBA48 supported 3907029168 sectors
PIO supported PIO4
DMA supported WDMA2 UDMA6
media RPM 7200
Feature Support Enabled Value Vendor
read ahead yes yes
write cache yes yes
flush cache yes yes
overlap no
Tagged Command Queuing (TCQ) no no
Native Command Queuing (NCQ) yes 32 tags
SMART yes yes
microcode download yes yes
security yes no
power management yes yes
advanced power management yes no 0/0x00
automatic acoustic management yes no 254/0xFE 128/0x80
media status notification no no
power-up in Standby yes no
write-read-verify no no
unload no no
free-fall no no
data set management (TRIM) no
[dan@kraken:~/bacula] $ sudo camcontrol identify ada6
pass6: <hitachi HDS722020ALA330 JKAOA28A> ATA-8 SATA 2.x device
pass6: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
protocol ATA/ATAPI-8 SATA 2.x
device model Hitachi HDS722020ALA330
firmware revision JKAOA28A
serial number JK1130YAH5NGRT
WWN 5000cca221d0aa38
cylinders 16383
heads 16
sectors/track 63
sector size logical 512, physical 512, offset 0
LBA supported 268435455 sectors
LBA48 supported 3907029168 sectors
PIO supported PIO4
DMA supported WDMA2 UDMA6
media RPM 7200
Feature Support Enabled Value Vendor
read ahead yes yes
write cache yes yes
flush cache yes yes
overlap no
Tagged Command Queuing (TCQ) no no
Native Command Queuing (NCQ) yes 32 tags
SMART yes yes
microcode download yes yes
security yes no
power management yes yes
advanced power management yes no 0/0x00
automatic acoustic management yes no 254/0xFE 128/0x80
media status notification no no
power-up in Standby yes no
write-read-verify no no
unload no no
free-fall no no
data set management (TRIM) no
[dan@kraken:~/bacula] $ sudo camcontrol identify ada7
pass7: <hitachi HDS722020ALA330 JKAOA28A> ATA-8 SATA 2.x device
pass7: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
protocol ATA/ATAPI-8 SATA 2.x
device model Hitachi HDS722020ALA330
firmware revision JKAOA28A
serial number JK1131YAHLRGWV
WWN 5000cca221d69a92
cylinders 16383
heads 16
sectors/track 63
sector size logical 512, physical 512, offset 0
LBA supported 268435455 sectors
LBA48 supported 3907029168 sectors
PIO supported PIO4
DMA supported WDMA2 UDMA6
media RPM 7200
Feature Support Enabled Value Vendor
read ahead yes yes
write cache yes yes
flush cache yes yes
overlap no
Tagged Command Queuing (TCQ) no no
Native Command Queuing (NCQ) yes 32 tags
SMART yes yes
microcode download yes yes
security yes no
power management yes yes
advanced power management yes no 0/0x00
automatic acoustic management yes no 254/0xFE 128/0x80
media status notification no no
power-up in Standby yes no
write-read-verify no no
unload no no
free-fall no no
data set management (TRIM) no
[dan@kraken:~/bacula] $ sudo camcontrol identify ada8
pass8: <st380815as 4.AAB> ATA-7 SATA 2.x device
pass8: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
protocol ATA/ATAPI-7 SATA 2.x
device model ST380815AS
firmware revision 4.AAB
serial number 9QZCXHK6
cylinders 16383
heads 16
sectors/track 63
sector size logical 512, physical 512, offset 0
LBA supported 156301488 sectors
LBA48 supported 156301488 sectors
PIO supported PIO4
DMA supported WDMA2 UDMA6
Feature Support Enabled Value Vendor
read ahead yes yes
write cache yes yes
flush cache yes yes
overlap no
Tagged Command Queuing (TCQ) no no
Native Command Queuing (NCQ) yes 32 tags
SMART yes yes
microcode download yes yes
security yes no
power management yes yes
advanced power management no no
automatic acoustic management no no
media status notification no no
power-up in Standby no no
write-read-verify no no
unload no no
free-fall no no
data set management (TRIM) no
[dan@kraken:~/bacula] $ sudo camcontrol identify ada9
pass10: <wdc WD1600AAJS-75M0A0 02.03E02> ATA-8 SATA 2.x device
pass10: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
protocol ATA/ATAPI-8 SATA 2.x
device model WDC WD1600AAJS-75M0A0
firmware revision 02.03E02
serial number WD-WMAV3C034340
WWN 50014ee0573ed059
cylinders 16383
heads 16
sectors/track 63
sector size logical 512, physical 512, offset 0
LBA supported 268435455 sectors
LBA48 supported 312500000 sectors
PIO supported PIO4
DMA supported WDMA2 UDMA6
Feature Support Enabled Value Vendor
read ahead yes yes
write cache yes yes
flush cache yes yes
overlap no
Tagged Command Queuing (TCQ) no no
Native Command Queuing (NCQ) yes 32 tags
SMART yes yes
microcode download yes yes
security yes no
power management yes yes
advanced power management no no
automatic acoustic management yes yes 128/0x80 128/0x80
media status notification no no
power-up in Standby yes no
write-read-verify no no
unload no no
free-fall no no
data set management (TRIM) no
Lots of gpart stuff:
[dan@kraken:~/bacula] $ gpart show ada0
=> 34 3907029101 ada0 GPT (1.8T)
34 2014 - free - (1.0M)
2048 3906617453 1 freebsd-zfs (1.8T)
3906619501 409634 - free - (200M)
[dan@kraken:~/bacula] $ gpart show ada1
gpart: No such geom: ada1.
[dan@kraken:~/bacula] $ gpart show ada0
=> 34 3907029101 ada0 GPT (1.8T)
34 2014 - free - (1.0M)
2048 3906617453 1 freebsd-zfs (1.8T)
3906619501 409634 - free - (200M)
[dan@kraken:~/bacula] $ gpart show ada1
gpart: No such geom: ada1.
[dan@kraken:~/bacula] $ gpart show ada2
=> 34 3907029101 ada2 GPT (1.8T)
34 2014 - free - (1.0M)
2048 3906617453 1 freebsd-zfs (1.8T)
3906619501 409634 - free - (200M)
[dan@kraken:~/bacula] $ gpart show ada3
=> 34 3907029101 ada3 GPT (1.8T)
34 2014 - free - (1.0M)
2048 3906617453 1 freebsd-zfs (1.8T)
3906619501 409634 - free - (200M)
[dan@kraken:~/bacula] $ gpart show ada4
=> 34 3907029101 ada4 GPT (1.8T)
34 2014 - free - (1.0M)
2048 3906617453 1 freebsd-zfs (1.8T)
3906619501 409634 - free - (200M)
[dan@kraken:~/bacula] $ gpart show ada5
=> 34 3907029101 ada5 GPT (1.8T)
34 2014 - free - (1.0M)
2048 3906617453 1 freebsd-zfs (1.8T)
3906619501 409634 - free - (200M)
[dan@kraken:~/bacula] $ gpart show ada6
=> 34 3907029101 ada6 GPT (1.8T)
34 2014 - free - (1.0M)
2048 3906617453 1 freebsd-zfs (1.8T)
3906619501 409634 - free - (200M)
[dan@kraken:~/bacula] $ gpart show ada7
=> 34 3907029101 ada7 GPT (1.8T)
34 2014 - free - (1.0M)
2048 3906617453 1 freebsd-zfs (1.8T)
3906619501 409634 - free - (200M)
[dan@kraken:~/bacula] $ gpart show ada8
gpart: No such geom: ada8.
[dan@kraken:~/bacula] $ gpart show ada9
gpart: No such geom: ada9.
[dan@kraken:~/bacula] $ gpart show ada910
gpart: No such geom: ada910.
[dan@kraken:~/bacula] $
gmirror:
$ gmirror list
Geom name: gm0
State: COMPLETE
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 9
ID: 3685004504
Providers:
1. Name: mirror/gm0
Mediasize: 80026361344 (75G)
Sectorsize: 512
Mode: r5w5e14
Consumers:
1. Name: ada8
Mediasize: 80026361856 (75G)
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: DIRTY
GenID: 0
SyncID: 9
ID: 3456884141
2. Name: ada9
Mediasize: 160000000000 (149G)
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: DIRTY
GenID: 0
SyncID: 9
ID: 880733105
Posted in FreeBSD, Open Source, ZFS | No Comments »
May 27th, 2011
I have been using Bacula since 2004. I started off on DDS tapes, then moved to DLT. Now I’m backing up to a ZFS array and the copying to tape.
About a year ago, I obtained about 200 DLT tapes from a friend. They were no longer used at his place of work. He used Bacula and had written lots of 1s and 0s to the tapes to erase them. However, they still contained a Bacula label.
In order for me to use them, I needed to erase that label, add my own, and go from there.
Based upon an existing script I had, I wrote this script. With this, I can insert ten new tapes, add an external barcode label, put the mazagine in the tape library, and in 30 minutes, have 10 new volumes.
NOTE: the following script will destroy any data on all tapes in your magazine.
#!/bin/sh
#
# Copyright 2006-2011 Dan Langille
#
# This script should be read in conjunction with
# http://www.freebsddiary.org/tape-testing.php
#
# Change this to the location of your script
#
MTX=”/usr/local/sbin/mtx-changer”
CHANGER=”/dev/${1}”
DRIVE=”/dev/${2}”
LOGGER=/usr/bin/logger
ECHO=/bin/echo
SLOTS=”1 2 3 4 5 6 7 8 9 10″
for slot in $SLOTS
do
${ECHO} loading $slot
${MTX} ${CHANGER} load $slot ${DRIVE} 0
mt -f ${DRIVE} rewind
mt -f ${DRIVE} weof
mt -f ${DRIVE} rewind
# now label that slot
echo | bconsole <<EOF
label barcodes pool=Scratch storage=DigitalTapeLibrary slot=${slot}
yes
EOF
echo ‘umount storage=DigitalTapeLibrary’ | bconsole
done
To run this script, I issue this command:
time sudo sh ~/bin/EraseTapeLabels pass11 sa0
where
- time - tells me how long the rest of the command takes
- sudo - I am running this as non-root; sudo makes me root
- pass11 - my tape changer
- sa0 - the tape drive
As I type this, I can see room for improvement:
- Use nsa0, not sa0
- Supply the storage name as a parameter (DigitalTapeLibrary)
- Supply the list of slots as a parameter
Enjoy.
Posted in General | No Comments »
May 15th, 2011
PGCon 2011 has started. The formal schedule says Tuesday, but people have already started to arrive in Ottawa and many more start their journeys today.
Late last week, there was another flurry of registrations coming in. I saw some today. I expect another peak on Monday as last minute decisions are made.
There have been a few requests for a group trip to Burger Works, Haveli, and Royal Thai for dinner. We’ll definitely be doing all of them, but I also suggest breaking into smaller groups and heading out to explore the rich social scene within walking distance of the conference venue. Oh, and don’t forget Cora’s for breakfast!
BSDCan 2011 ended yesterday, with a number of people still in town today for tourist activities. For PGCon, we’ll be doing similar on Saturday the 21st of May.
See you later this week. Safe trip.
Posted in Conferences, Open Source, PGCon, PostgreSQL | No Comments »
May 15th, 2011
Bacula is a backup and restore solution which I’ve been using and contributing to since 2004. Recently, I started backing up to disk and then copying to tape later. This approach, combined with a scratch pool, has proven to be very low maintenance, from a sysadmin point of view. I think all sysadmin will agree: the less you have to do, the better.
At this time of year, I’m away running BSDCan and PGCon. 2011 is also the first year that I’ve been doing this backup and copy solution. I now know how long my tape magazine takes to fill up when I’m not there: 16 days. That includes one set of full backups. 17 tapes or about 475GB.
Looking at The amazing Bacula time and space machine, I noticed that one full tape contained only 4665 MB of data. The volume contained only one job: 61256. I took the job id and searched my Bacula email (I keep it all, just for this situation). I found this in the output for that job:
10-May 10:09 kraken-sd JobId 61255: Wrote label to prelabeled Volume “ETU081″ on device “DTL01″ (/dev/nsa0)
10-May 10:09 kraken-sd JobId 61255: New volume “ETU081″ mounted on device “DTL01″ (/dev/nsa0) at 10-May-2011 05:09.
10-May 10:22 kraken-sd JobId 61255: End of Volume “ETU081″ at 4:13832 on device “DTL01″ (/dev/nsa0). Write of 64512 bytes got 0.
10-May 10:22 kraken-sd JobId 61255: Error: dev.c:1745 ioctl MTWEOF error on “DTL01″ (/dev/nsa0). ERR=Input/output error.
10-May 10:22 kraken-sd JobId 61255: End of medium on Volume “ETU081″ Bytes=4,892,073,984 Blocks=75,831 at 10-May-2011 05:22.
The key here is the ‘Input/output error’. Various messages can appear after the MTWEOF error, including permission denied. I think this particular situation indicates a problem with the tape media itself.
While away this trip, the tape library started acting up. I started seeing card dumps on a regular basis. I sent an email to the SCSI mailing list, and here is the output I included:
May 14 10:04:04 kraken kernel: ahc0: Recovery Initiated
May 14 10:04:04 kraken kernel: >>>>>>>>>>>>>>>>>> Dump Card State Begins < <<<<<<<<<<<<<<<<
May 14 10:04:04 kraken kernel: ahc0: Dumping Card State while idle, at SEQADDR 0x184
May 14 10:04:04 kraken kernel: Card was paused
May 14 10:04:04 kraken kernel: ACCUM = 0x0, SINDEX = 0x20, DINDEX = 0xa0, ARG_2 = 0x3f
May 14 10:04:04 kraken kernel: HCNT = 0x20 SCBPTR = 0x0
May 14 10:04:04 kraken kernel: SCSISIGI[0x0] ERROR[0x40]:(PCIERRSTAT) SCSIBUSL[0x0]
May 14 10:04:04 kraken kernel: LASTPHASE[0x1]:(P_BUSFREE) SCSISEQ[0x12]:(ENAUTOATNP|ENRSELI)
May 14 10:04:04 kraken kernel: SBLKCTL[0x2]:(SELWIDE) SCSIRATE[0x0] SEQCTL[0x10]:(FASTMODE)
May 14 10:04:04 kraken kernel: SEQ_FLAGS[0xc0]:(NO_CDB_SENT|NOT_IDENTIFIED) SSTAT0[0x4]:(SDONE)
May 14 10:04:04 kraken kernel: SSTAT1[0x0] SSTAT2[0x0] SSTAT3[0x0] SIMODE0[0x0] SIMODE1[0xa4]:(ENSCSIPERR|ENSCSIRST|ENSELTIMO)
May 14 10:04:04 kraken kernel: SXFRCTL0[0x80]:(DFON) DFCNTRL[0xc]:(DIRECTION|HDMAEN)
May 14 10:04:04 kraken kernel: DFSTATUS[0x71]:(FIFOEMP|MREQPEND|FIFOQWDEMP|DFCACHETH)
May 14 10:04:04 kraken kernel: STACK: 0xe 0xe 0xe 0x179
May 14 10:04:04 kraken kernel: SCB count = 254
May 14 10:04:04 kraken kernel: Kernel NEXTQSCB = 240
May 14 10:04:04 kraken kernel: Card NEXTQSCB = 252
May 14 10:04:04 kraken kernel: QINFIFO entries: 252
May 14 10:04:04 kraken kernel: Waiting Queue entries:
May 14 10:04:04 kraken kernel: Disconnected Queue entries:
May 14 10:04:04 kraken kernel: QOUTFIFO entries:
May 14 10:04:04 kraken kernel: Sequencer Free SCB List: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
May 14 10:04:04 kraken kernel: Sequencer SCB Info:
May 14 10:04:04 kraken kernel: 0 SCB_CONTROL[0x40]:(DISCENB) SCB_SCSIID[0x57] SCB_LUN[0x0]
May 14 10:04:04 kraken kernel: SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 1 SCB_CONTROL[0xc0]:(DISCENB|TARGET_SCB) SCB_SCSIID[0x57]
May 14 10:04:04 kraken kernel: SCB_LUN[0x0] SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 2 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 3 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 4 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 5 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 6 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 7 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 8 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 9 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 10 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 11 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 12 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 13 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 14 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: 15 SCB_CONTROL[0x0] SCB_SCSIID[0xff]:(TWIN_CHNLB|OID|TWIN_TID)
May 14 10:04:04 kraken kernel: SCB_LUN[0xff]:(SCB_XFERLEN_ODD|LID) SCB_TAG[0xff]
May 14 10:04:04 kraken kernel: Pending list:
May 14 10:04:04 kraken kernel: 252 SCB_CONTROL[0x50]:(MK_MESSAGE|DISCENB) SCB_SCSIID[0x7]
May 14 10:04:04 kraken kernel: SCB_LUN[0x0]
May 14 10:04:04 kraken kernel: Kernel Free SCB list: 238 241 251 250 247 246 245 244 243 242 239 248 249 253 237 236
235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 216 215 214 213 212 211 210 209 208 207
206 205 204 203 202 201 200 199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 184 183 182 181 180 179 178
177 176 175 174 173 172 171 170 169 168 167 166 165 164 163 162 161 160 159 158 157 156 155 154 153 152 151 150 149
148 147 146 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120
119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 98 97 96 95 94 93 92 91 90 89 88
87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50
49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12
11 10 9 8 7 6 5 4 3 2 1 0
May 14 10:04:04 kraken kernel: Untagged Q(0): 252
May 14 10:04:04 kraken kernel:
May 14 10:04:04 kraken kernel: <<<<<<<<<<<<<<<<< Dump Card State Ends >>>>>>>>>>>>>>>>>>
May 14 10:04:04 kraken kernel: (pass11:ahc0:0:0:0): SCB 0xfc - timed out
May 14 10:04:04 kraken kernel: sg[0] - Addr 0xa501040 : Length 56
May 14 10:04:04 kraken kernel: (pass11:ahc0:0:0:0): SCB 252: Immediate reset. Flags = 0×660
May 14 10:04:04 kraken kernel: (pass11:ahc0:0:0:0): no longer in timeout, status = 25b
May 14 10:04:04 kraken kernel: ahc0: Issued Channel A Bus Reset. 1 SCBs aborted
May 14 10:04:04 kraken kernel: ahc0: Timedout SCBs already complete. Interrupts may not be functioning.
This would occur every 30 minutes. I decided to disable my copy-to-tape jobs using the disable command in bconsole. This will last only until the next restart of bacula-dir.
Then I noticed that some of the jobs were taking a very long time to finish. They were waiting on something. This I realized they were waiting on the tape drive. This came to light when I noticed this in the job emails:
Termination: Backup OK — with warnings
14-May 16:05 bacula-dir JobId 61600: Begin pruning Jobs older than 3 years .
14-May 16:05 bacula-dir JobId 61600: No Jobs found to prune.
14-May 16:05 bacula-dir JobId 61600: Begin pruning Jobs.
14-May 16:05 bacula-dir JobId 61600: No Files found to prune.
14-May 16:05 bacula-dir JobId 61600: End auto prune.
14-May 16:05 bacula-dir JobId 61600: shell command: run AfterJob “/home/dan/bin/dlt-stats-kraken”
14-May 16:35 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Long Report=yes
14-May 16:35 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Valid Residual=no
14-May 16:35 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Error Code=0 (Unknown?!)
14-May 16:35 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Sense Key=No Sense
14-May 16:35 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: FileMark=no
14-May 16:35 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: EOM=no
14-May 16:35 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: ILI=no
14-May 16:35 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Additional Sense Code = 00
14-May 16:35 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Additional Sense Qualifier = 00
14-May 16:35 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: BPV=no
14-May 16:35 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Error in CDB=no
14-May 16:35 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: SKSV=no
14-May 16:35 bacula-dir JobId 61600: AfterJob: INQUIRY command Failed
14-May 17:05 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Long Report=yes
14-May 17:05 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Valid Residual=no
14-May 17:05 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Error Code=0 (Unknown?!)
14-May 17:05 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Sense Key=No Sense
14-May 17:05 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: FileMark=no
14-May 17:05 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: EOM=no
14-May 17:05 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: ILI=no
14-May 17:05 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Additional Sense Code = 00
14-May 17:05 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Additional Sense Qualifier = 00
14-May 17:05 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: BPV=no
14-May 17:05 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: Error in CDB=no
14-May 17:05 bacula-dir JobId 61600: AfterJob: mtx: Request Sense: SKSV=no
14-May 17:05 bacula-dir JobId 61600: AfterJob: INQUIRY command Failed
14-May 17:05 bacula-dir JobId 61600: AfterJob: camcontrol: error sending command
14-May 17:05 bacula-dir JobId 61600: AfterJob: (pass12:ahc0:0:5:0): LOG SENSE. CDB: 4d 0 42 0 0 0 0 0 40 0
14-May 17:05 bacula-dir JobId 61600: AfterJob: (pass12:ahc0:0:5:0): CAM status: Unconditionally Re-queue Request
14-May 17:05 bacula-dir JobId 61600: AfterJob: (standard_in) 1: syntax error
14-May 17:05 bacula-dir JobId 61600: AfterJob: [: !=: unexpected operator
14-May 17:05 bacula-dir JobId 61600: AfterJob: camcontrol: error sending mode sense command
14-May 17:05 bacula-dir JobId 61600: AfterJob: camcontrol: error sending command
14-May 17:05 bacula-dir JobId 61600: AfterJob: (pass12:ahc0:0:5:0): LOG SENSE. CDB: 4d 0 72 0 0 0 0 0 4c 0
14-May 17:05 bacula-dir JobId 61600: AfterJob: (pass12:ahc0:0:5:0): CAM status: Unconditionally Re-queue Request
14-May 17:05 bacula-dir JobId 61600: AfterJob: camcontrol: error sending command
14-May 17:05 bacula-dir JobId 61600: AfterJob: (pass12:ahc0:0:5:0): LOG SENSE. CDB: 4d 0 42 0 0 0 0 0 40 0
14-May 17:05 bacula-dir JobId 61600: AfterJob: (pass12:ahc0:0:5:0): CAM status: Unconditionally Re-queue Request
14-May 17:05 bacula-dir JobId 61600: AfterJob: (standard_in) 1: syntax error
14-May 17:05 bacula-dir JobId 61600: AfterJob: [: !=: unexpected operator
14-May 17:06 bacula-dir JobId 61600: AfterJob: camcontrol: error sending mode sense command
14-May 17:06 bacula-dir JobId 61600: AfterJob: camcontrol: error sending command
14-May 17:06 bacula-dir JobId 61600: AfterJob: (pass12:ahc0:0:5:0): LOG SENSE. CDB: 4d 0 72 0 0 0 0 0 4c 0
14-May 17:06 bacula-dir JobId 61600: AfterJob: (pass12:ahc0:0:5:0): CAM status: Unconditionally Re-queue Request
14-May 17:06 bacula-dir JobId 61600: AfterJob: Total corrected errors / GB : N/A
14-May 17:06 bacula-dir JobId 61600: AfterJob: STATUS is
14-May 17:06 bacula-dir JobId 61600: AfterJob: STATUS is
14-May 17:06 bacula-dir JobId 61600: AfterJob:
Much of that ‘AfterJob’ output is the result of my script: /home/dan/bin/dlt-stats-kraken
This script is pretty simple:
#!/bin/sh
ssh -i /home/dan/bin/ssh-kraken-dlt-stats dan@kraken /home/dan/bin/dlt-stats
It sshs to the server that runs the bacula-sd with the massive disk backup and tape library. It them asks the tape drive for the number of corrected errors, and adds it to a text file.
The problem: not all of these jobs use the tape drive. Only those going to certain pools. However, for it to be run during the copy to tape, it needs to be specified in the original job. Or, at least, that it the way the jobs are set up now.
However, since the tape drive was acting up, and no jobs were being copied to tape anyway, I decided now was an ideal time to adjust the script.
This is the new version of that script:
#!/bin/sh
VOLUME=${1}
if [ "${VOLUME}" = 'Incrementals' -o "${VOLUME}" = 'Differentials' -o "${VOLUME}" = 'Fulls' ]
then
# only record DLT stats for tape pools
ssh -i /home/dan/bin/ssh-kraken-dlt-stats dan@kraken /home/dan/bin/dlt-stats
fi
Combined with the above change, was a change to bacula-dir.conf:
RunAfterJob = “/home/dan/bin/dlt-stats-kraken %v”
This stopped the queries to the tape drive and allowed the jobs to proceed in their regular timely fashion.
However….
This solution is not correct. The RunAfterJob directive is passing %v to the script. But the script is looking at pool names (’Incrementals’, ‘Differentials’, and ‘Fulls’ are the names of my Pools uses for tape volumes). What the script needs to do is query the database for a the volume provided and see what pool it is in.
NOTE: after I changed the script, the SCSI card dumps stopped.
Posted in General | No Comments »
May 6th, 2011
I’ve been in Ottawa for a week now, preparing for both BSDCan 2011 and for PGCon 2011. Pretty much everything is done. The t-shirts are ordered. The lanyards, tote bags, and Google goodies are ready to go.
The hard stuff is done. What’s left is mostly logistics, coordination, timing, and organization.
And for you to turn up.
Two weeks from today, the final day of PGCon 2011 will start. While it becomes cliche to say so, we have an amazing line up of talks and talent.
If you’re working with PostgreSQL and want to meet others who do similar, this is the place to be. Developing good working relationships with your peers benefits you and strengthens the community at the same time.
There’s still time to book your travel and accommodation.
Follow us on:
Posted in Conferences, PGCon, PostgreSQL | 4 Comments »
|