硬盘在 ubuntu 服务器 20.04 中显示为 ata,在服务器 23.10 中显示为 scsi - zpool 无法识别磁盘

硬盘在 ubuntu 服务器 20.04 中显示为 ata,在服务器 23.10 中显示为 scsi - zpool 无法识别磁盘

我决定为我的家庭服务器安装一个全新的操作系统。我为根操作系统连接了一个新的 SSD,并安装了 ubuntu server 23.10。安装和首次启动、安装一些软件等后,我尝试导入由 5 个 HDD(zpool importzpool import -f)组成的 ZFS 池

这将返回以下内容:

 pool: pool
     id: 9803748964127808070
  state: UNAVAIL
status: The pool was last accessed by another system.
 action: The pool cannot be imported due to damaged devices or data.
   see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-EY
 config:

        pool                                          UNAVAIL  insufficient replicas
          raidz2-0                                    UNAVAIL  insufficient replicas
            sdf                                       ONLINE
            ata-WDC_WD30EFRX-68EUZN0_WD-WMC4N0D2HWW2  UNAVAIL
            sde                                       ONLINE
            ata-WDC_WD30EFRX-68EUZN0_WD-WMC4N0D4XY9K  UNAVAIL
            ata-WDC_WD30EFRX-68EUZN0_WD-WMC4N0D8KYWT  UNAVAIL

然后,我将旧的 SSD 与正在运行的 Ubuntu Server 20.04(最初是 16.04 -- 然后不断升级... 一直对我忠心耿耿)连接起来。这样,池就可以毫无问题地加载。

我猜问题在于磁盘的初始化不同。不可用的磁盘(ata-WDC_***)实际上在 23.10 中可用,但等等scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N0D4XY9K

我很疑惑:为什么 23.10 中的命名不同?此外,为什么池中的两个磁盘突然初始化为sdfsde?最初,池中的所有磁盘都是通过其 添加的/dev/disk/by-id/

//编辑:输出ls -la /dev/disk/by-id

lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-0ATA_GIGABYTE_GP-GSTF_SN232808922472 -> ../../sdf
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-0ATA_GIGABYTE_GP-GSTF_SN232808922472-part1 -> ../../sdf1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-0ATA_GIGABYTE_GP-GSTF_SN232808922472-part2 -> ../../sdf2
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-0ATA_GIGABYTE_GP-GSTF_SN232808922472-part3 -> ../../sdf3
lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-1ATA_GIGABYTE_GP-GSTFS31480GNTD_SN232808922472 -> ../../sdf
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-1ATA_GIGABYTE_GP-GSTFS31480GNTD_SN232808922472-part1 -> ../../sdf1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-1ATA_GIGABYTE_GP-GSTFS31480GNTD_SN232808922472-part2 -> ../../sdf2
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-1ATA_GIGABYTE_GP-GSTFS31480GNTD_SN232808922472-part3 -> ../../sdf3
lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-350014ee26452f8bf -> ../../sde
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-350014ee26452f8bf-part1 -> ../../sde1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-350014ee26452f8bf-part9 -> ../../sde9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-350014ee2bd4d1804 -> ../../sdd
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-350014ee2bd4d1804-part1 -> ../../sdd1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-350014ee2bd4d1804-part9 -> ../../sdd9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-350014ee604c7074e -> ../../sdc
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-350014ee604c7074e-part1 -> ../../sdc1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-350014ee604c7074e-part9 -> ../../sdc9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-350014ee6af71860b -> ../../sda
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-350014ee6af71860b-part1 -> ../../sda1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-350014ee6af71860b-part9 -> ../../sda9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-350014ee6af719205 -> ../../sdb
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-350014ee6af719205-part1 -> ../../sdb1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-350014ee6af719205-part9 -> ../../sdb9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-SATA_GIGABYTE_GP-GSTF_SN232808922472 -> ../../sdf
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_GIGABYTE_GP-GSTF_SN232808922472-part1 -> ../../sdf1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_GIGABYTE_GP-GSTF_SN232808922472-part2 -> ../../sdf2
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_GIGABYTE_GP-GSTF_SN232808922472-part3 -> ../../sdf3
lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-SATA_WDC_WD30EFAX-68J_WD-WX52D409RASJ -> ../../sdd
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_WDC_WD30EFAX-68J_WD-WX52D409RASJ-part1 -> ../../sdd1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_WDC_WD30EFAX-68J_WD-WX52D409RASJ-part9 -> ../../sdd9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-SATA_WDC_WD30EFRX-68E_WD-WCC4N7FDCRUN -> ../../sde
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_WDC_WD30EFRX-68E_WD-WCC4N7FDCRUN-part1 -> ../../sde1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_WDC_WD30EFRX-68E_WD-WCC4N7FDCRUN-part9 -> ../../sde9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N0D2HWW2 -> ../../sdc
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N0D2HWW2-part1 -> ../../sdc1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N0D2HWW2-part9 -> ../../sdc9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N0D4XY9K -> ../../sdb
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N0D4XY9K-part1 -> ../../sdb1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N0D4XY9K-part9 -> ../../sdb9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N0D8KYWT -> ../../sda
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N0D8KYWT-part1 -> ../../sda1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 scsi-SATA_WDC_WD30EFRX-68E_WD-WMC4N0D8KYWT-part9 -> ../../sda9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 wwn-0x50014ee26452f8bf -> ../../sde
lrwxrwxrwx  1 root root   10 Jan  9 09:11 wwn-0x50014ee26452f8bf-part1 -> ../../sde1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 wwn-0x50014ee26452f8bf-part9 -> ../../sde9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 wwn-0x50014ee2bd4d1804 -> ../../sdd
lrwxrwxrwx  1 root root   10 Jan  9 09:11 wwn-0x50014ee2bd4d1804-part1 -> ../../sdd1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 wwn-0x50014ee2bd4d1804-part9 -> ../../sdd9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 wwn-0x50014ee604c7074e -> ../../sdc
lrwxrwxrwx  1 root root   10 Jan  9 09:11 wwn-0x50014ee604c7074e-part1 -> ../../sdc1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 wwn-0x50014ee604c7074e-part9 -> ../../sdc9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 wwn-0x50014ee6af71860b -> ../../sda
lrwxrwxrwx  1 root root   10 Jan  9 09:11 wwn-0x50014ee6af71860b-part1 -> ../../sda1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 wwn-0x50014ee6af71860b-part9 -> ../../sda9
lrwxrwxrwx  1 root root    9 Jan  9 09:11 wwn-0x50014ee6af719205 -> ../../sdb
lrwxrwxrwx  1 root root   10 Jan  9 09:11 wwn-0x50014ee6af719205-part1 -> ../../sdb1
lrwxrwxrwx  1 root root   10 Jan  9 09:11 wwn-0x50014ee6af719205-part9 -> ../../sdb9

答案1

我的建议是强制 ZFS 扫描/dev/disks/by-id/目录中的设备,如下所示:

sudo zpool import -f -d /dev/disk/by-id/ pool

但这当然要求所有设备都正确存在于 Ubuntu 中,可以使用 进行检查ls -la /dev/disk/by-id

相关内容