服务器sata-raid混用模式下热插拔磁盘扩容

用的是惠普dl360服务器,增加了几块磁盘后,发现ubuntu中看不到。

新增6块:
2块保留sata模式
4块组成raid6

查看物理磁盘信息

lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
loop0    7:0    0     4K  1 loop /snap/bare/5
loop1    7:1    0  63.4M  1 loop /snap/core20/1974
loop2    7:2    0  63.9M  1 loop /snap/core20/2182
loop3    7:3    0  73.9M  1 loop /snap/core22/858
loop4    7:4    0 237.2M  1 loop /snap/firefox/2987
loop5    7:5    0 349.7M  1 loop /snap/gnome-3-38-2004/143
loop6    7:6    0 485.5M  1 loop /snap/gnome-42-2204/120
loop7    7:7    0   497M  1 loop /snap/gnome-42-2204/141
loop8    7:8    0  91.7M  1 loop /snap/gtk-common-themes/1535
loop9    7:9    0  12.3M  1 loop /snap/snap-store/959
loop10   7:10   0  53.3M  1 loop /snap/snapd/19457
loop11   7:11   0  40.4M  1 loop /snap/snapd/20671
loop12   7:12   0   452K  1 loop /snap/snapd-desktop-integration/83
sda      8:0    0   2.2T  0 disk 
sdb      8:16   0 238.5G  0 disk 
├─sdb1   8:17   0   512M  0 part /boot/efi
└─sdb2   8:18   0   238G  0 part /var/snap/firefox/common/host-hunspell
                                 /
sdc      8:32   0 745.2G  0 disk 
sdd      8:48   0 745.2G  0 disk 
sde      8:64   0   512M  1 disk 
└─sde1   8:65   0 509.8M  1 part /media/zcj/VID

格式化

# 格式化成 Ext4
mkfs.ext4 /dev/vdb1
​
# 格式化为 XFS
apt install xfsprogs
mkfs.xfs /dev/vdb2
​
# 格式化为 Btrfs
apt install btrfs-progs
mkfs.btrfs /dev/vdb3

这里我们选择xfs

sudo mkfs.xfs /dev/sdc
meta-data=/dev/sdc               isize=512    agcount=4, agsize=48838262 blks
         =                       sectsz=4096  attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=1, rmapbt=0
         =                       reflink=1    bigtime=0 inobtcount=0
data     =                       bsize=4096   blocks=195353046, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
log      =internal log           bsize=4096   blocks=95387, version=2
         =                       sectsz=4096  sunit=1 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0
Discarding blocks...Done.

临时挂载

普通单xfs 磁盘

mount -t xfs /dev/sdc /disk2

raid磁盘

sudo mkfs.xfs /dev/sda
mkfs.xfs: /dev/sda appears to contain a partition table (gpt).
mkfs.xfs: Use the -f option to force overwrite.

这里提示无法挂载,有gpt分区表,因为确认是新raid,我们选择强制格式化,加-f参数:
sudo mkfs.xfs -f /dev/sda

df -h 查看挂载结果

永久挂载

vim /etc/fstab

/swapfile                                 none            swap    sw              0       0
/dev/sdc        /disk2          xfs     defaults         0       0
/dev/sdd        /disk3           xfs    defaults          0        0

生效查看:
mount -a

brew git错误

fatal: not in a git directory
Error: Command failed with exit 128: git

首先 网上说的那个git config 是没用的,我是在brew -v 正常的情况下,出现这个错误的,

所以,继续搜索...

解决:
执行 brew doctor,然后按照提示,把所有的warnning消除掉,然后就正常了

brew doctor
Your system is ready to brew.

brew update --verbose
Checking if we need to fetch /opt/homebrew/Homebrew...
Fetching /opt/homebrew/Homebrew...
Checking if we need to fetch formula.jws.json...
Checking if we need to fetch cask.jws.json...
Checking if we need to fetch formula_tap_migrations.jws.json...
Checking if we need to fetch cask_tap_migrations.jws.json...
Already up-to-date.

m1 macbook(arm版通用)安装brew

安装:
cd /opt/homebrew/

/bin/zsh -c "$(curl -fsSL https://gitee.com/huwei1024/HomebrewCN/raw/master/Homebrew.sh)"

消除告警:
git config --global --add safe.directory /opt/homebrew/Homebrew/Library/Taps/homebrew/homebrew-core git config --global --add safe.directory /opt/homebrew/Homebrew/Library/Taps/homebrew/homebrew-cask

