Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
huataihuang committed Sep 6, 2023
1 parent ddf6b74 commit 8568fbe
Show file tree
Hide file tree
Showing 8 changed files with 206 additions and 1 deletion.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions source/android/mobile_work/android_mobile_work_solutions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,23 @@ Termux + 电脑
================

:ref:`termux` 是Android系统上非常强大的终端模拟器,同时也是完整的Linux系统安装架构,可以通过 :ref:`apt` 安装所需的Linux工具实现 :ref:`termux_dev` 环境,可以成为一个移动的Linux工作站。

Android平板支持hdmi in
=========================

其实我一直有一个想法: 将平板电脑作为显示器来使用。注意,并不是指苹果的iPad扩展第二屏,而是真正的Android平板无缝切换成移动显示器:

- 我有一台屏幕损坏的 MacBook Pro 笔记本,实在舍不得维修屏幕(第三方屏幕也要3k)
- 虽然通过视频捕捉卡能够将任何Android平板变成屏幕,但是性能实在太差了,完全无法和原生的显示屏幕相比
- 苹果的iPad扩展第二屏虽然好用,但是其实不能没有主屏幕工作,而且电脑必须是macOS

直到2023年底,这个非常小众的需求只有一款产品能够满足 ``联想YOGA Pad Pro`` ,提供了 ``hdmi in`` 功能。也就是只要连接hdmi接口,Android平板立即切换成显示器模式,正好能够满足我的需求: 携带无头笔记本外出移动工作

.. figure:: ../../_static/android/mobile_work/yoga_pad_pro.png

支持hdmi in可切换成显示屏的联想Yoga Pad Pro

参考
=====

- `如何评价联想YOGA Pad Pro? <https://www.zhihu.com/question/453832126>`_ 希望联想能够尽快推出下一代产品
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@

然后通过指定 :ref:`admission_plugins_DefaultStorageClass` 实现为 ``kubeflow mainfest`` 提供 :ref:`k8s_dynamic_volume_provisioning`


参考
=====

Expand Down
21 changes: 21 additions & 0 deletions source/kubernetes/storage/k8s_csi/k8s_csi_arch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@
Kubernetes CSI架构
=======================

CSI概念
=========

- CSI是容器存储接口(Container Storage Interface),以建立一个行业标准接口规范,以便将任意存储系统暴露给容器 :ref:`k8s_workloads` 。
- ``csi`` 卷类型是一种 ``out-tree`` (in-tree是指跟其它存储插件在同一个代码路径下,随 Kubernetes 的代码同时编译,out-tree则刚好相反) 的CSI卷插件,用于Pod与同一个节点上运行的外部CSI卷驱动程序交互。部署了CSI兼容卷驱动后,用户就开业使用 ``csi`` 作为卷类型来关在驱动提供的存储。
- CSI持久化卷支持在Kubernetes v1.9引入,必须由集群管理员明确启用。也就是需要在 ``apiserver`` / ``controller-manager`` 和 ``kubelet`` 组件的 ``--feature-gates =`` 标志中加上 ``CSIPersistentVolume = true``
- CSI持久化卷具备以下字段可以让用户指定:

- ``driver`` : 指定卷驱动程序名称
- ``volumeHandle`` : 唯一标识从CSI卷插件的 ``CreateVolume`` 调用返回的卷名
- ``readOnly`` : 指示卷是否发布为只读

CSI插件机制
=============

CSI插件包括:

- ``Controller Plugin`` : 以 ``Deployment`` 或 ``StatefulSet`` 形式部署,实现CSI Controller service。Controller负责与Kubernetes API, 外部存储服务的控制面交互,但并不实际处理存储卷在宿主机上的挂载等工作
- ``Node Plugin`` : Node插件需要在所有node节点上运行,所以通常以 ``Daemonset`` 形式部署

参考
=======

- `Kubernetes CSI Specification <https://cctoctofx.netlify.app/post/cloud-computing/k8s-csi-interprete/>`_ 这篇文章较为全面清晰,提供了不少索引信息,可以作为学习起点
- `Kubernetes Container Storage Interface (CSI) Documentation <https://kubernetes-csi.github.io/docs/introduction.html>`_ 详细全面的开发、部署、测试文档,作为主要参考资料
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
.. _control_hpe_lio_fan_speed:

===================================
通过HPE iLO控制风扇转速
===================================

