AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-526735

PrestonDocks's questions

Martin Hope
PrestonDocks
Asked: 2022-12-18 12:02:34 +0800 CST

为什么 ZFS RAIDZ2 创建 1GB 文件时只使用 2GB 数据

  • 9

我已经创建了一个 ZFS RAIDZ2 / Raid 6 文件系统,我相信它会在 2 个磁盘上存储奇偶校验。

root@zfs-demo:/data# zpool status
  pool: data
 state: ONLINE
config:

        NAME        STATE     READ WRITE CKSUM
        data        ONLINE       0     0     0
          raidz2-0  ONLINE       0     0     0
            sdb     ONLINE       0     0     0
            sdc     ONLINE       0     0     0
            sdd     ONLINE       0     0     0
            sde     ONLINE       0     0     0

errors: No known data errors

我有一个 1GB 的文件

root@zfs-demo:/data# ls -alh
total 1023M
drwxr-xr-x  2 root root    3 Dec 17 18:22 .
drwxr-xr-x 19 root root 4.0K Dec 17 18:10 ..
-rw-r--r--  1 root root 1.0G Dec 17 18:22 1GB.bin

我认为两个奇偶校验磁盘意味着我正在存储文件本身 + 两批奇偶校验 = 1 GB 文件总共 3 GB 的存储空间,但只分配了 2GB。

root@zfs-demo:/data# zpool list
NAME   SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
data  39.5G  2.01G  37.5G        -         -     0%     5%  1.00x    ONLINE  -
zfs
  • 2 个回答
  • 890 Views
Martin Hope
PrestonDocks
Asked: 2021-12-14 13:26:35 +0800 CST

如何从 CI 脚本进行身份验证并推送到 GitHub

  • 2

我在个人 GitLab 服务器上进行开发。在我的 CI/CD 脚本中,我想在创建新标签时将存储库推送到公共 GitHub 存储库。

CI/CD 在临时 Docker 容器中运行,因此没有存储凭据。然而,我可以在 GitLab 中添加秘密,但我不知道我会使用什么 git 命令务实地登录 GitHub。

我已经尝试过git push https://usesrname:password@github.com/myrepo,但这给了我一个身份验证失败的错误。

有任何想法吗?

git github
  • 1 个回答
  • 680 Views
Martin Hope
PrestonDocks
Asked: 2021-02-01 04:33:16 +0800 CST

ping 在 ubuntu 20.04 上返回 IPV6 地址

  • 2

我已经在云虚拟机上安装了 GitLab,不久之后,我用同一提供商 (Hetzner) 建立了第二台虚拟机作为后缀服务器

当我回到 GitLab 服务器以启用 SMTP 电子邮件并且没有发送任何内容时,我首先注意到一个问题,甚至邮件服务器上没有任何日志表明已尝试连接。

在 GitLab 服务器上

我试图从 gitlab ping 邮件服务器,但无论我等待多长时间,都只得到一个响应并且没有进一步的响应。

root@gitlab:~# ping mail.simoncarr.co.uk
PING mail.simoncarr.co.uk(2a01:4f8:c2c:a992:: (2a01:4f8:c2c:a992::)) 56 data bytes

如您所见,这是一个 IPV6 响应。我不记得除了启用ufw会影响 gitlab 网络的其他任何事情。

我已经关闭ufw了 gitlab 和邮件服务器,并且得到了相同的行为。

如果我 ping 外部服务器,我仍然会收到 IPV6 响应,但我至少会收到多个响应。

root@gitlab:~# ping bbc.co.uk
PING bbc.co.uk(2a04:4e42:600::81 (2a04:4e42:600::81)) 56 data bytes
64 bytes from 2a04:4e42:600::81 (2a04:4e42:600::81): icmp_seq=1 ttl=58 time=3.68 ms
64 bytes from 2a04:4e42:600::81 (2a04:4e42:600::81): icmp_seq=2 ttl=58 time=3.47 ms
64 bytes from 2a04:4e42:600::81 (2a04:4e42:600::81): icmp_seq=3 ttl=58 time=3.52 ms
64 bytes from 2a04:4e42:600::81 (2a04:4e42:600::81): icmp_seq=4 ttl=58 time=3.50 ms
64 bytes from 2a04:4e42:600::81 (2a04:4e42:600::81): icmp_seq=5 ttl=58 time=3.49 ms

在邮件服务器上

