Dariush Debian Diary

About

Diariusz Dariusza

index | rss1.0

Categories

Archives

Valid XHTML 1.1 | Valid CSS
powered by blosxom.

2008-12-24

linux software raid get's marked as 'auto-ready-only', and resync stays PENDING indefinitely...

(This happened after changing kernel from the one that saw raid members as /dev/sdb5 and /dev/sdc5, to one that saw it as /dev/sda5 and /dev/sdb5.)
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/md1
then 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

2008-11-05

Upgrading Postgresql from 8.1 to 8.3 (debian lenny transition)

apt-get install postgresql ( this install postgresql-8.3 ) pg_dropcluster --stop 8.3 main kakofonix:/var/backups/pg# pg_upgradecluster -v 8.3 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 agenericdatabase... Analyzing database agenericdatabase... Fixing hardcoded library paths for stored procedures... Upgrading database anotherdb... Analyzing database anotherdb... Fixing hardcoded library paths for stored procedures... Upgrading database postgres... Analyzing database postgres... Fixing hardcoded library paths for stored procedures... Upgrading database template1... pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 1502; 1262 1 DATABASE template1 postgres pg_restore: [archiver (db)] could not execute query: ERROR: database "template1" already exists Command was: CREATE DATABASE template1 WITH TEMPLATE = template0 ENCODING = 'SQL_ASCII'; WARNING: errors ignored on restore: 1 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

2008-06-25

Comprehensive Guide To Life for Geeks, Aliens and Artificial Lifeforms

Chapter 7: Driving.

2008-05-14

DCPromo - upgrade from 2000 to 2003 and Beyond

Domain: 2003 Functional Level: - universal groups - group nesting - group type conversion - SID history - Constrained delegation - lastLogoTimestamp updates (updated and replicated) - ability to set userPassword attribute as the effective password on inetOrgPerson and user objects - ability to redirect Users and Computers containers 2008 Functional Level: - DFS replication support for SYSVOL - AES 128 and AES256 support for Kerberos - Last Interactive Logon information (last successful interactive logon for a user, number of failed logons ) - Fine-grained password policies ( password/account lockout policies for users and global security groups)

2008-04-14

Tai Ji Quan - Long Form