我最初尝试采用标准的 :ref:`ipmi` 方式来控制 :ref:`hpe_dl360_gen9` 风扇转速,目的是实现 :ref:`server_fanless` 。不过,HPE服务器的 ``ipmi`` 资料非常匮乏,我找不到 :ref:`ipmi_sensor_fan_speed` 的HPE服务器配置方法( ``ipmitool raw`` 参数各个厂商不统一,没有资料无法配置 )。

从网上资料来看,HPE服务器的风扇控制是通过 :ref:`hp_ilo` 实现的,只是实现方法非常曲折

.. note::

我暂时还没有时间精力来尝试实践,这里只做资料汇总。过几天再搞...

脚本控制
=========

`HOW TO CONTROL HPE ILO FAN SPEED (ILO 4, GEN 8~9) <https://forums.unraid.net/topic/141249-how-to-control-hpe-ilo-fan-speed-ilo-4-gen-8~9/>`_ 提供了一个封装脚本,通过 iLO 的SSH密钥方式来登陆 iLO 进行设置(其实就是 ssh 执行 iLO 命令)。脚本非常简单,但是可以看出设置方法。结合iLO手册,我觉得应该很容易完成。

.. note::

简单看了一下脚本,iLO设置看起来非常简单的命令。也就是 :ref:`ssh` 远程执行,使用密钥认证可以非常方便完成。

.. literalinclude:: control_hpe_lio_fan_speed/ilo_fan_speed.sh
:language: bash
:caption: 通过iLO远程命令调整服务器风扇转速

命令行
========

`Silence of the fans pt 2: HP iLO 4 2.73 now with the fan hack! <https://www.reddit.com/r/homelab/comments/hix44v/silence_of_the_fans_pt_2_hp_ilo_4_273_now_with/>`_ 提供了简单的命令方法,也是ssh到iLO通过简单命令设置

`HP-ILO-Fan-Control (GitHub项目) <https://github.com/That-Guy-Jack/HP-ILO-Fan-Control>`_ 结合 `ilo4_unlock (Silence of the Fans) (GitHub项目) <https://github.com/kendallgoto/ilo4_unlock>`_ 来控制风扇

WEB设置
=========

`ilo-fans-controller (GitHub项目) <https://github.com/alex3025/ilo-fans-controller>`_ 提供了通过WEB服务器(php)方式来设置iLO(包装),使用更为简便。

参考
=====

- `HOW TO CONTROL HPE ILO FAN SPEED (ILO 4, GEN 8~9) <https://forums.unraid.net/topic/141249-how-to-control-hpe-ilo-fan-speed-ilo-4-gen-8~9/>`_
- `Silence of the fans pt 2: HP iLO 4 2.73 now with the fan hack! <https://www.reddit.com/r/homelab/comments/hix44v/silence_of_the_fans_pt_2_hp_ilo_4_273_now_with/>`_
- `ilo-fans-controller (GitHub项目) <https://github.com/alex3025/ilo-fans-controller>`_
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
#!/bin/bash
#Script to reduce fan speeds on ilo4 remotely.
# Install new public key on ilo4 as described here:
# https://ouphe.net/2020/04/05/add-ssh-key-to-ilo4-user-for-authentication/
#HELPFUL INFO
# Use Putty or similar to login from Windows. Reset iLO (iLO > Info > Diagnostics) each time to view. Only first login can see any responses.
# Run "fan info" to get readout





ILO4=MYIP
ILOUSER=ilofanuser
PASSWORD='MYPASSWORD'
PCILO=1000
PCIHI=5000
HDCLO=500
HDCHI=4000
MISCLO=500
MISCHI=3000
HDMAXLO=100
HDMAXHI=250
HDNOAUTHTEMPCAUT=65
HDNOAUTHTEMPCRIT=70





#PCI
# Set minima
for PID in 24 25 26 27 28 29 30 31 32 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
do
sshpass -p $PASSWORD ssh $ILOUSER@$ILO4 -o KexAlgorithms=+diffie-hellman-group14-sha1 -o HostKeyAlgorithms=ssh-rsa -o HostKeyAlgorithms=ssh-dss -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "fan pid $PID lo $PCILO"
done

# Set maxima
for PID in 24 25 26 27 28 29 30 31 32 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
do
sshpass -p $PASSWORD ssh $ILOUSER@$ILO4 -o KexAlgorithms=+diffie-hellman-group14-sha1 -o HostKeyAlgorithms=ssh-rsa -o HostKeyAlgorithms=ssh-dss -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "fan pid $PID hi $PCIHI"
done





