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

raspi's questions

Martin Hope
raspi
Asked: 2015-08-20 09:33:07 +0800 CST

从 FreeBSD 迁移到 NAS4Free 后 ZFS 池缺少可用空间

  • 0

我正在运行 FreeBSD10.0-RELEASE-p4并迁移到 FreeBSD 版本的 NAS4Free 10.2-RELEASE #0 r286738M: Thu Aug 13 21:32:58 CEST 2015。现在我缺少可用空间,无法从池中删除任何文件。读取文件工作正常。

所有驱动器均为 2 TB。我不记得在迁移之前导出池。根据互联网消息来源,导出和导入池应该释放空间,但事实并非如此。池正在运行版本 15。可以升级或清理帮助吗?

NAME        STATE     READ WRITE CKSUM
storage     ONLINE       0     0     0
  raidz2-0  ONLINE       0     0     0
    da0     ONLINE       0     0     0  block size: 512B configured, 4096B native
    da3     ONLINE       0     0     0  block size: 512B configured, 4096B native
    da6     ONLINE       0     0     0  block size: 512B configured, 4096B native
    da9     ONLINE       0     0     0  block size: 512B configured, 4096B native
    da12    ONLINE       0     0     0  block size: 512B configured, 4096B native
    da15    ONLINE       0     0     0  block size: 512B configured, 4096B native
  raidz2-1  ONLINE       0     0     0
    da1     ONLINE       0     0     0  block size: 512B configured, 4096B native
    da4     ONLINE       0     0     0  block size: 512B configured, 4096B native
    da7     ONLINE       0     0     0  block size: 512B configured, 4096B native
    da10    ONLINE       0     0     0  block size: 512B configured, 4096B native
    da13    ONLINE       0     0     0  block size: 512B configured, 4096B native
    da16    ONLINE       0     0     0  block size: 512B configured, 4096B native
  raidz2-2  ONLINE       0     0     0
    da2     ONLINE       0     0     0  block size: 512B configured, 4096B native
    da5     ONLINE       0     0     0  block size: 512B configured, 4096B native
    da8     ONLINE       0     0     0  block size: 512B configured, 4096B native
    da11    ONLINE       0     0     0  block size: 512B configured, 4096B native
    da14    ONLINE       0     0     0  block size: 512B configured, 4096B native
    da17    ONLINE       0     0     0  block size: 512B configured, 4096B native

因此:((6 个驱动器 - 2 个奇偶校验驱动器)x 2 TB)x 3 raidz2 = 24 TB,即 21.83 TB可用空间减去元数据。

特性:

# zpool get all
NAME     PROPERTY                       VALUE                          SOURCE
storage  size                           32.6T                          -
storage  capacity                       97%                            -
storage  altroot                        -                              default
storage  health                         ONLINE                         -
storage  guid                           14393350251601347202           local
storage  version                        15                             local
storage  bootfs                         -                              default
storage  delegation                     on                             default
storage  autoreplace                    off                            default
storage  cachefile                      -                              default
storage  failmode                       wait                           default
storage  listsnapshots                  off                            default
storage  autoexpand                     off                            default
storage  dedupditto                     0                              default
storage  dedupratio                     1.00x                          -
storage  free                           696G                           -
storage  allocated                      31.9T                          -
storage  readonly                       off                            -
storage  comment                        -                              default
storage  expandsize                     -                              -
storage  freeing                        0                              local
storage  fragmentation                  -                              -
storage  leaked                         0                              local
storage  feature@async_destroy          disabled                       local
storage  feature@empty_bpobj            disabled                       local
storage  feature@lz4_compress           disabled                       local
storage  feature@multi_vdev_crash_dump  disabled                       local
storage  feature@spacemap_histogram     disabled                       local
storage  feature@enabled_txg            disabled                       local
storage  feature@hole_birth             disabled                       local
storage  feature@extensible_dataset     disabled                       local
storage  feature@embedded_data          disabled                       local
storage  feature@bookmarks              disabled                       local
storage  feature@filesystem_limits      disabled                       local
storage  feature@large_blocks           disabled                       local

zpool iostat显示可用空间:

# zpool iostat -v
               capacity     operations    bandwidth
pool        alloc   free   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
storage     31.9T   696G      0      0    550    540
  raidz2    10.8T  63.1G      0      0    162      2
    da0         -      -      0      0    185    135
    da3         -      -      0      0    157    135
    da6         -      -      0      0    158    135
    da9         -      -      0      0    163    135
    da12        -      -      0      0    158    135
    da15        -      -      0      0    149    135
  raidz2    10.8T  90.1G      0      0    162      2
    da1         -      -      0      0    125    101
    da4         -      -      0      0    102    101
    da7         -      -      0      0    115    101
    da10        -      -      0      0    125    101
    da13        -      -      0      0    100    101
    da16        -      -      0      0    106    101
  raidz2    10.3T   543G      0      0    225    536
    da2         -      -      0      0    139    243
    da5         -      -      0      0    133    244
    da8         -      -      0      0    118    246
    da11        -      -      0      0    123    246
    da14        -      -      0      0    123    244
    da17        -      -      0      0    124    243
