[root@centos5 centos5]# virt-install --nographics What is the name of your virtual machine? centos5 How much RAM should be allocated (in megabytes)? 512 What would you like to use as the disk (path)? /home/centos5/vm_img How large would you like the disk (/home/centos5/vm_img) to be (in gigabytes)? 4 What is the install location? http://ftp.riken.jp/Linux/centos/5/os/i386/ Starting install... libvir: Xen Daemon error : POST operation failed: (xend.err "Error creating domain: (22, 'Invalid argument')") Failed to create domain centos5 Traceback (most recent call last): File "/usr/sbin/virt-install", line 447, in ? main() File "/usr/sbin/virt-install", line 411, in main dom = guest.start_install(conscb) File "/usr/lib/python2.4/site-packages/virtinst/ParaVirtGuest.py", line 220, in start_install return XenGuest.XenGuest.start_install(self, consolecb) File "/usr/lib/python2.4/site-packages/virtinst/XenGuest.py", line 367, in start_install self.domain = self.conn.createLinux(cxml, 0) File "/usr/lib64/python2.4/site-packages/libvirt.py", line 249, in createLinux if ret is None:raise libvirtError('virDomainCreateLinux() failed') libvirt.libvirtError: virDomainCreateLinux() failed [root@centos5 centos5]# エラーで導入できず |
[root@centos ~]# virt-install --nographics ← 仮想マシンインストール開始 What is the name of your virtual machine? CentOS5 ← 任意の仮想マシン名を応答 How much RAM should be allocated (in megabytes)? 512 ← 仮想マシンへ割当てるメモリ量応答(単位:MB)※ ※ドメイン0上のメモリに仮想マシンに割当てる分の空きが必要 What would you like to use as the disk (path)? /home/centos5/vm_img ← 仮想マシンインストール先仮想ディスクイメージファイル名応答 How large would you like the disk (/home/centos5/vm_img) to be (in gigabytes)? 10 ← 仮想マシンインストール先仮想ディスクイメージファイルサイズ応答※ ※ファイルサイズは任意だが、最低でも10GBくらいは必要 What is the install location? http://ftp.riken.jp/Linux/centos/5/os/i386/ ← 仮想マシンインストールパッケージ取得先応答 Starting install... テキストモード(英語)による通常のインストールが開始する ※カーソル移動はTABキー、カーソルキーで、選択はSPACEキーで、決定はENTERキー押下 Welcome to CentOS +---------+ Choose a Language +---------+ | | | What language would you like to use | | during the installation process? | | | | Catalan ^ | | Chinese(Simplified) : | | Chinese(Traditional) # | | Croatian : | | Czech : | | Danish : | | Dutch : | | English v | | | | +----+ | | | OK | | | +----+ | | | +---------------------------------------+ 途中、省略 +----------------------+ Complete +-----------------------+ | | | Congratulations, your CentOS installation is complete. | | | | Remove any media used during the installation process | | and press |
sarge:/home/db# /etc/init.d/postgresql start Starting PostgreSQL database server: postmaster(FAILED) ERROR: ERROR: PostgreSQL postmaster did not start because of an unknown reason. PostgreSQL's init script (/etc/init.d/postgresql) attempted to start the postmaster, however, this failed because of an unknown reason. This should not happen and is a serious problem. Please examine the situation (please take a look at the log files). If you know the reason why it failed and, then please file a bug report to Debian (unless the reason is something obvious like a full disk). Debian PostgreSQL postgresql.log には FATAL: terminating connection due to administrator command LOG: checkpoint record is at A/2EE37DB0 LOG: redo record is at A/2EE37DB0; undo record is at 0/0; shutdown TRUE LOG: next transaction ID: 2668522; next OID: 11032757 LOG: database system is ready LOG: received fast shutdown request LOG: shutting down LOG: database system is shut down LOG: database system was shut down at 2008-09-12 07:52:24 JST LOG: checkpoint record is at A/2EE37DF0 LOG: redo record is at A/2EE37DF0; undo record is at 0/0; shutdown TRUE LOG: next transaction ID: 2668522; next OID: 11032757 LOG: database system is ready LOG: received fast shutdown request LOG: shutting down LOG: database system is shut down LOG: database system was interrupted at 2008-09-12 11:42:06 JST LOG: could not open file "/tmp/SlaveDisk/var/lib/postgres/data/pg_xlog/00000003 00000080" (log file 3, segment 128): No such file or directory LOG: invalid primary checkpoint record LOG: could not open file "/tmp/SlaveDisk/var/lib/postgres/data/pg_xlog/00000003 00000080" (log file 3, segment 128): No such file or directory LOG: invalid secondary checkpoint record PANIC: could not locate a valid checkpoint record pg_resetxlog をソースからコンパイルをする。 postgres@sarge:~$pg_resetxlog -f /var/lib/postgres/data pg_resetxlogによりなんとか postgresql は起動できるようになったのですが 実際のテーブルを開こうとすると、下記のようになりました postgres@sarge:~$ psql hanbai psql: FATAL: could not open relation "pg_trigger": No such file or directory postres@sarge:~$ postgres@sarge:~/data/base/3694877$ ls 1247 16404 16604 16618 16636 16652 17070 17094 3694898 1249 16406 16605 16619 16637 16653 17072 17095 3694900 1255 16408 16606 16620 16638 16656 17074 17097 3694902 1259 16410 16607 16621 16639 16658 17075 17099 3694904 16384 16412 16608 16624 16640 16659 17077 3694878 3694906 16386 16414 16609 16625 16641 16661 17079 3694880 3694908 16388 16416 16610 16626 16642 16665 17080 3694882 3694910 16390 16418 16611 16629 16643 16667 17082 3694884 3694912 16392 16595 16612 16630 16644 16671 17084 3694886 3694917 16394 16597 16613 16631 16647 16673 17085 3694888 PG_VERSION 16396 16599 16614 16632 16648 16674 17087 3694890 pg_internal.init 16398 16601 16615 16633 16649 16676 17089 3694892 16400 16602 16616 16634 16650 16680 17090 3694894 16402 16603 16617 16635 16651 16682 17092 3694896 postgres@sarge:~/data/base/3694877$ cd .. postgres@sarge:~/data/base$ ls 1 17141 3694877 4248402 postgres@sarge:~/data/base$ cd 1 postgres@sarge:~/data/base/1$ ls 1247 16398 16595 16609 16620 16635 16648 16667 17077 17095 1249 16400 16597 16610 16621 16636 16649 16671 17079 17097 1255 16402 16599 16611 16624 16637 16650 16673 17080 17099 1259 16404 16601 16612 16625 16638 16651 16674 17082 PG_VERSION 16384 16406 16602 16613 16626 16639 16652 16676 17084 pg_internal.init 16386 16408 16603 16614 16629 16640 16653 16680 17085 16388 16410 16604 16615 16630 16641 16656 16682 17087 16390 16412 16605 16616 16631 16642 16658 17070 17089 16392 16414 16606 16617 16632 16643 16659 17072 17090 16394 16416 16607 16618 16633 16644 16661 17074 17092 16396 16418 16608 16619 16634 16647 16665 17075 17094 postgres@sarge:~/data/base/1$ postgres@sarge:~/data/base$ cd 17141 postgres@sarge:~/data/base/17141$ ls 1247 16398 16595 16609 16620 16635 16648 16667 17077 17095 1249 16400 16597 16610 16621 16636 16649 16671 17079 17097 1255 16402 16599 16611 16624 16637 16650 16673 17080 17099 1259 16404 16601 16612 16625 16638 16651 16674 17082 PG_VERSION 16384 16406 16602 16613 16626 16639 16652 16676 17084 pg_internal.init 16386 16408 16603 16614 16629 16640 16653 16680 17085 16388 16410 16604 16615 16630 16641 16656 16682 17087 16390 16412 16605 16616 16631 16642 16658 17070 17089 16392 16414 16606 16617 16632 16643 16659 17072 17090 16394 16416 16607 16618 16633 16644 16661 17074 17092 16396 16418 16608 16619 16634 16647 16665 17075 17094 postgres@sarge:~/data/base/17141$ postgres@sarge:~/data/base/4248402$ ls 1247 16667 4248645 4249292 4250560 5578033 5696108 5696203 1249 16671 4248647 4249411 4250574 5578035 5696110 5696205 1255 16673 4248649 4249415 4250576 5696002 5696114 5696207 1259 16674 4248651 4249419 4250579 5696004 5696115 5696209 16384 16676 4248652 4249460 4250583 5696021 5696116 5696211 16386 16680 4248654 4249500 4250598 5696026 5696117 5696213 16388 16682 4248658 4249510 4250600 5696029 5696119 5696216 16390 17070 4248665 4249514 4250603 5696031 5696121 5696217 16392 17072 4248667 4249927 4250612 5696035 5696123 5696219 16394 17074 4248668 4249929 4250614 5696037 5696125 5696221 16396 17075 4248670 4249932 4250625 5696039 5696127 5696222 16398 17077 4248674 4249936 4250628 5696040 5696131 5696224 16400 17079 4248724 4249943 4250630 5696042 5696133 5696226 16402 17080 4248729 4249947 4250631 5696044 5696135 5696227 16404 17082 4248731 4249987 4250716 5696045 5696137 5699790 16406 17084 4248732 4250124 4250718 5696049 5696138 5699792 16408 17085 4248734 4250126 4250720 5696051 5696141 5703353 16408以降が少し抜けているのがポイント 16629 17087 4248781 4250129 4250724 5696053 5696142 5703355 16630 17089 4248809 4250133 4250728 5696054 5696143 5703357 16631 17090 4248813 4250158 4250732 5696056 5696145 5703363 16632 17092 4248817 4250162 4250744 5696060 5696147 5703365 16633 17094 4248819 4250166 5469791 5696062 5696149 5703367 16634 17095 4248821 4250214 5469792 5696063 5696150 5703369 16635 17097 4248829 4250216 5469794 5696064 5696156 5703371 16636 17099 4248833 4250219 5469795 5696068 5696160 5703373 16637 4248403 4249243 4250249 5469796 5696070 5696162 5703374 16638 4248405 4249245 4250251 5469797 5696072 5696164 5703379 16639 4248412 4249248 4250254 5473829 5696074 5696168 5703381 16640 4248417 4249250 4250261 5473834 5696075 5696170 5703383 16641 4248421 4249252 4250295 5473836 5696079 5696174 5703385 16642 4248429 4249255 4250297 5473838 5696080 5696176 5703387 16643 4248566 4249257 4250300 5473967 5696082 5696177 5703421 16644 4248568 4249259 4250319 5494898 5696084 5696179 5703423 16647 4248571 4249262 4250321 5494906 5696086 5696181 5703425 16648 4248575 4249264 4250324 5515816 5696087 5696183 5703426 16649 4248579 4249266 4250331 5515820 5696090 5696185 5703438 16650 4248584 4249268 4250340 5516320 5696091 5696187 5703440 16651 4248588 4249270 4250342 5516322 5696092 5696188 5703442 16652 4248592 4249273 4250352 5520879 5696094 5696190 5703443 16653 4248600 4249277 4250356 5520881 5696096 5696192 5703445 16656 4248625 4249279 4250358 5521364 5696098 5696194 5747040 16658 4248629 4249281 4250550 5521366 5696100 5696196 5747042 16659 4248632 4249284 4250553 5525420 5696102 5696198 PG_VERSION 16661 4248634 4249288 4250555 5577845 5696104 5696200 pg_internal.init 16665 4248637 4249290 4250557 5578027 5696106 5696201 pgsql_tmp postgres@sarge:~/data/base/4248402$ postgres@sarge:/var/lib/postgres.org/data/base/7439119$ ls 1247 16640 7439327 7440091 7441124 9599561 9599747 9685842 1249 16641 7439329 7440099 7441126 9599563 9599749 9685848 1255 16642 7439331 7440101 7441127 9599565 9599751 9685850 1259 16643 7439333 7440520 7441130 9599567 9599753 9685852 16384 16644 7439334 7440522 7441133 9599584 9599755 9685854 16386 16647 7439336 7440523 7441135 9599589 9599756 9685856 16388 16648 7439343 7440525 7441136 9599592 9599757 9685857 16390 16649 7439345 7440530 7441143 9599594 9599759 9685858 16392 16650 7439346 7440532 7441145 9599598 9599760 9685859 16394 16651 7439348 7440570 7441146 9599600 9599761 9685860 16396 16652 7439396 7440707 7441155 9599602 9599763 9685862 16398 16653 7439401 7440709 7441157 9599603 9599765 9685864 16400 16656 7439403 7440710 7441166 9599605 9599767 9685866 16402 16658 7439404 7440712 7441169 9599607 9599768 9685868 16404 16659 7439449 7440735 7441171 9599608 9599770 9685870 16406 16661 7439475 7440737 7441172 9599612 9599772 9685872 16408 16665 7439477 7440739 7441178 9599614 9599774 9685874 16410 16667 7439479 7440739.1 7441180 9599616 9599776 9685880 16412 16671 7439481 7440787 7441181 9599617 9599778 9685906 16414 16673 7439486 7440789 7441251 9599619 9599780 9685908 16416 16674 7439488 7440790 7441253 9599621 9599782 9685910 16418 16676 7439898 7440820 7441255 9599623 9599784 9685911 16595 16680 7439900 7440822 7441257 9599625 9599786 9685923 16597 16682 7439901 7440823 7441259 9599626 9599788 9685925 16599 17070 7439903 7440830 7441269 9599627 9599831 9685927 16601 17072 7439905 7440864 7441271 9599631 9599833 9685928 16602 17074 7439906 7440866 7441273 9599633 9599835 9685930 16603 17075 7439908 7440867 7441275 9599635 9599836 9685932 16604 17077 7439910 7440886 7441277 9599637 9599838 9685934 16605 17079 7439911 7440888 7441279 9599638 9599840 9685935 16606 17080 7439913 7440889 7441404 9599640 9599842 9685937 16607 17082 7439915 7440896 7441406 9599642 9599844 9685939 16608 17084 7439917 7440905 7441410 9599643 9599846 9685941 16609 17085 7439918 7440907 7441418 9599645 9599847 9685943 16610 17087 7439920 7440915 7441420 9599647 9599849 9685945 16611 17089 7439922 7440919 7441421 9599649 9599851 9685947 16612 17090 7439924 7440921 7441423 9599650 9599853 9685950 16613 17092 7439925 7440922 7441425 9599651 9599855 9716000 16614 17094 7439927 7440924 7441427 9599653 9599857 9716002 16615 17095 7439929 7440928 7441429 9599654 9599859 9716004 16616 17097 7439931 7440930 9599310 9599655 9599860 9716006 16617 17099 7439932 7440937 9599311 9599657 9599862 9716023 16618 7439120 7439934 7440955 9599313 9599659 9599864 9716025 16619 7439125 7439936 7440957 9599314 9599661 9599866 9716026 16620 7439127 7439937 7440959 9599315 9599663 9599868 9716029 16621 7439133 7439939 7440961 9599316 9599665 9599870 9716031 16624 7439270 7439941 7440966 9599342 9599667 9599872 9737449 16625 7439272 7439943 7441072 9599343 9599669 9599873 9737451 16626 7439273 7439945 7441074 9599373 9599671 9599875 9737454 16629 7439275 7439948 7441075 9599377 9599673 9599876 9737456 16630 7439277 7439955 7441084 9599383 9599675 9599878 9737457 16631 7439280 7439957 7441089 9599393 9599677 9599880 9737459 16632 7439282 7439964 7441091 9599405 9599678 9599881 9737461 16633 7439284 7439969 7441092 9599417 9599679 9599883 9737463 16634 7439290 7440007 7441097 9599419 9599680 9599885 9737464 16635 7439313 7440009 7441099 9599423 9599682 9599886 9746046 16636 7439315 7440010 7441100 9599425 9599739 9642862 9754615 16637 7439318 7440012 7441102 9599521 9599741 9642864 PG_VERSION 16638 7439320 7440014 7441104 9599527 9599743 9685838 pg_internal.init 16639 7439321 7440053 7441105 9599559 9599745 9685840 pgsql_tmp postgres@sarge:psql hanbai hanbai=> \dt ERROR: cache lookup failed for relation 4248403 hanbai=> \q 別の方法でデータの復旧を行う。 16408から32個のファイルをcopy する。 壊れた DBを起動する、うまく起動できれば対象のテーブルを pg_class から見つける。 正しく動くDBへ 必要なデータをcopy する、その後データの名前を動くものと置き換える。 |