在 m2 上使用 raid1 自动安装 Ubuntu 服务器 22.04 时出现问题

在 m2 上使用 raid1 自动安装 Ubuntu 服务器 22.04 时出现问题

我尝试使用自动安装过程安装 Ubuntu 服务器 22.04(甚至最新的每日版本 24.04),以获得可启动的 raid 1 配置,使用两个 2TB m2 磁盘。

当需要在 EFI 分区上安装 grub 时,进程不断崩溃。

我尝试了不同的配置来创建 raid,使用磁盘和分区作为设备,但都无济于事,无法使 raid 可启动。

所以你们的问题是:我如何设置我的存储以获得可启动的 raid 1 配置?我想有人已经积极解决了这个问题...

我正在使用的存储部分,经过我所有的尝试,如下:

#cloud-config
autoinstall:
  version: 1
storage:
    grub:
      reorder_uefi: false
    config:
    # Partition table of two disks
    # - { type: disk, ptable: gpt, path: /dev/nvme0n1, wipe: superblock, preserve: false, name: '', grub_device: true, id: disk-nvme0n1 }
    # - { type: disk, ptable: gpt, path: /dev/nvme1n1, wipe: superblock, preserve: false, name: '', grub_device: true, id: disk-nvme1n1 }
    - { type: disk, ptable: gpt, path: /dev/nvme0n1, wipe: superblock, preserve: false, name: '', id: disk-nvme0n1 }
    - { type: disk, ptable: gpt, path: /dev/nvme1n1, wipe: superblock, preserve: false, name: '', id: disk-nvme1n1 }
    - { type: partition, device: disk-nvme0n1, size: 1024MB, wipe: superblock, flag: 'boot',partition_type: EF00, preserve: false,  grub_device: true, id: part-grub }
    #- { type: partition, device: disk-nvme0n1, size: 32GB, wipe: superblock, flag: 'swap', preserve: false, id: part-swap }
    - { type: partition, device: disk-nvme0n1, size: 256GB, wipe: superblock, preserve: false,  id: part-home }
    - { type: partition, device: disk-nvme0n1, size: -1, wipe: superblock, preserve: false,  id: part-data }
    #
    - { type: partition, device: disk-nvme1n1, size: 1024MB, wipe: superblock, preserve: false,  grub_device: false, id: part2-grub }
    #- { type: partition, device: disk-nvme1n1, size: 32GB, wipe: superblock, flag: 'swap', preserve: false, id: part2-swap }
    - { type: partition, device: disk-nvme1n1, size: 256GB, wipe: superblock, preserve: false,  id: part2-home }
    - { type: partition, device: disk-nvme1n1, size: -1, wipe: superblock, preserve: false,  id: part2-data }
    #
    #- { type: raid, name: md0, raidlevel: 1, devices: [ part-grub, part2-grub ], spare_devices: [], preserve: false, wipe: superblock-recursive, ptable: gpt, id: disk-raid-grub }
    #- { type: raid, name: md1, raidlevel: 1, devices: [ part-swap, part2-swap ], spare_devices: [], preserve: false, wipe: superblock-recursive, ptable: gpt, id: disk-raid-swap }
    - { type: raid, name: md2, raidlevel: 1, devices: [ part-home, part2-home ], spare_devices: [], preserve: false, wipe: superblock-recursive, ptable: gpt, id: disk-raid-home }
    - { type: raid, name: md3, raidlevel: 1, devices: [ part-data, part2-data ], spare_devices: [], preserve: false, wipe: superblock-recursive, ptable: gpt, id: disk-raid-data }
    #- { type: raid, name: md0, raidlevel: 1, devices: [ disk-nvme0n1, disk-nvme1n1 ], spare_devices: [], preserve: false, wipe: superblock-recursive, ptable: gpt, id: disk-raid }
    #- { type: partition, device: disk-raid, flag: bios_grub, id: part-grub, number: 1, preserve: false,  size: 1MB }
    # - { type: partition, device: disk-raid, size: 1024MB, wipe: superblock, flag: 'bios_grub', preserve: false,  grub_device: true, id: part-grub }
    #- { type: partition, device: disk-raid, size: 1024MB, wipe: superblock, flag: 'boot',partition_type: EF00, preserve: false,  grub_device: true, id: part-grub }
    #- { type: partition, device: disk-raid, size: 32GB, wipe: superblock, flag: 'swap', preserve: false, id: part-swap }
    #- { type: partition, device: disk-raid, size: 256GB, wipe: superblock, preserve: false,  id: part-home }
    #- { type: partition, device: disk-raid, size: -1, wipe: superblock, preserve: false,  id: part-data }
    #- { type: partition, device: disk-raid-grub, size: 1024MB, wipe: superblock, flag: 'boot',partition_type: EF00, preserve: false,  grub_device: true, id: part-raid-grub }
    #- { type: partition, device: disk-raid-grub, size: 1024MB, wipe: superblock, flag: 'boot', preserve: false,  grub_device: true, id: part-raid-grub }
    #- { type: partition, device: disk-raid-swap, size: 32GB, wipe: superblock, flag: 'swap', preserve: false, id: part-raid-swap }
    - { type: partition, device: disk-raid-home, size: 256GB, wipe: superblock, preserve: false,  id: part-raid-home }
    - { type: partition, device: disk-raid-data, size: -1, wipe: superblock, preserve: false,  id: part-raid-data }
    #
    - { type: format, volume: part-grub, fstype: fat32, preserve: false, id: format-grub }
    # { type: format, volume: part2-grub, fstype: fat32, preserve: false, id: format2-grub }
    #- { type: format, volume: part-raid-swap, fstype: swap, preserve: false, id: format-swap }
    - { type: format, volume: part-raid-home, fstype: btrfs, preserve: false, id: format-home }
    - { type: format, volume: part-raid-data, fstype: btrfs, preserve: false, id: format-data }
    - { type: mount, path: '/boot/efi', device: format-grub, id: mount-grub }
    #- { type: mount, path: '/boot/efi', device: format2-grub, id: mount2-grub }
    #- { type: mount, path: '', device: format-swap, id: mount-swap }
    - { type: mount, path: '/', device: format-home, id: mount-home }
    - { type: mount, path: '/data', device: format-data, id: mount-data }

    # - { type: raid, name: md1, raidlevel: 1, devices: [ part-swap, part2-swap ], spare_devices: [], preserve: false, wipe: superblock, ptable: gpt, id: raid-swap }
    # - { type: partition, device: raid-swap, size: 32GB, wipe: superblock, flag: 'swap', number: 2, preserve: false, id: part-raid-swap }
    # - { type: format, volume: part-raid-swap, fstype: swap, preserve:false, id:format-swap }
    # - { ptable: gpt, path: /dev/nvme1n1, wipe: superblock-recursive, preserve: false, name: '', grub_device: true, type: disk, id: disk-nvme1n1 }
    # - { device: disk-nvme1n1, flag: bios_grub, id: partition-1, number: 1, preserve: false, size: 1048576, type: partition }
    # - { device: disk-nvme1n1, size: 1024M, wipe: superblock, flag: boot, number: 2, preserve: false, grub_device: true, type: partition, id: partition-3 }
    # - { device: disk-nvme1n1, size: 32G, wipe: superblock, flag: '', number: 3, preserve: false, grub_device: false, type: partition, id: partition-5 }
    # - { device: disk-nvme1n1, size: 256G, wipe: superblock, flag: '', number: 4, preserve: false, grub_device: false, type: partition, id: partition-7 }
    #- { name: md0, raidlevel: raid1, devices: [ partition-2, partition-3 ], spare_devices: [], preserve: false, wipe: superblock, ptable: gpt, type: raid, id: raid-0 }
    #- { device: raid-0, size: 1024M, wipe: superblock, flag: 'boot', number: 1, preserve: false, grub_device: true, type: partition, id: partition-8 }
    #- { fstype: fat32, volume: partition-8, preserve: false, type: format, id: format-3 }
    
    # - { name: md1, raidlevel: raid1, devices: [ partition-4, partition-5 ], spare_devices: [], preserve: false, wipe: superblock, ptable: gpt, type: raid, id: raid-1 }
    # - { device: raid-1, size: 32G, wipe: superblock, flag: swap, number: 2, preserve: false, grub_device: false, type: format, id: partition-9}
    # - { fstype: swap, volume: partition-9, preserve: false, type: format, id: format-4 }
    # - { type: mount, path: '', device: format-4, id: mount-3 }
    # - { name: md2, raidlevel: raid1, devices: [ partition-6, partition-7 ], spare_devices: [], preserve: false, wipe: superblock, ptable: gpt, type: raid, id: raid-2 }
    # - { device: raid-2, size: 256G, wipe: superblock, flag: '', number: 3, preserve: false, grub_device: false, type: partition, id: partition-10 }
    # - { fstype: btrfs, volume: partition-10, preserve: false, type: format, id: format-5 }
    # - { path: /, device: format-5, type: mount, id: mount-4 }

相关内容