----------  -----  -----  -----  -----  -----  -----

zpool list显示可用空间:

# zpool list storage
NAME      SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
storage  32.6T  31.9T   696G         -      -    97%  1.00x  ONLINE  -

zfs list不显示可用空间:

# zfs list
NAME      USED  AVAIL  REFER  MOUNTPOINT
storage  21.3T      0  21.3T  /mnt/storage

df不显示可用空间:

# df -ha
Filesystem      Size    Used   Avail Capacity  Mounted on
/dev/xmd0       120M     69M     51M    58%    /
devfs           1.0K    1.0K      0B   100%    /dev
/dev/xmd1       719M    260M    459M    36%    /usr/local
procfs          4.0K    4.0K      0B   100%    /proc
storage          21T     21T      0B   100%    /mnt/storage
/dev/xmd2       248M    3.9M    224M     2%    /var
tmpfs           128M     48K    128M     0%    /var/tmp
/dev/ada0s1a    743M    151M    592M    20%    /cf

没有截图

# zfs list -t snapshot
no datasets available

数据集:

# zdb -d storage
Dataset mos [META], ID 0, cr_txg 4, 50.0M, 565 objects
Dataset storage [ZPL], ID 16, cr_txg 1, 21.3T, 1111968 objects
Verified large_blocks feature refcount is correct (0)

重复数据删除:

# zdb -D storage
All DDTs are empty

凸轮控制:

# camcontrol devlist -v
scbus0 on mpt0 bus 0:
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 0 lun 0 (pass0,da0)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 1 lun 0 (pass1,da1)
<ATA ST2000DM001-1CH1 CC43>        at scbus0 target 2 lun 0 (pass2,da2)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 3 lun 0 (pass3,da3)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 4 lun 0 (pass4,da4)
<ATA ST2000DM001-1CH1 CC43>        at scbus0 target 5 lun 0 (pass5,da5)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 6 lun 0 (pass6,da6)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 7 lun 0 (pass7,da7)
<ATA ST2000DM001-1CH1 CC43>        at scbus0 target 8 lun 0 (pass8,da8)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 9 lun 0 (pass9,da9)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 10 lun 0 (pass10,da10)
<ATA ST2000DM001-1CH1 CC43>        at scbus0 target 11 lun 0 (pass11,da11)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 12 lun 0 (pass12,da12)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 13 lun 0 (pass13,da13)
<ATA ST2000DM001-1CH1 CC43>        at scbus0 target 14 lun 0 (pass14,da14)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 15 lun 0 (pass15,da15)
<ATA SAMSUNG HD204UI 0001>         at scbus0 target 16 lun 0 (pass16,da16)
<ATA ST2000DM001-1CH1 CC43>        at scbus0 target 17 lun 0 (pass17,da17)
<HP HP SAS EXP Card 2.06>          at scbus0 target 18 lun 0 (pass18,ses0)
<>                                 at scbus0 target -1 lun ffffffff ()
scbus1 on ata2 bus 0:
<>                                 at scbus1 target -1 lun ffffffff ()
scbus2 on ata3 bus 0:
<>                                 at scbus2 target -1 lun ffffffff ()
scbus3 on ata4 bus 0:
<KINGSTON SV300S37A60G 525ABBF0>   at scbus3 target 0 lun 0 (ada0,pass19)
<>                                 at scbus3 target -1 lun ffffffff ()
scbus4 on ata5 bus 0:
<>                                 at scbus4 target -1 lun ffffffff ()
scbus-1 on xpt0 bus 0:
<>                                 at scbus-1 target -1 lun ffffffff (xpt0)
freebsd
  • 1 个回答
  • 495 Views
Martin Hope
raspi
Asked: 2009-10-15 12:57:46 +0800 CST

OpenVPN:ifup tap0 断开所有连接

  • 0

我正在尝试使用未连接到物理网络的 OpenVPN 创建星形“虚拟”局域网。IE。tap0 数据包不应发送到 eth0。数据包应该只通过 OpenVPN 到达连接的客户端。

此设置适用于运行 Virtual Box 的 OpenVPN 测试机,但不适用于运行在 Xen 之上的实际服务器。两台服务器都运行 Ubuntu Intrepid。

/etc/网络/接口:

iface tap0 inet manual
  address 10.10.10.1
  netmask 255.255.255.0
  gateway 10.10.10.1

/etc/openvpn/server.conf