1. Taiji 2. Wróbel Prawy ( You Lan Que Wei ) 3. Wróbel Lewy (Zuo Lan Que Wei) 4. Odparowanie (Peng-) 5. Sciagniecie (-Lu-) 6. Nacisk (-Ji-) 7. Pchniecie (-An) 8. Bicz (Dan Bian) 9. Uniesienie Rak(Ti Shou Shang Shi) 10. Zuraw (Bai He Liang Chi) 11. Zgarniecie Z Kolana, Lewo (Zuo Lou Xi Yao Bu) 12. Lutnia (Shou Hui Pi Pa) 13. Zgarniecie z kolana, lewo (Zuo Lou Xi Yao Bu) 14. Zgarniecie z kolana, prawo (You Lou Xi Yao Bu) 15. Zgarniecie z kolana, lewo (Zou Lou Xi Yao Bu) 16. Lutnia (Shou Hui Pi Pa) 17. Zgarniecie z kolana, lwo ( Zuo Lou Xi Yao Bu) 18. Uderzenie piescia z gory (Pie Shen Chui) 19. yada yada cios (Jin Bu Ban Lan Chui) 20. Ciasne Zapieczetowanie(Ru Feng Si Bi) 21. Objecie tygrysa, powrot do gory (Bao Hu Gui Shan) ... Part 2: .... 23. Peng-Lu-Ji-An 24. Bicz 25. Piesc pod lokiec (Zhou Di Kan Chui) 26. Malpa lewo (Zuo Dao Nian Hou) 27. Malpa prawo (You Dao Nian Hou) 28. Malpa lewo (Zuo Dao Nian Hou) 29. Lot ukosny (Xie Fei Shi) 30. Uniesienie rak (TI Shou Shang Shi) 31. Zuraw (Bai He Liang Chi) 32. Zgarniecie z kolana, lewo (Zou Lou Xi Yao Bu) 33. Igla na dnie morza (Hai Di Lao Zhen 34. Wachlarz przez plecy (Shan Tong Bei) 35. piescia z gory (Zhuan Shen Pie Shen Chui) 36. Przechwycenie i uderzenie (Jin Bu Ban Lan Chui) 37. ... Shan Bu, Peng-Lu-Ji-An ( blok, obrot stopy, pchniecie... ) 38. Dan Bian (Bicz) 39. Dlonie-Chmury-Prawo (You Yun Shou) 40. Dlonie-Chmury-Lewo (Zuo Yun Shou) 41. Dlonie-Chmury-Prawo (You Yun Shou) 42. Dan Bian (Bicz) 43. stan wysoko szukaj konia (Gao Tan Ma) 44. Kopniecie Rozdzielajace Prawo (You Fen Jiao) 45. Kopniecie Rozdzielajace Lewo (Zuo Fen Jiao) 46. Obrot(90) i kopniecie lewa pieta (Zhuan Shen Deng Jiao) 47. Zgarniecie z kolana lewo (Zuo Lou Xi Yao Bu) 48. Zgarniecie z kolana prawo (You Lou Xi Yao Bu) 49. Krok, cios piescia w ziemie (Jin Bu Zai Chui)

2008-03-13

Create Degraded Raid1

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>

2008-03-12

VMWare Server on debian etch requirements

ii libx11-6 1.0.3-7 X11 client-side library ii libx11-data 1.0.3-7 X11 client-side library ii libxau6 1.0.1-2 X11 authorisation library ii libxcomposite1 0.3-3 X11 Composite extension library ii libxdmcp6 1.0.1-2 X11 Display Manager Control Protocol library ii libxext6 1.0.1-2 X11 miscellaneous extension library ii libxfixes3 4.0.1-5 X11 miscellaneous 'fixes' extension library ii libxi6 1.0.1-4 X11 Input extension library ii libxrender1 0.9.1-3 X Rendering Extension client library ii libxt6 1.0.2-2 X11 toolkit intrinsics library ii libxtst6 1.0.1-5 X11 Testing -- Resource extension library

2008-03-07

Replacing disk with larger - Vista vs Linux

  1. Linux:
    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.
  2. Vista: ntfsclone --overwrite /dev/sdb1 /dev/sda1 restart -> Vista Install Disk -> Repair 2 additional restarts to install disk driver(sic!)

2008-02-24

T/TCP for FTP transfers

using T/TCP for FTP transfers turns FTP from ideal 'File Transfer Protocol', into ideal 'Files Transfer Protocol' (by reducing cost(bandwidth and time) of transfering multiple files (RFC 1379) Similiar effect half-closing tcp might have...(??)

2008-02-15

Installing fairly featurefull perl on win32

1) get openssl-win32 2) install strawberry perl 3) (if your openssl include Crypt::SSLeay with correct perl version, go for it, if not - perl -MCPAN -e shell install Crypt::SSLeay - fails. go to cpan build dir, perl Makefile.PL;dmake => works. dmake install Next, Net::SSLeay - repeat, it fails, because it forgets about ssleay.a files.. copy their paths from Makefile for Crypt::SSLeay (EXTRALIBS vs LDLOADLIBS) install Tk, Net::SSLeay::Handle, Win32::Process... and voilea..

2008-02-11

Upgrading postgres from 8.1 to 8.3 on debian etch:


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

2008-02-01

maja:/shit# pvscan PV /dev/cciss/c0d0p5 VG gucio lvm2 [270.08 GB / 0 free] PV /dev/cciss/c0d1p1 VG gucio lvm2 [33.91 GB / 1.98 GB free] PV /dev/sda5 VG gucio lvm2 [318.09 GB / 318.09 GB free] Total: 3 [622.07 GB] / in use: 3 [622.07 GB] / in no VG: 0 [0 ] maja:/shit# pvmove /dev/cciss/c0d1p1 /dev/cciss/c0d1p1: Moved: 1.1% /dev/cciss/c0d1p1: Moved: 1.9% /dev/cciss/c0d1p1: Moved: 2.7% /dev/cciss/c0d1p1: Moved: 4.3% /dev/cciss/c0d1p1: Moved: 6.6% /dev/cciss/c0d1p1: Moved: 8.6% maja:/shit# pvmove /dev/cciss/c0d1p1 /dev/cciss/c0d1p1: Moved: 1.1% /dev/cciss/c0d1p1: Moved: 1.9% /dev/cciss/c0d1p1: Moved: 2.7% /dev/cciss/c0d1p1: Moved: 4.3% /dev/cciss/c0d1p1: Moved: 6.6% /dev/cciss/c0d1p1: Moved: 8.6% /dev/cciss/c0d1p1: Moved: 10.0% /dev/cciss/c0d1p1: Moved: 11.4% /dev/cciss/c0d1p1: Moved: 13.2% /dev/cciss/c0d1p1: Moved: 15.4% /dev/cciss/c0d1p1: Moved: 17.3% /dev/cciss/c0d1p1: Moved: 18.7% /dev/cciss/c0d1p1: Moved: 20.2% /dev/cciss/c0d1p1: Moved: 21.5% /dev/cciss/c0d1p1: Moved: 22.8% /dev/cciss/c0d1p1: Moved: 25.2% /dev/cciss/c0d1p1: Moved: 27.5% /dev/cciss/c0d1p1: Moved: 29.5% /dev/cciss/c0d1p1: Moved: 31.4% /dev/cciss/c0d1p1: Moved: 32.8% /dev/cciss/c0d1p1: Moved: 34.3% /dev/cciss/c0d1p1: Moved: 35.6% /dev/cciss/c0d1p1: Moved: 37.7% /dev/cciss/c0d1p1: Moved: 40.0% /dev/cciss/c0d1p1: Moved: 42.0% /dev/cciss/c0d1p1: Moved: 43.4% /dev/cciss/c0d1p1: Moved: 44.7% /dev/cciss/c0d1p1: Moved: 46.7% /dev/cciss/c0d1p1: Moved: 49.1% /dev/cciss/c0d1p1: Moved: 51.3% /dev/cciss/c0d1p1: Moved: 52.8% /dev/cciss/c0d1p1: Moved: 54.2% /dev/cciss/c0d1p1: Moved: 55.8% /dev/cciss/c0d1p1: Moved: 57.9% /dev/cciss/c0d1p1: Moved: 59.3% /dev/cciss/c0d1p1: Moved: 60.7% /dev/cciss/c0d1p1: Moved: 62.8% /dev/cciss/c0d1p1: Moved: 64.5% /dev/cciss/c0d1p1: Moved: 65.8% /dev/cciss/c0d1p1: Moved: 67.4% /dev/cciss/c0d1p1: Moved: 69.5% /dev/cciss/c0d1p1: Moved: 71.4% /dev/cciss/c0d1p1: Moved: 72.9% /dev/cciss/c0d1p1: Moved: 74.4% /dev/cciss/c0d1p1: Moved: 75.7% /dev/cciss/c0d1p1: Moved: 77.0% /dev/cciss/c0d1p1: Moved: 78.4% /dev/cciss/c0d1p1: Moved: 79.7% /dev/cciss/c0d1p1: Moved: 81.6% /dev/cciss/c0d1p1: Moved: 83.3% /dev/cciss/c0d1p1: Moved: 84.7% /dev/cciss/c0d1p1: Moved: 86.1% /dev/cciss/c0d1p1: Moved: 87.8% /dev/cciss/c0d1p1: Moved: 89.7% /dev/cciss/c0d1p1: Moved: 91.3% /dev/cciss/c0d1p1: Moved: 92.6% /dev/cciss/c0d1p1: Moved: 94.0% /dev/cciss/c0d1p1: Moved: 95.7% /dev/cciss/c0d1p1: Moved: 97.6% /dev/cciss/c0d1p1: Moved: 99.4% /dev/cciss/c0d1p1: Moved: 100.0% maja:/shit#

2008-01-25

Backups with snapshots

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

2008-01-22

Remove disks from lvm

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   ]

Kerberos and k5start

kadmin -k -p eyck@DOMAIN