有位置信息的一条报错

    [47716.772022] EDAC MC0: 1 CE ie31200 CE on mc#0csrow#1channel#0 (csrow:1 channel:0 page:0x0 offset:0x0 grain:8 syndrome:0x8)

    内存位置信息

    P0_Node0_Channel0_Dimm0 DIMMA1 18ADF4G72AZ-3G2BT
    P0_Node0_Channel1_Dimm1 DIMMB2 MTA18ASF4G72AZ-3G2BZ
     dmidecode -t memory | grep 'Locator'
            Locator: DIMMA1
            Bank Locator: P0_Node0_Channel0_Dimm0
            Locator: DIMMA2
            Bank Locator: P0_Node0_Channel0_Dimm1
            Locator: DIMMB1
            Bank Locator: P0_Node0_Channel1_Dimm0
            Locator: DIMMB2
            Bank Locator: P0_Node0_Channel1_Dimm1

    错误信息

    ➜  ~ grep "[0-9]" /sys/devices/system/edac/mc/mc0/rank*/dimm_ce_count
    /sys/devices/system/edac/mc/mc0/rank0/dimm_ce_count:0 
    /sys/devices/system/edac/mc/mc0/rank1/dimm_ce_count:0
    /sys/devices/system/edac/mc/mc0/rank2/dimm_ce_count:1
    /sys/devices/system/edac/mc/mc0/rank3/dimm_ce_count:0

    这里 rank 和上述的内存位置信息无法对应关系。

    查看该目录下的 dimm_location

    ls /sys/devices/system/edac/mc/mc0/rank2/
    dimm_ce_count  dimm_dev_type  dimm_edac_mode  dimm_label  dimm_location  dimm_mem_type  dimm_ue_count  power  size  uevent
     grep "[0-9]" /sys/devices/system/edac/mc/mc0/rank2/dimm_location
    csrow 1 channel 0

    可以看到和上面 mc#0csrow#1channel#0 能够对应上。

    继续核实位置信息

    ➜  ~  grep "[0-9]" /sys/devices/system/edac/mc/mc0/rank*/dimm_location
    /sys/devices/system/edac/mc/mc0/rank0/dimm_location:csrow 0 channel 0
    /sys/devices/system/edac/mc/mc0/rank1/dimm_location:csrow 0 channel 1
    /sys/devices/system/edac/mc/mc0/rank2/dimm_location:csrow 1 channel 0
    /sys/devices/system/edac/mc/mc0/rank3/dimm_location:csrow 1 channel 1

    这里可以确定出问题的内存条是 第二个内存通道的第一条出现了问题,但问题来了哪个是第二个内存通道?出问题的是B1吗?但是B1处没有内存条。

    ipmitool -I lan -U ADMIN -H 10.0.0.4 sensor thresh FAN1 lower 150 225 300

    Replacing:

    ADMIN with the IPMI username
    10.0.0.4 with your own IPMI address
    FAN1 with the desired FAN (FANA, FAN1, FAN2, FAN3, FAN4)
    150 with the lower non-recoverable value
    225 with the lower critical value
    300 with the lower non-critical value

    一、环境描述

    现网的物理硬盘总共17GB,使用一块30GB的新硬盘代替17GB硬盘,然后进行PV数据迁移

    二、迁移步骤

    2.1 添加一块磁盘创建PV

    [root@localhost ~]# pvcreate /dev/sdc
      Physical volume "/dev/sdc" successfully created
    [root@localhost ~]# pvs
      PV         VG         Fmt  Attr PSize  PFree
      /dev/sda2  VolGroup00 lvm2 a-   20.88G     0
      /dev/sdb   vg00       lvm2 a-   16.00G     0
      /dev/sdc              lvm2 a-   30.00G 30.00G

    2.2 添加新PV到vg00卷组中

    [root@localhost ~]# vgextend vg00 /dev/sdc
      Volume group "vg00" successfully extended
    [root@localhost ~]# vgs
      VG         #PV #LV #SN Attr   VSize  VFree
      VolGroup00   1   2   0 wz--n- 20.88G     0
      vg00         2   1   0 wz--n- 45.99G 30.00G

    2.3 源PV数据盘 迁移到 新PV数据盘上

    [root@localhost ~]# pvmove /dev/sdb /dev/sdc
      /dev/sdb: Moved: 0.0%
      /dev/sdb: Moved: 16.0%
      /dev/sdb: Moved: 25.9%
      /dev/sdb: Moved: 44.6%
      /dev/sdb: Moved: 62.2%
      /dev/sdb: Moved: 77.9%
      /dev/sdb: Moved: 94.6%
      /dev/sdb: Moved: 100.0%
    [root@localhost ~]# pvs
      PV         VG         Fmt  Attr PSize  PFree
      /dev/sda2  VolGroup00 lvm2 a-   20.88G     0
      /dev/sdb   vg00       lvm2 a-   16.00G 16.00G
      /dev/sdc   vg00       lvm2 a-   30.00G 14.00G

    2.4 从VG中移除已替换的旧PV

    [root@localhost ~]# vgreduce vg00 /dev/sdb
      Removed "/dev/sdb" from volume group "vg00"
    [root@localhost ~]# vgs
      VG         #PV #LV #SN Attr   VSize  VFree
      VolGroup00   1   2   0 wz--n- 20.88G     0
      vg00         1   1   0 wz--n- 30.00G 14.00G

    2.5 移除源PV

    [root@localhost ~]# pvremove /dev/sdb
      Labels on physical volume "/dev/sdb" successfully wiped
    [root@localhost ~]# pvs
      PV         VG         Fmt  Attr PSize  PFree
      /dev/sda2  VolGroup00 lvm2 a-   20.88G     0
      /dev/sdc   vg00       lvm2 a-   30.00G 14.00G

    2.6 扩容LV

    [root@localhost ~]# lvs
      LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Convert
      LogVol00 VolGroup00 -wi-ao 16.97G
      LogVol01 VolGroup00 -wi-ao  3.91G
      lv00     vg00       -wi-ao 16.00G
    [root@localhost ~]# lvextend -l +100%FREE -r /dev/vg00/lv00
      Extending logical volume lv00 to 30.00 GB
      Logical volume lv00 successfully resized
    tune2fs: Filesystem has unsupported feature(s) while trying to open /dev/mapper/vg00-lv00
    Couldn't find valid filesystem superblock.
    fsadm: Cannot parse tune2fs output
      fsadm failed: 1
    [root@localhost ~]# lvs
      LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Convert
      LogVol00 VolGroup00 -wi-ao 16.97G
      LogVol01 VolGroup00 -wi-ao  3.91G
      lv00     vg00       -wi-ao 30.00G

    这几天尝试了一下,Sonarr 还是不够灵活,不能手动筛选,字幕组的命名不都是那么规范的。之前很长一段时间是在 bangumi 和 dmhy 上筛选后输出 RSS,然后再放 TTRSS 里面做归纳,Flexget 再监控 TTRSS 输出的 RSS 链接推送到 qBittorrent 自动下载,弹弹play 负责媒体库和弹幕。
    这样的缺点就是新一个季度的时候得花时间去整理一下,管理也不是十分方便。
    但是使用了 Sonarr 之后,还是觉得拖拉机的方案也足够灵活和好用。

    又是前端“加密”的神奇玩意儿

    此条为私密说说,仅发布者可见

    门寒花不弃,白头觅旧居;
    半生他乡客,叶落归乡泥。

    TT600 200左右
    TT685 350 左右
    V860iiN 500 左右

    笔记 https://ma.ttias.be/force-redirect-http-https-custom-port-nginx/
    家用宽带的 443 端口一般不可用,只能用一个非标准端口,那如何在非标准 80/443 端口实现 SSL 跳转呢,这里可以用到 Nginx 的 409 错误代码,即是 497 - normal request was sent to HTTPS
    如果把 497 的错误相应页面改为 跳转 https 的 302,就可以实现,在 Server 段加一行 error_page 497 https://$host:1234$request_uri; 就可以了,最后形如

    server {
      listen      1234 ssl;
      server_name your.site.tld;
      ssl         on;
      ...
      error_page  497 https://$host:1234$request_uri;
      ...

    笔记 https://segmentfault.com/a/1190000022275523#item-3
    查看进程流量可以使用 ss,是 iproute2util 包的一部分,同时 ip 也是这个包的一部分,所以一般有 ip 就会有 ss,对于像 truenas 这种高度定制且封锁了 apt 的“程序”很是方便。

    tcpdump 可以用来抓包,保存的数据可以用 wireshark 打开和查看,此包也大多数都有预装。

    感谢小黄,我现在看房子都有了几个关注点:
    1.房屋最好朝南或东南,如果朝北,那就一定要开阔明媚,采光要好。
    2.玄关鞋柜深度起码要有35,最好有一扇镜子,出门前可以整理一下外表。
    3.厨房要明厨,天花板要通铺,橱柜要够用,冰箱预留位置起码要90,洗碗盆要大的,厨房要足够容纳两个人同时干活。
    4.餐桌边长或直径要起码90的,要有足够的地方放餐边柜。客厅阳台外景观要视野开阔,采光要好,同时要关注对面是不是待开发区,会不会遮挡景观。
    5.卫浴室要有窗,天花板要通铺,洗手台脸盆要够大够深,不然水花乱溅,洗手台下面最好做成抽屉,方便拿取收纳。镜柜根据需要,要有足够的深度。马桶上面最好打一排柜子方便收纳。淋浴间的门要么是滑动的,三开门最好,要么是往外拉的,决不能往内拉,以防老人摔倒打不开门。
    6.床长度起码要2米,单人床宽度1.5米更舒适,双人床长度起码要1.8米。房间要有地方放衣柜,衣柜深度起码要60,不然大衣放不下,卧室颜色不要太花,不然影响睡眠。
    看房子带把尺子去真的很实用

    生年不满百,常怀千岁忧。
    昼短苦夜长,何不秉烛游!
    为乐当及时,何能待来兹?
    愚者爱惜费,但为后世嗤。
    仙人王子乔,难可与等期。

    劝及时行乐,也叹毫无出路。
    https://m.gushiwen.cn/mingju/juv_f2af3c0bf211.aspx

    Bit Torrent
    Bit torrent performs 16KB random reads/writes. The 16KB writes cause read-modify-write overhead. The read-modify-write overhead can reduce performance by a factor of 16 with 128KB record sizes when the amount of data written exceeds system memory. This can be avoided by using a dedicated dataset for bit torrent downloads with recordsize=16KB.

    When the files are read sequentially through a HTTP server, the random nature in which the files were generated creates fragmentation that has been observed to reduce sequential read performance by a factor of two on 7200RPM hard disks. If performance is a problem, fragmentation can be eliminated by rewriting the files sequentially in either of two ways:

    The first method is to configure your client to download the files to a temporary directory and then copy them into their final location when the downloads are finished, provided that your client supports this.

    The second method is to use send/recv to recreate a dataset sequentially.

    In practice, defragmenting files obtained through bit torrent should only improve performance when the files are stored on magnetic storage and are subject to significant sequential read workloads after creation.

    https://openzfs.github.io/openzfs-docs/Performance%20and%20Tuning/Workload%20Tuning.html#bit-torrent

    Do not set Pre-allocated disk space if you are using ZFS as your filesystem as ZFS does not support fallocate
    有在 ZFS 文件系统上不要开启 Qbittorrent 预分配空间的说法,原因是 ZFS 不支持 fallocate

    https://www.truenas.com/community/threads/the-path-to-success-for-block-storage.81165/ 把我看迷糊了,讨论各种 ZFS 适合什么使用场景,不应该怎么做。

    笔记
    一直很头疼这个 swag 的证书的目录结构,一堆软链接,不方便 copy 证书到其他服务器使用。
    rsync 有替换软连接为源文件的功能

    rsync -avz --copy-unsafe-links /mnt/nfs/Documents/cert/config/etc/letsencrypt/live/thris.me/ /var/swagcert/thris.me

    https://forums.servethehome.com/index.php?resources/supermicro-x9-x10-x11-fan-speed-control.20
    关于超微 IPMI 风扇控制的方法和策略。

    目前感觉系统或者其他主机接管风扇控制更加容易控制,超微的风扇控制还是比较简单了,不知道 ILO 的如何。