Network-Wide Scheduler/Cron
| permanent link | writeback | edit
2010-08-22
| permanent link | writeback | edit
2010-07-30
| permanent link | writeback | edit
2010-06-25
983M amavisd.log.1.gz 389M amavisd.log.1.lzma recompress: real 626m58.615s user 617m24.011s sys 1m44.899s gzip compress: ~50m
| permanent link | writeback | edit
2010-05-15
| permanent link | writeback | edit
2010-05-14
| permanent link | writeback | edit
| permanent link | writeback | edit
# sv -v d dsnscan4 fail: dsnscan4: runsv not runningto fix - stop all runing sv's:
# SVDIR=/var/service sv -v d dsnscan4 ok: down: dsnscan4: 1s, normally up # SVDIR=/var/service sv -v d prom ok: down: prom: 1s, normally upand kill old runsv:
killall runsv-dir killall runsvand start new runsv ( all services will be up, because those 'sv d $service' are stored in different dir )
/Tips | permanent link | writeback | edit
2010-04-13
| permanent link | writeback | edit
2010-01-11
/Tips | permanent link | writeback | edit
2009-12-16
2009-09-23
/Problems | permanent link | writeback | edit
/Tips | permanent link | writeback | edit
/Tips | permanent link | writeback | edit
2009-09-13
dpkg -i --force-architecture cnijfilter-common_3.00-1_i386.deb cnijfilter-ip4600series_3.00-1_i386.deb
/Howto | permanent link | writeback | edit
2009-08-30
2009-08-22
/Howto | permanent link | writeback | edit
2009-08-10
| permanent link | writeback | edit
2009-08-07
| permanent link | writeback | edit
2009-04-30
| permanent link | writeback | edit
2009-01-28
time pvmove /dev/dm-0
Insufficient suitable contiguous allocatable extents for logical volume pvmove0: 404479 more required
Unable to allocate temporary LV for pvmove.
Fix:
time pvmove -v /dev/dm-0:1-3000
Wiping cache of LVM-capable devices
Finding volume group "spool"
Archiving volume group "spool" metadata (seqno 96).
Creating logical volume pvmove0
Moving 1 extents of logical volume spool/ebic
Found volume group "spool"
Updating volume group metadata
Creating volume group backup "/etc/lvm/backup/spool" (seqno 97).
Found volume group "spool"
Found volume group "spool"
Suspending spool-ebic (254:11)
Found volume group "spool"
Creating spool-pvmove0
Loading spool-pvmove0 table
Resuming spool-pvmove0 (254:15)
Found volume group "spool"
Loading spool-pvmove0 table
Resuming spool-pvmove0 (254:15)
Loading spool-ebic table
Resuming spool-ebic (254:11)
Checking progress every 15 seconds
/dev/dm-0: Moved: 00.0%
| permanent link | writeback | edit
2009-01-19
for n in `seq 0 0`; do echo $n; echo "scsi remove-single-device 1 0 0 $n" > /proc/scsi/scsi ; echo "scsi remove-single-device 0 0 0 $n" > /proc/scsi/scsi ; doneNow, we attached new FC LUN as 0:0:0:0 and 1:0:0:0
for n in `seq 0 0`; do echo $n; echo "scsi add-single-device 1 0 0 $n" > /proc/scsi/scsi ; echo "scsi add-single-device 0 0 0 $n" > /proc/scsi/scsi ; donenow, multipath -ll will show you, that multipath deteceted deviced with extra path to it, and created new device for it:
360060160e0b11c00d846a76e4be6dd11dm-12 DGC,VRAID [size=140G][features=1 queue_if_no_path][hwhandler=1 emc] \_ round-robin 0 [prio=1][active] \_ 1:0:0:0 sda 8:0 [active][ready] \_ round-robin 0 [prio=0][enabled] \_ 0:0:0:0 sde 8:64 [active][ready]
| permanent link | writeback | edit
2008-12-24
Personalities : [raid1]
md1 : active(auto-read-only) raid1 sdb5[1] sda5[0]
234372160 blocks [2/2] [UU]
resync = PENDING
it will stay PENDING until the end of time, or until you do:
mdadm --readwrite /dev/md1then it starts syncing:
cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb5[1] sda5[0]
234372160 blocks [2/2] [UU]
[===============>.....] resync = 75.4% (176734976/234372160) finish=12.2min speed=78556K/sec
/Tips | permanent link | writeback | edit
2008-11-05
/Howto | permanent link | writeback | edit
2008-06-25
| permanent link | writeback | edit
2008-05-14
/Diary | permanent link | writeback | edit
2008-04-14
/Diary | permanent link | writeback | edit
2008-03-13
Sep 5 2007
gnoll2:~# mdadm --create /dev/md1 --level 1 --raid-devices=2 missing /dev/hdh5
mdadm: array /dev/md1 started.
gnoll2:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 hdh5[1]
77152064 blocks [2/1] [_U]
unused devices: <none>
gnoll2:/fs/tmp# mdadm --add /dev/md1 /dev/hde5
mdadm: added /dev/hde5
gnoll2:/fs/tmp# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 hde5[2] hdh5[1]
77152064 blocks [2/1] [_U]
[>....................] recovery = 0.0% (18560/77152064) finish=414.6min speed=3093K/sec
unused devices: <none>
gnoll2:/fs/tmp#
pokurcz:/home/eyck# mdadm --create /dev/md1 -a yes --level 1 --raid-devices=2 missing /dev/sdb5
mdadm: array /dev/md1 started.
pokurcz:/home/eyck# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sdb5[1]
50002176 blocks [2/1] [_U]
unused devices: <none>
pokurcz:/home/eyck#
pokurcz:/home/eyck# mdadm --add /dev/md1 /dev/sda5
mdadm: added /dev/sda5
pokurcz:/home/eyck# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md1 : active raid1 sda5[2] sdb5[1]
50002176 blocks [2/1] [_U]
[>....................] recovery = 0.2% (139392/50002176) finish=11.9min speed=69696K/sec
unused devices: <none>
/Howto | permanent link | writeback | edit
2008-03-12
/Howto | permanent link | writeback | edit
2008-03-07
cfdisk /dev/sdb pvcreate /dev/sdb6 vgextend system /dev/sdb6 pvmove /dev/sdb6 vgreduce system /dev/sdb6 pvremove /dev/sdb6 mkfs.xfs -Lboot /dev/sdb5 time xfsdump - /dev/sda5|xfsrestore - /fs/sdb5 grub: root (hd1,5),setup(hd1)Voile'a.
| permanent link | writeback | edit
2008-02-24
/Quests | permanent link | writeback | edit
2008-02-15
/Howto | permanent link | writeback | edit
2008-02-11
root@test64:/var/backups/pg# pg_upgradecluster 8.1 main
Creating new cluster (configuration: /etc/postgresql/8.3/main, data: /var/lib/postgresql/8.3/main)...
Moving configuration file /var/lib/postgresql/8.3/main/postgresql.conf to /etc/postgresql/8.3/main...
Moving configuration file /var/lib/postgresql/8.3/main/pg_hba.conf to /etc/postgresql/8.3/main...
Moving configuration file /var/lib/postgresql/8.3/main/pg_ident.conf to /etc/postgresql/8.3/main...
Configuring postgresql.conf to use port 5433...
Disabling connections to the old cluster during upgrade...
Disabling connections to the new cluster during upgrade...
Re-enabling connections to the old cluster...
Re-enabling connections to the new cluster...
Creating globals...
Fixing hardcoded library paths for stored procedures...
Upgrading database bazkadb-user07...
Analyzing database bazkadb-user07...
Fixing hardcoded library paths for stored procedures...
Upgrading database bazkadbep...
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 1617; 2606 562236 FK CONSTRAINT fkad166f893bd6f4d7 bazka
pg_restore: [archiver (db)] could not execute query: ERROR: foreign key constraint "fkad166f893bd6f4d7" cannot be implemented
DETAIL: Key columns "id_endpoint" and "id_endpoint" are of incompatible types: character varying and integer.
Command was: ALTER TABLE ONLY user_endpoint
ADD CONSTRAINT fkad166f893bd6f4d7 FOREIGN KEY (id_endpoint) REFERENCES endpoint(id_endpoi...
WARNING: errors ignored on restore: 1
Analyzing database bazkadbep...
Fixing hardcoded library paths for stored procedures...
Upgrading database postgres...
Analyzing database postgres...
Fixing hardcoded library paths for stored procedures...
Upgrading database bazkadbep2...
Analyzing database bazkadbep2...
Fixing hardcoded library paths for stored procedures...
Upgrading database bazkadb...
Analyzing database bazkadb...
Fixing hardcoded library paths for stored procedures...
Upgrading database xwiki...
Analyzing database xwiki...
Fixing hardcoded library paths for stored procedures...
Upgrading database scheduler...
Analyzing database scheduler...
Fixing hardcoded library paths for stored procedures...
Upgrading database template1...
Analyzing database template1...
Copying old configuration files...
Copying old start.conf...
Stopping target cluster...
Stopping old cluster...
Disabling automatic startup of old cluster...
Configuring old cluster to use a different port (5433)...
Starting target cluster on the original port...
Success. Please check that the upgraded cluster works. If it does,
you can remove the old cluster with
pg_dropcluster 8.1 main
root@test64:/var/backups/pg# pg_dropcluster 8.1 main
/Howto | permanent link | writeback | edit
2008-02-01
| permanent link | writeback | edit
2008-01-25
pokurcz:/home/ftp# xfs_freeze -f /fs/tmpptc/
pokurcz:/home/ftp# lvcreate -l 500 -s -n tsnap /dev/dat/tmpptc
Logical volume "tsnap" created
pokurcz:/home/ftp# mkdir /fs/snapt
pokurcz:/home/ftp# mount -o nouuid,ro /dev/dat/tmp
tmpf tmpptc
pokurcz:/home/ftp# mount -o nouuid,ro /dev/dat/tmp
tmpf tmpptc
pokurcz:/home/ftp# mount -o nouuid,ro /dev/dat/
bck devetch fs ftp tmpf tmpptc tsnap
pokurcz:/home/ftp# mount -o nouuid,ro /dev/dat/tsnap /fs/snapt/
pokurcz:/home/ftp# xfs_freeze -u /fs/tmpptc
pokurcz:/home/ftp#
pokurcz:/home/ftp# cd /fs/tmpptc/
pokurcz:/fs/tmpptc# ls
TL1_6-install.pdf
VMware-VMvisor-InstallerCD-3.5.0-67921.i386.iso conieface.xfsdump.gz hypervisor_performance_comparison_1_0_5_with_esx-data.pdf ldap.pem q testy
pokurcz:/fs/tmpptc# touch HELLO.WORLD
pokurcz:/fs/tmpptc# ls /fs/snapt/
VMware-VMvisor-InstallerCD-3.5.0-67921.i386.iso conieface.xfsdump.gz hypervisor_performance_comparison_1_0_5_with_esx-data.pdf ldap.pem q testy
pokurcz:/fs/tmpptc#
Clean up:
pokurcz:/fs/tmpptc# umount /fs/snapt/
pokurcz:/fs/tmpptc# lvremove -f /dev/dat/
tmpf tmpptc tsnap
pokurcz:/fs/tmpptc# lvremove -f /dev/dat/tsnap
Logical volume "tsnap" successfully removed
/Howto | permanent link | writeback | edit
2008-01-22
HN:/home/eyck# pvscan PV /dev/dm-10 VG systems lvm2 [65.00 GB / 5.93 GB free] PV /dev/dm-9 VG cdb lvm2 [70.00 GB / 1.89 GB free] PV /dev/dm-8 VG spool lvm2 [797.47 GB / 81.70 GB free] PV /dev/cciss/c0d0p5 lvm2 [32.98 GB] PV /dev/cciss/c1d0p5 lvm2 [67.83 GB] PV /dev/cciss/c1d1p5 lvm2 [67.83 GB] PV /dev/cciss/c1d2p5 lvm2 [273.45 GB] PV /dev/cciss/c1d3p1 lvm2 [279.39 GB] Total: 8 [1.62 TB] / in use: 3 [932.46 GB] / in no VG: 5 [721.49 GB] HN:/home/eyck# pvremove /dev/cciss/c1d3p1 Labels on physical volume "/dev/cciss/c1d3p1" successfully wiped HN:/home/eyck# pvremove /dev/cciss/c1d2p5 Labels on physical volume "/dev/cciss/c1d2p5" successfully wiped HN:/home/eyck# pvremove /dev/cciss/c1d1p5 Labels on physical volume "/dev/cciss/c1d1p5" successfully wiped HN:/home/eyck# pvremove /dev/cciss/c0d0p5 Labels on physical volume "/dev/cciss/c0d0p5" successfully wiped HN:/home/eyck# pvremove /dev/cciss/c1d0p5 Labels on physical volume "/dev/cciss/c1d0p5" successfully wiped HN:/home/eyck# HN:/home/eyck# pvscan PV /dev/dm-10 VG systems lvm2 [65.00 GB / 5.93 GB free] PV /dev/dm-9 VG cdb lvm2 [70.00 GB / 1.89 GB free] PV /dev/dm-8 VG spool lvm2 [797.47 GB / 81.70 GB free] Total: 3 [932.46 GB] / in use: 3 [932.46 GB] / in no VG: 0 [0 ]
/Howto | permanent link | writeback | edit
2007-12-14
CREATE TABLE domains (
id serial NOT NULL,
name character varying(255) NOT NULL,
master character varying(20),
last_check integer,
"type" character varying(6) NOT NULL,
notified_serial integer,
account character varying(40)
);
CREATE TABLE records (
id serial NOT NULL,
domain_id integer,
name character varying(255),
"type" character varying(6),
content character varying(255),
ttl integer,
prio integer,
change_date integer
);
CREATE TABLE supermasters (
ip character varying(25) NOT NULL,
nameserver character varying(255) NOT NULL,
account character varying(40)
);
COPY domains (id, name, master, last_check, "type", notified_serial, account) FROM stdin;
1 kuszelas.eu \N \N NATIVE \N \N
\.
--
-- Data for TOC entry 22 (OID 17153)
-- Name: records; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY records (id, domain_id, name, "type", content, ttl, prio, change_date) FROM stdin;
2 1 localhost.kuszelas.eu A 127.0.0.1 120 \N \N
20 1 kuszelas.eu MX mail2.kuszelas.eu 300 10 \N
21 1 mail2.kuszelas.eu A 212.182.115.24 120 \N \N
1 1 kuszelas.eu SOA localhost user.kuszelas.eu 1 86400 \N \N
17 1 kuszelas.eu NS ns.kuszelas.eu 300 \N \N
18 1 kuszelas.eu MX mail.kuszelas.eu 300 5 \N
12 1 _jabber._tcp.jabber.kuszelas.eu SRV 0 5269 kuszelas.eu 300 10 \N
13 1 _xmpp-server._tcp.jabber.kuszelas.eu SRV 0 5269 kuszelas.eu 300 10 \N
14 1 _xmpp-client._tcp.jabber.kuszelas.eu SRV 0 5222 kuszelas.eu 300 10 \N
16 1 kuszelas.eu TXT Serwer 300 \N \N
3 1 www.kuszelas.eu A 195.242.124.71 120 \N \N
5 1 dns.kuszelas.eu A 195.242.124.71 120 \N \N
6 1 ftp.kuszelas.eu A 195.242.124.71 120 \N \N
7 1 poczta.kuszelas.eu A 195.242.124.71 120 \N \N
8 1 pop3.kuszelas.eu A 195.242.124.71 120 \N \N
9 1 smtp.kuszelas.eu A 195.242.124.71 120 \N \N
10 1 ssh.kuszelas.eu A 195.242.124.71 120 \N \N
11 1 jabber.kuszelas.eu A 195.242.124.71 120 \N \N
4 1 mail.kuszelas.eu A 195.242.124.71 120 \N \N
\.
Audit trail:
CREATE TABLE audit_domains (
operation char(1) NOT NULL,
stamp timestamp NOT NULL,
userid text NOT NULL,
id serial NOT NULL,
name character varying(255) NOT NULL,
master character varying(20),
last_check integer,
"type" character varying(6) NOT NULL,
notified_serial integer,
account character varying(40)
);
CREATE TABLE audit_records (
operation char(1) NOT NULL,
stamp timestamp NOT NULL,
userid text NOT NULL,
id serial NOT NULL,
domain_id integer,
name character varying(255),
"type" character varying(6),
content character varying(255),
ttl integer,
prio integer,
change_date integer
);
CREATE OR REPLACE FUNCTION process_audit_domains() RETURNS TRIGGER AS $audit_domains$
BEGIN
--
-- Create a row in audit_domains to reflect the operation performed on domains,
-- make use of the special variable TG_OP to work out the operation.
--
IF (TG_OP = 'DELETE') THEN
INSERT INTO audit_domains SELECT 'D', now(), user, OLD.*;
RETURN OLD;
ELSIF (TG_OP = 'UPDATE') THEN
INSERT INTO audit_domains SELECT 'U', now(), user, NEW.*;
RETURN NEW;
ELSIF (TG_OP = 'INSERT') THEN
INSERT INTO audit_domains SELECT 'I', now(), user, NEW.*;
RETURN NEW;
END IF;
RETURN NULL; -- result is ignored since this is an AFTER trigger
END;
$audit_domains$ LANGUAGE plpgsql;
CREATE TRIGGER audit_domains
AFTER INSERT OR UPDATE OR DELETE ON domains
FOR EACH ROW EXECUTE PROCEDURE process_audit_domains();
--
CREATE OR REPLACE FUNCTION process_audit_records() RETURNS TRIGGER AS $audit_records$
BEGIN
--
-- Create a row in audit_records to reflect the operation performed on records,
-- make use of the special variable TG_OP to work out the operation.
--
IF (TG_OP = 'DELETE') THEN
INSERT INTO audit_records SELECT 'D', now(), user, OLD.*;
RETURN OLD;
ELSIF (TG_OP = 'UPDATE') THEN
INSERT INTO audit_records SELECT 'U', now(), user, NEW.*;
RETURN NEW;
ELSIF (TG_OP = 'INSERT') THEN
INSERT INTO audit_records SELECT 'I', now(), user, NEW.*;
RETURN NEW;
END IF;
RETURN NULL; -- result is ignored since this is an AFTER trigger
END;
$audit_records$ LANGUAGE plpgsql;
CREATE TRIGGER audit_records
AFTER INSERT OR UPDATE OR DELETE ON records
FOR EACH ROW EXECUTE PROCEDURE process_audit_records();
/Howto | permanent link | writeback | edit
2007-12-13
host:/fs/t# dd_rescue /dev/zero test
dd_rescue: (info): ipos: 5831680.0k, opos: 5831680.0k, xferd: 5831680.0k
errs: 0, errxfer: 0.0k, succxfer: 5831680.0k
+curr.rate: 493402kB/s, avg.rate: 141304kB/s, avg.load: 34.6%
host:/fs/t# dd_rescue /dev/zero test
dd_rescue: (info): ipos: 22496256.0k, opos: 22496256.0k, xferd: 22496256.0k
errs: 0, errxfer: 0.0k, succxfer: 22496256.0k
+curr.rate: 366322kB/s, avg.rate: 150428kB/s, avg.load: 38.7%
IO/s: 590
Write BW: 148MB/s
host:/fs/t# time dd_rescue -w /dev/zero test
dd_rescue: (info): ipos: 535740416.0k, opos: 535740416.0k, xferd: 535740416.0k
errs: 0, errxfer: 0.0k, succxfer: 535740416.0k
+curr.rate: 28755kB/s, avg.rate: 151774kB/s, avg.load: 41.6%
real 58m53.858s
user 0m25.982s
sys 24m2.210s
2007-12-08
/Tips | permanent link | writeback | edit
2007-12-04