最后将brew路径写入shell配置 .zshrc
export PATH=$PATH:/opt/homebrew/bin

燕尾蝶

凭着些许的记忆,我找到了《燕尾蝶》,那是少年时的震撼,一直萦绕于心,趁这个春节有空,得以找到资源。重温后,却感觉些许的迷茫,一种破碎记忆的感觉,时间太久远了,记忆已经模糊,感觉就是印象中的故事,又感觉有些生疏,因为印象中没有这么多细节,我只记依稀得移民,黑社会,各种加载的语言,昏暗的画面。。。

一时恍惚。

我又仔细搜索了下,着实找不到第二个能对的上记忆的影片,只能悻悻道,可能就是它吧。

人的记忆是会变的,趁年轻,多写些记忆吧。

如何在windows中模拟arm64安卓系统

quem efi:

https://releases.linaro.org/reference-platform/enterprise/17.12/uefi/release/qemu-aarch64/QEMU_EFI.fd

安卓 iso:

https://developers.google.cn/android/images?hl=zh-cn#crosshatch

quem

pacman 所需的msys2 安装

https://www.qemu.org/download/#windows

For 64 bit Windows 8.1 or above (in UCRT64):

pacman -S mingw-w64-ucrt-x86_64-qemu
qemu-img --version
qemu-img version 8.2.0
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers

qemu-system-aarch64

debian下安装docker后无法使用

安装后提示:
docker is already the newest version (1.5-2)

但是运行docker 命令提示找不到。

然后重新安装:
curl -sSL https://get.docker.com/ | sudo sh
提示:
The repository 'https://download.docker.com/linux/ubuntu bookworm Release' does not have a Release file.

cd /etc/apt/sources.list.d/

发现有个 archive_uri-https_download_docker_com_linux_ubuntu-bookworm.list

rm archive_uri-https_download_docker_com_linux_ubuntu-bookworm.list
删除后再执行,就正常了。

Client: Docker Engine - Community
 Version:           25.0.3
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        4debf41
 Built:             Tue Feb  6 21:14:25 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          25.0.3
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.6
  Git commit:       f417435
  Built:            Tue Feb  6 21:14:25 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.28
  GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

gitlab配置

看日志:
gitlab-ctl tail

看运行状态:
gitlab-ctl status

配置:
vi /etc/gitlab/gitlab.rb
打开屏蔽,然后 gitlab-ctl reconfigure

网上的一份最简配置

external_url 'http://git.xxx.com'
gitlab_rails['time_zone'] = 'Asia/Shanghai'

# 关闭电子邮件相关功能
gitlab_rails['smtp_enable'] = false
gitlab_rails['gitlab_email_enabled'] = false
gitlab_rails['incoming_email_enabled'] = false

# Terraform
gitlab_rails['terraform_state_enabled'] = false

# Usage Statistics
gitlab_rails['usage_ping_enabled'] = false
gitlab_rails['sentry_enabled'] = false
grafana['reporting_enabled'] = false

# 关闭容器仓库功能
gitlab_rails['gitlab_default_projects_features_container_registry'] = false
gitlab_rails['registry_enabled'] = false
registry['enable'] = false
registry_nginx['enable'] = false

# 包仓库
gitlab_rails['packages_enabled'] = false
gitlab_rails['dependency_proxy_enabled'] = false

# GitLab KAS
gitlab_kas['enable'] = false
gitlab_rails['gitlab_kas_enabled'] = false

# Mattermost
mattermost['enable'] = false
mattermost_nginx['enable'] = false

# Kerberos
gitlab_rails['kerberos_enabled'] = false
sentinel['enable'] = false

# GitLab Pages
gitlab_pages['enable'] = false
pages_nginx['enable'] = false

# 禁用 PUMA 集群模式
puma['worker_processes'] = 0
puma['min_threads'] = 1
puma['max_threads'] = 2

# 降低后台守护进程并发数
sidekiq['max_concurrency'] = 5

gitlab_ci['gitlab_ci_all_broken_builds'] = false
gitlab_ci['gitlab_ci_add_pusher'] = false

# 关闭监控
prometheus_monitoring['enable'] = false
alertmanager['enable'] = false
node_exporter['enable'] = false
redis_exporter['enable'] = false
postgres_exporter['enable'] = false
pgbouncer_exporter['enable'] = false
gitlab_exporter['enable'] = false
grafana['enable'] = false
sidekiq['metrics_enabled'] = false