<pretabindex="0"><code>kvm: -drive file=/zp/images/100/vm-100-disk-1.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=none,aio=native,detect-zeroes=on: file system may not support O_DIRECT
<pre><code>kvm: -drive file=/zp/images/100/vm-100-disk-1.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=none,aio=native,detect-zeroes=on: file system may not support O_DIRECT
kvm: -drive file=/zp/images/100/vm-100-disk-1.qcow2,if=none,id=drive-virtio0,format=qcow2,cache=none,aio=native,detect-zeroes=on: Could not open '/zp/images/100/vm-100-disk-1.qcow2': Invalid argument
<h3id="strongfont-colorred必須手動設定路由fontstrong"><!-- raw HTML omitted --><!-- raw HTML omitted -->必須手動設定路由<!-- raw HTML omitted --><!-- raw HTML omitted --></h3>
<h4id="update">Update</h4>
<pretabindex="0"><code>這邊可能是我有誤解,應該不需要先在pve 本機設定 10G網卡的 IP
Tuesday 24 December 2019 14:28:58 +0800 (0:00:00.067) 0:00:00.946 ******
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: Exception: b'Error: no DISPLAY environment variable specified\n'
<p>DNS 管理基本上都是大同小異啦,可是namecheap 免費賬戶不提供 API ,應該說要使用namecheap 提供的API ,需要滿足以下的條件</p>
<pretabindex="0"><code>I want to enable API for my account. Are there any specific requirements?
<pre><code>I want to enable API for my account. Are there any specific requirements?
We have certain requirements for activation to prevent system abuse. In order to have API enabled for your account, you should meet one of the following requirements:
2019-09-04 16:41:17.697 P00 INFO: last backup label = 20190904-134245F, version = 2.16
2019-09-04 16:41:18.607 P00 INFO: execute non-exclusive pg_start_backup() with label "pgBackRest backup started at 2019-09-04 16:41:17": backup begins after the next regular checkpoint completes
@ -425,7 +425,7 @@ WARN: a timeline switch has occurred since the last backup, enabling delta check
<pretabindex="0"><code>2019-09-10 13:24:03 [minion@hqdc075 ~]$ for i in {4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384};do sudo dd if=/dev/zero of=/mnt/"$i"k bs="$i"k count=1k;done
<pre><code>2019-09-10 13:24:03 [minion@hqdc075 ~]$ for i in {4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384};do sudo dd if=/dev/zero of=/mnt/"$i"k bs="$i"k count=1k;done
<pretabindex="0"><code>The default language for this Metabase instance.This only applies to emails, Pulses, etc. Users' browsers will specify the language used in the user interface.
<pre><code>The default language for this Metabase instance.This only applies to emails, Pulses, etc. Users' browsers will specify the language used in the user interface.
<pretabindex="0"><code>PG-Strom module must be loaded on startup of the postmaster process by the shared_preload_libraries. Unable to load it on demand. Therefore, you must add the configuration below.
<pre><code>PG-Strom module must be loaded on startup of the postmaster process by the shared_preload_libraries. Unable to load it on demand. Therefore, you must add the configuration below.
07:21:33 INFO Managing PostgreSQL installation at "/var/lib/postgresql/11/main"
07:21:33 INFO The version of extenstion "pgautofailover" is "1.0" on the monitor
07:21:33 INFO pg_autoctl service is starting
@ -465,7 +465,7 @@ pg_basebackup: base backup completed
07:21:34 INFO Calling node_active for node default/2/0 with current state: secondary, PostgreSQL is running, sync_state is "", WAL delta is 0.
07:21:39 INFO Calling node_active for node default/2/0 with current state: secondary, PostgreSQL is running, sync_state is "", WAL delta is 0.
</code></pre><p>開新視窗確認狀態</p>
<pretabindex="0"><code>2019-09-19 07:22:03 [administrator@pg-slave ~]$ sudo runuser -l postgres -c "pg_autoctl show state --pgdata /var/lib/postgresql/11/main"
<pre><code>2019-09-19 07:22:03 [administrator@pg-slave ~]$ sudo runuser -l postgres -c "pg_autoctl show state --pgdata /var/lib/postgresql/11/main"
Name | Port | Group | Node | Current State | Assigned State
<pretabindex="0"><code>03:06:02 INFO Calling node_active for node default/4/0 with current state: secondary, PostgreSQL is running, sync_state is "", WAL delta is 0.
<pre><code>03:06:02 INFO Calling node_active for node default/4/0 with current state: secondary, PostgreSQL is running, sync_state is "", WAL delta is 0.
03:06:08 INFO Calling node_active for node default/4/0 with current state: secondary, PostgreSQL is running, sync_state is "", WAL delta is 0.
03:06:13 INFO Calling node_active for node default/4/0 with current state: secondary, PostgreSQL is running, sync_state is "", WAL delta is 0.
03:06:18 ERROR PostgreSQL cannot reach the primary server: the system view pg_stat_wal_receiver has no rows.
@ -605,7 +605,7 @@ postgres=#
03:06:38 ERROR PostgreSQL cannot reach the primary server: the system view pg_stat_wal_receiver has no rows.
03:06:38 INFO Calling node_active for node default/4/0 with current state: secondary, PostgreSQL is running, sync_state is "", WAL delta is -1.
11:12:29 INFO Managing PostgreSQL installation at "/var/lib/postgresql/11/main"
11:12:29 INFO The version of extenstion "pgautofailover" is "1.0" on the monitor
11:12:29 INFO pg_autoctl service is starting
@ -693,7 +693,7 @@ pg_basebackup: base backup completed
11:13:03 INFO Calling node_active for node default/1/0 with current state: secondary, PostgreSQL is running, sync_state is "", WAL delta is 0.
<pretabindex="0"><code>03:12:34 INFO Calling node_active for node default/4/0 with current state: wait_primary, PostgreSQL is running, sync_state is "async", WAL delta is 0.
<pre><code>03:12:34 INFO Calling node_active for node default/4/0 with current state: wait_primary, PostgreSQL is running, sync_state is "async", WAL delta is 0.
03:12:39 INFO Calling node_active for node default/4/0 with current state: wait_primary, PostgreSQL is running, sync_state is "async", WAL delta is 0.
03:12:45 INFO Calling node_active for node default/4/0 with current state: wait_primary, PostgreSQL is running, sync_state is "async", WAL delta is 0.
03:12:50 INFO Calling node_active for node default/4/0 with current state: wait_primary, PostgreSQL is running, sync_state is "async", WAL delta is 0.
@ -704,7 +704,7 @@ pg_basebackup: base backup completed
03:12:55 INFO Calling node_active for node default/4/0 with current state: primary, PostgreSQL is running, sync_state is "sync", WAL delta is 0.
<pretabindex="0"><code>Sep 20 14:59:34 pg-primary systemd[1]: Started pg_auto_failover.
<pre><code>Sep 20 14:59:34 pg-primary systemd[1]: Started pg_auto_failover.
Sep 20 14:59:34 pg-primary pg_autoctl[7817]: 14:59:34 INFO Managing PostgreSQL installation at "/var/lib/postgresql/11/main"
Sep 20 14:59:34 pg-primary pg_autoctl[7817]: 14:59:34 INFO Found a stale pidfile at "/tmp/pg_autoctl/var/lib/postgresql/11/main/pg_autoctl.pid"
Sep 20 14:59:34 pg-primary pg_autoctl[7817]: 14:59:34 WARN Removing the stale pid file "/tmp/pg_autoctl/var/lib/postgresql/11/main/pg_autoctl.pid"
15:14:22 INFO Calling node_active for node default/1/0 with current state: secondary, PostgreSQL is running, sync_state is "", WAL delta is 0.
15:14:27 INFO Calling node_active for node default/1/0 with current state: secondary, PostgreSQL is running, sync_state is "", WAL delta is 0.
15:14:32 INFO Calling node_active for node default/1/0 with current state: secondary, PostgreSQL is running, sync_state is "", WAL delta is 0.
@ -921,7 +921,7 @@ sudo service pgautofailover restart
15:16:39 INFO pg_autoctl service stopping
2019-09-20 15:23:29 [administrator@pg-primary ~]$
</code></pre><p>可是我的服務活著啊!</p>
<pretabindex="0"><code>2019-09-20 15:23:29 [administrator@pg-primary ~]$ sudo service pgautofailover status
<pre><code>2019-09-20 15:23:29 [administrator@pg-primary ~]$ sudo service pgautofailover status
Sep 20 07:25:32 pg-slave pg_autoctl[5840]: 07:25:32 INFO Calling node_active for node default/4/0 with current state: primary, PostgreSQL is running, sync_state is "sync", WAL delta is 0.
Sep 20 07:25:37 pg-slave pg_autoctl[5840]: 07:25:37 INFO Calling node_active for node default/4/0 with current state: primary, PostgreSQL is running, sync_state is "sync", WAL delta is 0.
<pretabindex="0"><code>On a general basis, starting from Barman 2.0, backup over streaming replication is the recommended setup for PostgreSQL 9.4 or higher
<pre><code>On a general basis, starting from Barman 2.0, backup over streaming replication is the recommended setup for PostgreSQL 9.4 or higher
The reason why we recommend streaming backup is that, based on our experience, it is easier to setup than the traditional one
</code></pre><p>事實上呢,設定的確是很簡單,可是有個致命的缺點</p>
<pretabindex="0"><code>Because Barman transparently makes use of pg_basebackup, features such as incremental backup, parallel backup, deduplication, and network compression are currently not available. In this case, bandwidth limitation has some restrictions - compared to the traditional method via rsync.
<pre><code>Because Barman transparently makes use of pg_basebackup, features such as incremental backup, parallel backup, deduplication, and network compression are currently not available. In this case, bandwidth limitation has some restrictions - compared to the traditional method via rsync.
<pretabindex="0"><code>postgres@hqdc034:~$ psql -c 'with aa as ( select * from generate_series (1,1000000) a ) insert into test select aa.a, md5(aa.a::varchar) from aa;'
<pre><code>postgres@hqdc034:~$ psql -c 'with aa as ( select * from generate_series (1,1000000) a ) insert into test select aa.a, md5(aa.a::varchar) from aa;'
INSERT 0 1000000
postgres@hqdc034:~$ psql -c 'select count(*) from test;'
<pretabindex="0"><code>postgres@hqdc034:~$ time psql -c 'with aa as ( select * from generate_series (1,1000000) a ) insert into test select aa.a, md5(aa.a::varchar) from aa;'
<pre><code>postgres@hqdc034:~$ time psql -c 'with aa as ( select * from generate_series (1,1000000) a ) insert into test select aa.a, md5(aa.a::varchar) from aa;'
<pretabindex="0"><code>postgres@hqdc034:~$ time psql -c 'with aa as ( select * from generate_series (1,8000000) a ) insert into test select aa.a, md5(aa.a::varchar) from aa;'
<pre><code>postgres@hqdc034:~$ time psql -c 'with aa as ( select * from generate_series (1,8000000) a ) insert into test select aa.a, md5(aa.a::varchar) from aa;'
2019-09-06 10:18:57 [changch@hqdc034 ~]$ sudo zfs list -t snapshot
@ -519,7 +519,7 @@ sys 0m0.008s
postgres@hqdc034:~$
</code></pre><p>啊,我剛剛應該先clone的….
沒關係,我們再做一次,新增800萬筆資料,湊齊1000萬筆,然後快照</p>
<pretabindex="0"><code>postgres@hqdc034:~$ time psql -c 'with aa as ( select * from generate_series (1,8000000) a ) insert into test select aa.a, md5(aa.a::varchar) from aa;'
<pre><code>postgres@hqdc034:~$ time psql -c 'with aa as ( select * from generate_series (1,8000000) a ) insert into test select aa.a, md5(aa.a::varchar) from aa;'
<pretabindex="0"><code>RAID 1 is pure mirroring. No matter how many drives you add to RAID 1, the size never increases. What you increase is how many drives can fail and how good your read performance is.
<pre><code>RAID 1 is pure mirroring. No matter how many drives you add to RAID 1, the size never increases. What you increase is how many drives can fail and how good your read performance is.