2026/02/14
2025/11/05
2025/06/19
2025/04/08
2023/01/10
前一陣子發生了一件很OX的事
試了很久 現在做個記錄
因為有幫別的部門架了一台proxmox
而且那個部門也有一台nas
因此我就在那台nas上開了nfs然後用pbs備份
他老兄在某一天竟然進到nas把我備分用的那個nfs裡的資料砍了
然後第二天就出現了如下的error
ProxmoxBackup Server 2.3-2
2022-12-29T00:00:00+08:00: starting garbage collection on store nfs418
2022-12-29T00:00:00+08:00: task triggered by schedule 'daily'
2022-12-29T00:00:00+08:00: Start GC phase1 (mark used chunks)
2022-12-29T00:01:03+08:00: marked 5% (1 of 17 index files)
2022-12-29T00:04:14+08:00: marked 11% (2 of 17 index files)
2022-12-29T00:04:14+08:00: WARN: warning: unable to access non-existent chunk c3fe251560dcd2cc5aef7cfbd6669d0dd9ca7491c455f537efc6d319b09892ec, required by "/mnt/nfs418/vm/108/2022-12-27T15:45:38Z/drive-virtio0.img.fidx"
2022-12-29T00:04:14+08:00: WARN: warning: unable to access non-existent chunk 6dc29793341c20c7c80910a73893501b034a0e29c14a444d214d835ccffc0d16, required by "/mnt/nfs418/vm/108/2022-12-27T15:45:38Z/drive-virtio0.img.fidx"
2022-12-29T00:04:14+08:00: WARN: warning: unable to access non-existent chunk 1f81c244f9b7816ab37d3ef7ffdcd10443eb1bddb3fa44e036186b73f1fee33a, required by "/mnt/nfs418/vm/108/2022-12-27T15:45:38Z/drive-virtio0.img.fidx"
2022-12-29T00:04:14+08:00: WARN: warning: unable to access non-existent chunk 95c7e6747d43b5b516e1768a1f258f352aeb47b23fd46575440dc3d820d1b253, required by "/mnt/nfs418/vm/108/2022-12-27T15:45:38Z/drive-virtio0.img.fidx"
2022-12-29T00:04:14+08:00: WARN: warning: unable to access non-existent chunk 9513a7e5c650245d3344115115b21285cc8f426e5284fa04159ea96e49856535, required by "/mnt/nfs418/vm/108/2022-12-27T15:45:38Z/drive-virtio0.img.fidx"
2022-12-29T00:04:14+08:00: WARN: warning: unable to access non-existent chunk 68b2b40dd3bacba9e649c67862011934bc7f048d8ea2d35fbd95c39f9d5cf7c4, required by "/mnt/nfs418/vm/108/2022-12-27T15:45:38Z/drive-virtio0.img.fidx"
2022-12-29T00:04:14+08:00: WARN: warning: unable to access non-existent chunk 494608d49f57039fd7a8378e1a2a2cf6bb0688773a525addc2f54507a94cd11d, required by "/mnt/nfs418/vm/108/2022-12-27T15:45:38Z/drive-virtio0.img.fidx"
2022-12-29T00:04:14+08:00: WARN: warning: unable to access non-existent chunk 09eab384d5f3cbf657db1c0750ef52be2f1dbdf134f977a24dc095382b6e25ed, required by "/mnt/nfs418/vm/108/2022-12-27T15:45:38Z/drive-virtio0.img.fidx"
2022-12-29T00:04:14+08:00: WARN: warning: unable to access non-existent chunk 9c1208d43242276c75a4f65f41054e4bc0e7e1144a61c951902bb8df94f055c9, required by "/mnt/nfs418/vm/108/2022-12-27T15:45:38Z/drive-virtio0.img.fidx"
..........................................
後面還一大堆
本來是想說把pbs上的datastore砍了重建應該可以解決問題
forum上也是醬說的
結果不是
我砍了datastore重建
甚至在nas上再開另一個nfs後再重建datastore
過沒几天又會出現如上的錯誤
最後的解決方法是直接重裝一台新的pbs
問題才解決
無言中
2021/10/31
proxmox更新到7版後
在管理介面 mount nfs 可以選 v3 或 v4
用fio測一下 v3 和 v4 的效能差別
config 如下
# This job file tries to mimic the Intel IOMeter File Server Access Pattern
[global]
description=Emulation of Intel IOmeter File Server Access Pattern
[iometer]
bssplit=512/10:1k/5:2k/5:4k/60:8k/2:16k/4:32k/4:64k/10
filename=PhysicalDrive1:PhysicalDrive2:PhysicalDrive3
size=10G
rw=randrw
#set read 50% write 50%
rwmixread=50
direct=1
runtime=60
# IOMeter defines the server loads as the following:
# iodepth=1 Linear
# iodepth=4 Very Light
# iodepth=8 Light
# iodepth=64 Moderate
# iodepth=256 Heavy
iodepth=64
測三次 取最後一次的值如下
nfs v4
iometer: (g=0): rw=randrw, bs=(R) 512B-64.0KiB, (W) 512B-64.0KiB, (T) 512B-64.0KiB, ioengine=psync, iodepth=64
fio-3.25
Starting 1 process
Jobs: 1 (f=3): [m(1)][100.0%][r=168KiB/s,w=107KiB/s][r=11,w=12 IOPS][eta 00m:00s]
iometer: (groupid=0, jobs=1): err= 0: pid=2342174: Sun Oct 31 07:28:44 2021
Description : [Emulation of Intel IOmeter File Server Access Pattern]
read: IOPS=55, BW=610KiB/s (625kB/s)(35.7MiB/60016msec)
clat (usec): min=430, max=339828, avg=10019.94, stdev=13081.64
lat (usec): min=431, max=339828, avg=10020.43, stdev=13081.64
clat percentiles (usec):
| 1.00th=[ 775], 5.00th=[ 3228], 10.00th=[ 4015], 20.00th=[ 5473],
| 30.00th=[ 6587], 40.00th=[ 7832], 50.00th=[ 9110], 60.00th=[ 10159],
| 70.00th=[ 11338], 80.00th=[ 12387], 90.00th=[ 13304], 95.00th=[ 14222],
| 99.00th=[ 43254], 99.50th=[ 99091], 99.90th=[208667], 99.95th=[299893],
| 99.99th=[341836]
bw ( KiB/s): min= 72, max= 1180, per=100.00%, avg=613.90, stdev=270.71, samples=119
iops : min= 8, max= 90, avg=56.03, stdev=18.14, samples=119
write: IOPS=57, BW=592KiB/s (606kB/s)(34.7MiB/60016msec); 0 zone resets
clat (usec): min=316, max=218978, avg=7624.96, stdev=11376.82
lat (usec): min=316, max=218979, avg=7626.12, stdev=11376.98
clat percentiles (usec):
| 1.00th=[ 400], 5.00th=[ 457], 10.00th=[ 490], 20.00th=[ 586],
| 30.00th=[ 1172], 40.00th=[ 4113], 50.00th=[ 6128], 60.00th=[ 8094],
| 70.00th=[ 10028], 80.00th=[ 11994], 90.00th=[ 13960], 95.00th=[ 18482],
| 99.00th=[ 37487], 99.50th=[ 85459], 99.90th=[152044], 99.95th=[212861],
| 99.99th=[219153]
bw ( KiB/s): min= 18, max= 1278, per=100.00%, avg=595.21, stdev=271.81, samples=119
iops : min= 6, max= 106, avg=58.24, stdev=19.98, samples=119
lat (usec) : 500=6.12%, 750=8.19%, 1000=1.17%
lat (msec) : 2=1.67%, 4=7.70%, 10=39.02%, 20=33.10%, 50=2.17%
lat (msec) : 100=0.41%, 250=0.41%, 500=0.03%
cpu : usr=0.16%, sys=0.57%, ctx=6838, majf=0, minf=14
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=3339,3476,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=64
Run status group 0 (all jobs):
READ: bw=610KiB/s (625kB/s), 610KiB/s-610KiB/s (625kB/s-625kB/s), io=35.7MiB (37.5MB), run=60016-60016msec
WRITE: bw=592KiB/s (606kB/s), 592KiB/s-592KiB/s (606kB/s-606kB/s), io=34.7MiB (36.4MB), run=60016-60016msec
nfs v3
iometer: (g=0): rw=randrw, bs=(R) 512B-64.0KiB, (W) 512B-64.0KiB, (T) 512B-64.0KiB, ioengine=psync, iodepth=64
fio-3.25
Starting 1 process
Jobs: 1 (f=3): [m(1)][100.0%][r=581KiB/s,w=609KiB/s][r=51,w=42 IOPS][eta 00m:00s]
iometer: (groupid=0, jobs=1): err= 0: pid=2347167: Sun Oct 31 07:35:09 2021
Description : [Emulation of Intel IOmeter File Server Access Pattern]
read: IOPS=49, BW=548KiB/s (561kB/s)(32.1MiB/60012msec)
clat (usec): min=394, max=285769, avg=9756.36, stdev=10269.42
lat (usec): min=394, max=285770, avg=9756.86, stdev=10269.42
clat percentiles (usec):
| 1.00th=[ 889], 5.00th=[ 3294], 10.00th=[ 4113], 20.00th=[ 5407],
| 30.00th=[ 6718], 40.00th=[ 7898], 50.00th=[ 8979], 60.00th=[ 10290],
| 70.00th=[ 11338], 80.00th=[ 12387], 90.00th=[ 13435], 95.00th=[ 14484],
| 99.00th=[ 30278], 99.50th=[ 56361], 99.90th=[206570], 99.95th=[233833],
| 99.99th=[287310]
bw ( KiB/s): min= 8, max= 1118, per=100.00%, avg=548.19, stdev=256.60, samples=119
iops : min= 2, max= 86, avg=49.50, stdev=15.73, samples=119
write: IOPS=51, BW=522KiB/s (534kB/s)(30.6MiB/60012msec); 0 zone resets
clat (usec): min=357, max=221586, avg=10035.07, stdev=12250.59
lat (usec): min=358, max=221587, avg=10036.14, stdev=12250.75
clat percentiles (usec):
| 1.00th=[ 482], 5.00th=[ 627], 10.00th=[ 1172], 20.00th=[ 4146],
| 30.00th=[ 5735], 40.00th=[ 7111], 50.00th=[ 8586], 60.00th=[ 10159],
| 70.00th=[ 11600], 80.00th=[ 13042], 90.00th=[ 16188], 95.00th=[ 21103],
| 99.00th=[ 47449], 99.50th=[ 93848], 99.90th=[168821], 99.95th=[196084],
| 99.99th=[221250]
bw ( KiB/s): min= 34, max= 1039, per=100.00%, avg=523.79, stdev=223.74, samples=119
iops : min= 6, max= 82, avg=51.63, stdev=15.50, samples=119
lat (usec) : 500=0.73%, 750=4.03%, 1000=0.87%
lat (msec) : 2=0.71%, 4=7.69%, 10=44.35%, 20=37.52%, 50=3.37%
lat (msec) : 100=0.38%, 250=0.33%, 500=0.02%
cpu : usr=0.25%, sys=0.59%, ctx=6076, majf=0, minf=15
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=2968,3090,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=64
Run status group 0 (all jobs):
READ: bw=548KiB/s (561kB/s), 548KiB/s-548KiB/s (561kB/s-561kB/s), io=32.1MiB (33.7MB), run=60012-60012msec
WRITE: bw=522KiB/s (534kB/s), 522KiB/s-522KiB/s (534kB/s-534kB/s), io=30.6MiB (32.1MB), run=60012-60012msec
初步看起來 v4 稍微好一些
2020/01/03
2019/02/25
因為想測試在 proxmox 開大量guest後
每台guest上的iops情況
然後分成 iscsi 和 nfs
在create 和 destroy 大量的guest後
再次create要啟動時出現
ioctl(KVM_CREATE_VM) failed: 12 Cannot allocate memory
kvm: failed to initialize KVM: Cannot allocate memory
查了一下應該是ram 的問題
用以下指令處理完後就ok了
sync ; echo 1 > /proc/sys/vm/drop_caches
2019/02/22
測了二天
graylog-ctl這個指令已經取消掉了
ova是使用 ubunbu 18.04 所以網路的設定改用netplan
匯入之後就跟直接使用ubunbu 再手動安裝一樣
介面上多了 enterprise 這個選項
裡面就是有很多user在forum上反應需要增加的功能
當然要付費
預設的 file 路徑跟之前的ova不同
改完ip後也不用再reconfig 重開就可以使用了
os的時區改完在管理介面上看到的還是GMT時間
預設沒有 udp 514 的syslog input 了
最大的問題是
把elasticsearch的資料搬到 nfs 後
service就無法啟動了
chmod chown都不行
目前還在找解法
2018/12/04
2018/10/16
開關几速度超快
果然是container
不過在guset要mount nfs時出現了以下的錯誤
mount -t nfs 1.2.3.4:/volume1/abc /mnt/abc/
mount.nfs: access denied by server while mounting 1.2.3.4:/volume1/abc
明明網路都有通 權限也都有給
查了一下才知道proxmox因為安全的關係把這個功能關掉了
而管理這個功能的是
apparmor
這個daemon
再來就是找如何處理
有改config或是把apparmor直接關了
試過這二種都沒用
官方forum有提到這個地方會修改 但沒有提到時間表
最後成功的方法是先在host把要用的 nfs 先 mount 進來
之後再到這個LXC的resource add一個mount point
但因為add時無法選目錄
所以必須在加完後再直接到 /etc/pve/lxc 改config
例如是 222.conf
找到以下這行
mp0: local-zfs:subvol-222-disk-2,mp=/mnt/abc,size=8G
改成
mp0: /host/mount/point,mp=/mnt/abc
container再重開
就會直接看到所需的目錄已經mount在 /mnt/abc 了
不過改完之後 會在zfs殘留一個剛建立的檔
記得要去砍掉
zfs destroy rpool/data/subvol-222-disk-1
https://www.facebook.com/groups/pve.tw/permalink/827877674047462/
LXC目前的优缺點如下
佈建快
開關几快
占用資源少
無法live migration
無法放在nfs
無法直接clone (要clone之前要先建立snapshot)
2017/07/26
2016/02/17
2014/08/14
會造成host os的down g
目前已詢問原廠是否有解決方案
考慮最差的情況應該就是拿一台机器把iscsi捉進來
再用nfs share出來了
因為容量超過2T所以必須使用之前的方法來處理
另外mount -t xfs /dev/sdb1 /mnt這個動作如果寫在/etc/rc.local
會因為執行太早網路還沒起來而無法成功
因此使用另一個方法
把開机後執行的指令放到crontab 裡
@reboot /root/0814test
0814test的內容如下
#!/bin/bash
/usr/bin/sleep 10
/usr/bin/mount -t xfs /dev/sdb1 /mnt
目前測起來工作是正常
只是nfs如果斷線重連
guest os還是有可能有問題需要重開
跟之前的預期有落差
2014/05/28
如下
/etc/cron.daily/mlocate:
Warning: /var/lib/mlocate/daily.lock present, not running updatedb.
run-parts: /etc/cron.daily/mlocate exited with return code 1
查了一下才知道這個訊息跟nfs有關
http://jonmccune.wordpress.com/2010/08/11/warning-varlibmlocatedaily-lock-present-not-running-today/
想到前几天才把一台nfs下架
雖然在/etc/pve/storage.cfg裡已經update了
但/etc/mtab還沒清掉
難怪這几天下df指令會一直hang住
2013/05/26
發生一個很嚴重的問題
所有的nfs竟然都mount不上
在server上出現以下的log
May 26 06:56:00 proxmox30 pvestatd[5548]: WARNING: mount error: mount.nfs: an incorrect mount option was specified
初步看來是mount nfs是有一個option有問題
可是在proxmox的管理介面上並沒有地方可以設定mount nfs的option
應該要進os手動去改了
再仔細查了一下
因為proxmox 3.0的os已經升成debian 7.0了
而原來的要mout nfs所使用的portmap已經換成rpcbind 導致必須設定某些參數才能使用
進os手動去下mount nfs時出現
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
而原來所使用的/etc/pve/storage.cfg並沒有設定nolock這個option
而如上所述在proxmox的管理介面上也沒有地方可以加option
只好手動來了
在/etc/pve/storage.cfg上所有有關nfs的storage上手動加上 options nolock
範例如下
nfs: nfs104_iso
path /mnt/pve/nfs104_iso
server 1.1.1.104
export /mnt/vm_data/ISO
options nolock
content iso
reboot或是
/etc/init.d/rpcbind restart
/etc/init.d/nfs-common restart
就可以了