如果我 ping gitlab 服务器,我会得到 IPV4 响应,并且它们会按照您的预期重复。

PING gitlab.simoncarr.co.uk (168.119.124.76) 56(84) bytes of data.
64 bytes from static.76.124.119.168.clients.your-server.de (168.119.124.76): icmp_seq=1 ttl=58 time=0.878 ms
64 bytes from static.76.124.119.168.clients.your-server.de (168.119.124.76): icmp_seq=2 ttl=58 time=0.463 ms
64 bytes from static.76.124.119.168.clients.your-server.de (168.119.124.76): icmp_seq=3 ttl=58 time=0.353 ms
64 bytes from static.76.124.119.168.clients.your-server.de (168.119.124.76): icmp_seq=4 ttl=58 time=0.419 ms

如果我从邮件服务器 ping 外部服务器,我会再次收到 IPV6 响应。

root@mail:~# ping bbc.co.uk
PING bbc.co.uk(2a04:4e42:600::81 (2a04:4e42:600::81)) 56 data bytes
64 bytes from 2a04:4e42:600::81 (2a04:4e42:600::81): icmp_seq=1 ttl=58 time=6.68 ms
64 bytes from 2a04:4e42:600::81 (2a04:4e42:600::81): icmp_seq=2 ttl=58 time=6.24 ms
64 bytes from 2a04:4e42:600::81 (2a04:4e42:600::81): icmp_seq=3 ttl=58 time=6.23 ms
64 bytes from 2a04:4e42:600::81 (2a04:4e42:600::81): icmp_seq=4 ttl=58 time=6.16 ms

我在邮件服务器上更改的唯一与网络相关的是将反向 DNS 地址添加到 IPV4 和 IPV6 地址。

回到我的实际问题。

我希望能够从 GitLab 服务器连接到我的邮件服务器以发送 SMTP 电子邮件。即使ufw在两台服务器上都禁用,GitLab 也不会与邮件服务器通信。我不禁认为这个问题与我上面描述的行为有关。

HTTP到我的 GitLab 服务器的网络流量工作正常,我的邮件服务器从邮件客户端和其他 SMTP 服务器发送和接收电子邮件也正常。

ubuntu networking ipv6 ipv4 ufw
  • 1 个回答
  • 1310 Views
Martin Hope
PrestonDocks
Asked: 2019-06-07 07:56:46 +0800 CST

Ansible 多个主机在一个角色中

  • 2

随着脚本的进行,如何编写单个角色并连接到不同的主机?

这是我想做的一个例子,但我收到一个错误,如下所示。

ERROR! no action detected in task. This often indicates a misspelled module name, or incorrect module path.

The error appears to be in '/etc/ansible/roles/customer_setups/microlight/customer_app_template/tasks/main.yml': line 3, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

# tasks file for /etc/ansible/roles/customer_app_template
- hosts: synbill-apps
  ^ here

---
# tasks file for /etc/ansible/roles/customer_app_template
- hosts: synbill-apps
  tasks:
  - name: Clone syndicatebilling repository into a new customer app
    git:
      repo: git@bitbucket.org:xxxx/xxx.git
      version: syndicateBookings
      dest: /var/www/html/microlight
      force: yes
  - name: run npm install
    npm:
      path: /var/www/html/microlight
  - name: copy .env file
    copy:
      src: files/.env
      dest: /var/www/html/microlight/.env
  - name: create new app key
    command: chdir=/var/www/html/microlight adonis key:generate
  - name: migrate database
    command: chdir=/var/www/html/microlight adonis migration:run --force
  - name: start the app
    command: chdir=/var/www/html/microlight pm2 start server.js --name placeholder_domain
  - name: save the pm2 config
    command: chdir=/var/www/html/microlight pm2 save
- hosts: synbill-db
  - name: "Install Mysql Client package"
    apt:
      name: "{{ item }}"
      state: present
    with_items:
      - mysql-client
      - python3-dev
      - libmysqlclient-dev
      - python3-mysqldb
  - name: Create syndicate database
    mysql_db:
      name: microlight
      state: present
      login_user: simon
      login_password: xxxxxxxxxxx
- hosts: synbill-apps
  .....now the db is setup do some more work on the apps server
- hosts: synbill-webserver
  .... now setup the virtual host
- hosts: synbill-db
  .... now update the database to so user knows everything is setup.
ansible
  • 1 个回答
  • 5506 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve