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-176802

dorinand's questions

Martin Hope
dorinand
Asked: 2018-05-03 04:35:10 +0800 CST

DRBD 没有输出 cat /proc/drbd

  • 3

我同步我的新磁盘,输出drbdtop:

Resource: myres: (Overall danger score: 14)
Local Disc(Primary):
volume 0 (/dev/drbd0): UpToDate(normal disk state)
volume 1 (/dev/drbd1): UpToDate(normal disk state)
volume 2 (/dev/drbd2): Inconsistent(data is not accessible or usable until resync is complete)

Connection to zfs.user.osdc2(Secondary): Connected(connected to zfs.user.osdc2)
volume 0: 
UpToDate(normal disk state)
volume 1:
UpToDate(normal disk state)
volume 2:
Replication:SyncTarget(local volume is being synchronized with data from zfs.user.osdc2) 95.6% remaining   UpToDate(normal disk state)  

cat /proc/drbd但是关于我的资源没有输出。仅有的:

version: 9.0.9-1 (api:2/proto:86-112)
GIT-hash: f7b979e7af01813e031aac579140237640c94569 build by mockbuild@, 2017-09-14 17:45:45
Transports (api:16): tcp (9.0.9-1)

为什么没有输出?我应该如何解决这个问题?

drbd
  • 1 个回答
  • 3323 Views
Martin Hope
dorinand
Asked: 2018-04-22 03:20:20 +0800 CST

/dev/zero 和 /dev/urandom 的文件大小不同 [重复]

  • 10
这个问题在这里已经有了答案:
为什么 /dev/random 中的 dd 给出不同的文件大小? (4 个回答)
4年前关闭。

我正在尝试通过dd命令创建随机 1G 测试文件。

dd status=progress if=/dev/zero of=/tmp/testfile.zer bs=100M count=10
dd status=progress if=/dev/urandom of=/tmp/testfile1.ran bs=100M count=10
dd status=progress if=/dev/urandom of=/tmp/testfile2.ran bs=100M count=20

输出是:

-rw-rw-r-- 1 dorinand dorinand  320M dub 21 12:37 testfile1.ran
-rw-rw-r-- 1 dorinand dorinand  640M dub 21 12:37 testfile2.ran
-rw-rw-r-- 1 dorinand dorinand 1000M dub 21 12:37 testfile.zer

为什么生成的输出测试文件要/dev/urandom小三倍?我希望 testfile1.ran 的大小为 1000M,而 testfile2.ran 的大小为 2000M。任何人都可以为什么会发生这种情况?我应该如何生成随机测试文件?

linux dd
  • 1 个回答
  • 2660 Views
Martin Hope
dorinand
Asked: 2018-04-21 06:08:37 +0800 CST

ZFS 重复数据删除不起作用

  • 3

我创建了 pool tank1 和 fs tank/home。

[root@zfs]# zfs list
NAME         USED  AVAIL  REFER  MOUNTPOINT
tank1       3.22G   381G  32.0K  /tank1
tank1/home  3.22G  16.8G  1.95G  /tank1/home

我在 tank1/home 中从 .Deduplication 中创建了两个 1G 文件/dev/zero,打开了压缩,关闭了压缩:

# zfs get all | egrep 'dedup|compression'
tank1             compression           off                    default
tank1             dedup                 on                     local
tank1/home        compression           off                    default
tank1/home        dedup                 on                     inherited from tank1

# zpool list
NAME    SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
tank1   596G  4.84G   591G         -     0%     0%  1.00x  ONLINE  -

# zdb -D tank1
All DDTs are empty
# zdb -S tank1
Simulated DDT histogram:

bucket              allocated                       referenced          
______   ______________________________   ______________________________
refcnt   blocks   LSIZE   PSIZE   DSIZE   blocks   LSIZE   PSIZE   DSIZE
------   ------   -----   -----   -----   ------   -----   -----   -----
   16K        1    128K    128K    128K    25.8K   3.22G   3.22G   3.22G
 Total        1    128K    128K    128K    25.8K   3.22G   3.22G   3.22G

dedup = 26400.00, compress = 1.00, copies = 1.00, dedup * compress / copies = 26425.81

为什么zdb输出并zpool list没有显示任何去重和模拟zdb -S tank1显示26400?如何开启重复数据删除?我也试过zfs set dedup=verify tank1了,问题依旧。zdb -DD tank1/homemenas的输出是什么?

# zdb -DD tank1/home
Dataset tank1/home [ZPL], ID 165, cr_txg 963, 1.95G, 8 objects
linux zfs
  • 1 个回答
  • 1972 Views
Martin Hope
dorinand
Asked: 2018-01-05 06:20:19 +0800 CST

通过 pip 安装时出错

  • 3

我正在尝试通过以下命令通过 pip 在 Centos 7 虚拟机上安装 openstack 客户端:

pip install python-openstackclient

在安装结束时,我收到此错误:

Command "/usr/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-noqgbvv4/netifaces/setup.py';f=getattr(tokenize, 'open', open)(_file_);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, _file_, 'exec'))" install --record /tmp/pip-eyssu5xp-record/install-record.txt
--single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-noqgbvv4/netifaces/

任何人都可以帮助我并解释问题出在哪里,因为错误消息对我来说不是很清楚。

我用 kubuntu 在我的个人 PC 上安装了 openstack 客户端,它可以正常工作。

编辑:我使用 --log 选项运行 pip 。这是最后一个例外

Exception information:
Traceback (most recent call last):
  File "/usr/lib/python3.4/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3.4/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/usr/lib/python3.4/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/usr/lib/python3.4/site-packages/pip/req/req_install.py", line 878, in install
    spinner=spinner,
  File "/usr/lib/python3.4/site-packages/pip/utils/__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "/usr/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-07sbmmn8/netifaces/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-u60jwjmb-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-07sbmmn8/netifaces/
centos python3
  • 2 个回答
  • 2278 Views

Sidebar

Stats

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

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve