应该很容易......zpool status -l rpool
或者zpool status -v
至少我是这么想的。
我的问题是我们在 HP DL380 G5 上运行 Solaris 10,我怀疑非本机硬件会造成混乱。我们有 2 个 zpool,其中之一由多个磁盘组成。但是,当我运行时zpool status -l rpool
它只列出一个磁盘。我们有理由相信某个磁盘正在发生故障或已经发生故障,并且希望将其从 zpool 中删除,但无法列出物理磁盘......
我能做些什么?
马丁
答案1
zpool status 不支持某个
-l
选项,您一定会与其他内容混淆。# cat /etc/release Oracle Solaris 10 1/13 s10x_u11wos_24a X86 Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved. Assembled 17 January 2013 # zpool help status usage: status [-vx] [-T d|u] [pool] ... [interval [count]]
您写道您有两个池,但您正在针对根池运行命令,而根池不太可能是具有多个磁盘的池。只需在不指定池名称的情况下运行
zpool status -v
,您的两个池都应该报告其磁盘。如果由于某种原因您在报告中仍然缺少磁盘,您可以使用它
zpool history
来了解在池上使用了哪些命令。
答案2
@singlespeedbeard 您对该选项没有感到困惑-l
,原始的 Oracle/Sun 选项仍然存在提到它。
事实上,看起来当前的 Ubuntu 发行版 (22.04) zpool 支持该功能,但具有不同的开关:
zpool status -P
我的输出,请注意设备的完整路径:
pool: bpool
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
bpool ONLINE 0 0 0
/dev/disk/by-partuuid/7452a4ac-8abc-aa45-9042-e790c2e92649 ONLINE 0 0 0
errors: No known data errors
pool: rpool
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
/dev/disk/by-partuuid/808cd79c-2e12-aa4c-b4de-4d94fe98bc7b ONLINE 0 0 0
errors: No known data errors
答案3
zpool status -v
pool: pve-zfs-00
state: ONLINE
scan: scrub repaired 0B in 00:00:00 with 0 errors on Sun Nov 13 00:24:01 2022
config:
NAME STATE READ WRITE CKSUM
pve-zfs-00 ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ata-MTFDDAK960TDT-1AW1ZA_02JG545D7A44710LEN_2E71DCAA ONLINE 0 0 0
ata-MTFDDAK960TDT-1AW1ZA_02JG545D7A44710LEN_2E71DCB4 ONLINE 0 0 0
ata-MTFDDAK960TDT-1AW1ZA_02JG545D7A44710LEN_2E71DC59 ONLINE 0 0 0
errors: No known data errors
ls -la /dev/disk/by-id/ata-MTFDDAK960TDT-1AW1ZA_02JG545D7A44710LEN_2E71DCAA
lrwxrwxrwx 1 root root 9 Dec 2 11:43 /dev/disk/by-id/ata-MTFDDAK960TDT-1AW1ZA_02JG545D7A44710LEN_2E71DCAA -> ../../sdc
ls -la /dev/disk/by-id/ata-MTFDDAK960TDT-1AW1ZA_02JG545D7A44710LEN_2E71DCB4
lrwxrwxrwx 1 root root 9 Dec 2 11:43 /dev/disk/by-id/ata-MTFDDAK960TDT-1AW1ZA_02JG545D7A44710LEN_2E71DCB4 -> ../../sdd
ls -la /dev/disk/by-id/ata-MTFDDAK960TDT-1AW1ZA_02JG545D7A44710LEN_2E71DC59
lrwxrwxrwx 1 root root 9 Dec 2 11:43 /dev/disk/by-id/ata-MTFDDAK960TDT-1AW1ZA_02JG545D7A44710LEN_2E71DC59 -> ../../sde