#HD Controller Systems
# Set minima
for PID in 19 20 21 22 23
do
sshpass -p $PASSWORD ssh $ILOUSER@$ILO4 -o KexAlgorithms=+diffie-hellman-group14-sha1 -o HostKeyAlgorithms=ssh-rsa -o HostKeyAlgorithms=ssh-dss -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "fan pid $PID lo $HDCLO"
done

# Set maxima
for PID in 19 20 21 22 23
do
sshpass -p $PASSWORD ssh $ILOUSER@$ILO4 -o KexAlgorithms=+diffie-hellman-group14-sha1 -o HostKeyAlgorithms=ssh-rsa -o HostKeyAlgorithms=ssh-dss -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "fan pid $PID hi $HDCHI"
done





#MISC - Chipset, iLO Chips, Exhaust and Intake, OCSD
# Set minima
for PID in 33 34 35 36 46 62 63 64 65
do
sshpass -p $PASSWORD ssh $ILOUSER@$ILO4 -o KexAlgorithms=+diffie-hellman-group14-sha1 -o HostKeyAlgorithms=ssh-rsa -o HostKeyAlgorithms=ssh-dss -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "fan pid $PID lo $MISCLO"
done



# Set maxima
for PID in 33 34 35 36 46 62 63 64 65
do
sshpass -p $PASSWORD ssh $ILOUSER@$ILO4 -o KexAlgorithms=+diffie-hellman-group14-sha1 -o HostKeyAlgorithms=ssh-rsa -o HostKeyAlgorithms=ssh-dss -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "fan pid $PID hi $MISCHI"
done





#Special - HD Max
# Set minima
for PID in 07
do
sshpass -p $PASSWORD ssh $ILOUSER@$ILO4 -o KexAlgorithms=+diffie-hellman-group14-sha1 -o HostKeyAlgorithms=ssh-rsa -o HostKeyAlgorithms=ssh-dss -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "fan pid $PID lo $HDMAXLO"
done

# Set maxima
for PID in 07
do
sshpass -p $PASSWORD ssh $ILOUSER@$ILO4 -o KexAlgorithms=+diffie-hellman-group14-sha1 -o HostKeyAlgorithms=ssh-rsa -o HostKeyAlgorithms=ssh-dss -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "fan pid $PID hi $HDMAXHI"
done




#Override Thresholds due to unauthenticated drives
# Set caution
#for PID in 07
#do
# sshpass -p $PASSWORD ssh $ILOUSER@$ILO4 -o KexAlgorithms=+diffie-hellman-group14-sha1 -o HostKeyAlgorithms=ssh-rsa -o HostKeyAlgorithms=ssh-dss -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "fan t $PID caut $HDNOAUTHTEMPCAUT"
#done

# Set critical
#for PID in 07
#do
# sshpass -p $PASSWORD ssh $ILOUSER@$ILO4 -o KexAlgorithms=+diffie-hellman-group14-sha1 -o HostKeyAlgorithms=ssh-rsa -o HostKeyAlgorithms=ssh-dss -o HostKeyAlgorithms=ssh-rsa -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "fan t $PID crit $HDNOAUTHTEMPCRIT"
#done
1 change: 1 addition & 0 deletions source/linux/server/hardware/hpe/hp_ilo/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ HP服务器iLO技术

introduce_ilo.rst
hp_ilo_startup.rst
control_hpe_lio_fan_speed.rst

.. only:: subproject and html

Expand Down
8 changes: 8 additions & 0 deletions source/linux/server/hardware/hpe/hp_utilities_ubuntu.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ Management Component Pack

iLO WEB管理平台在 ``System Information`` 中可以观察系统的状态,其中 ``Storage Information`` 依赖 ``Agentless Management Service`` ,所以需要安装 ``hp-ams`` ,这样才能显示监控页面

.. note::

在升级Ubuntu 22.04之后, ``/etc/apt/sources.list.d/mcp.list`` 会自动配置关闭,看起来不再支持。此外,系统卸载了 ``hp-health`` ,原因似乎是::

The following packages have unmet dependencies:
hp-health : Depends: libc6-i686 but it is not installable or
lib32gcc1 but it is not installable

使用
=======

Expand Down

0 comments on commit 8568fbe

Please sign in to comment.