mode server
tls-server
port 1194
proto udp
dev tap
client-to-client
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/servername.crt
key /etc/openvpn/easy-rsa/keys/servername.key
dh /etc/openvpn/easy-rsa/keys/dh384.pem
ifconfig-pool-persist ipp.txt
server-bridge 10.10.10.1 255.255.255.0 10.10.10.128 10.10.10.250
push .route 10.10.10.1 255.255.255.0
keepalive 5 60
comp-lzo
persist-key
persist-tun
status /var/log/openvpn-status.log
log-append /var/log/openvpn.log
verb 3
user nobody
group nogroup

ifup tap0在 Virtual Box 上:一切正常,SSH 继续运行。但是在 Xen SSH 连接断开时,我必须重新启动整台机器。我错过了什么?

linux
  • 3 个回答
  • 1223 Views
Martin Hope
raspi
Asked: 2009-06-02 14:58:19 +0800 CST

MySQL:寻找未使用的数据库

  • 5

是否有任何命令可以查找一个月左右没有任何活动的数据库?

只需将 SQL 转储一个月并运行 diff,如果没有差异,删除该数据库?

mysql maintenance
  • 4 个回答
  • 1958 Views
Martin Hope
raspi
Asked: 2009-05-30 17:04:04 +0800 CST

硬盘节流?

  • 4

你在同一时间复制很多东西,计算机性能就会下降。例如,尝试同时复制 10 多个 ISO 映像。

网络中有 QoS,CPU 中有关联性和优先级,但是硬盘驱动器有什么可以限制 I/O 队列的吗?虚拟文件系统?操作系统驱动程序?

当然,您可以使用例如

  • 制作要复制的文件列表并运行一个一个复制文件的脚本
  • 使用 TeraCopy 等软件

欢迎使用 Windows 和 GNU/Linux 解决方案。

windows performance hard-drive linux
  • 5 个回答
  • 1400 Views
Martin Hope
raspi
Asked: 2009-05-25 03:04:43 +0800 CST

Linux howto/tutorial/help 站点?

  • 5
锁定。这个问题及其答案被锁定,因为这个问题离题但具有历史意义。它目前不接受新的答案或交互。

我发现HowtoForge非常有帮助。有没有其他类似的网站没有太旧的教程,现在无法使用?

linux tutorial
  • 11 个回答
  • 830 Views
Martin Hope
raspi
Asked: 2009-05-20 06:41:56 +0800 CST

Linux VLAN 桥接器

  • 2

我有带 VLAN 的家庭网络,一个用于 LAN,一个用于 WLAN,一个用于 Internet。我想使用桥接,而不是为每台机器配置这些相同的 VLAN,它们有自己的 VLAN ID,网桥是 LAN、WLAN 和互联网。

我已经尝试过了,但由于某种原因,keep-alive/ttl 似乎被破坏了,因为 SSH 会话等突然断开连接。

我们有相同的设置在工作场所工作了 4 年以上,有 100 多个客户,但它是自定义防火墙/路由器硬件,因此无法访问它。我知道它运行Linux。

那么 Debian/Ubuntu 默认网络设置做错了什么还是只是 NIC 驱动程序/硬件问题?我试图用 ttl 等设置弄乱 araund 没有任何运气。网桥中发生了坏事,因为当前的仅 VLAN 设置工作正常。

接口:

 auto lo
 iface lo inet loopback

 # The primary network interface
 allow-hotplug eth0
 allow-hotplug eth1

 iface eth0 inet static
 iface eth1 inet static

 auto vlan111
 auto vlan222
 auto vlan333
 auto vlan444
 auto br0
 auto br1
 auto br2

 # LAN
 iface vlan111 inet static
         vlan_raw_device eth0

 # WLAN
 iface vlan222 inet static
         vlan_raw_device eth0

 # ADSL Modem
 iface vlan333 inet static
         vlan_raw_device eth1

 # Internet
 iface vlan444 inet static
         vlan_raw_device eth0

 # LAN bridge
 iface br0 inet static
         address 192.168.0.1
         netmask 255.255.255.0
         bridge_ports eth0.111
         bridge_stp on

 # Internet bridge
 iface br1 inet static
         address x.x.x.x
         netmask x.x.x.x
         gateway x.x.x.x
         bridge_ports eth1.333 eth0.444
         bridge_stp on
         post-up iptables -t nat -A POSTROUTING -o br1 -j MASQUERADE
         pre-down iptables -t nat -D POSTROUTING -o br1 -j MASQUERADE

 # WLAN bridge
 iface br2 inet static
         address 192.168.1.1
         netmask 255.255.255.0
         bridge_ports eth0.222
         bridge_stp on

系统控制:

net.ipv4.conf.default.forwarding=1
router linux networking vlan
  • 5 个回答
  • 15341 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