You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 22.04桌面版安装时RAID 6阵列加密配置疑问

Ubuntu 22.04桌面版安装时RAID 6阵列加密配置疑问

Hey there! Let me walk you through exactly when and how to encrypt your RAID 6 array during a fresh Ubuntu 22.04 Desktop installation—since the default installer doesn’t make this super obvious, we’ll need to take a quick detour into the live environment first:

Step-by-Step Breakdown

  • Start by choosing "Try Ubuntu" instead of "Install Ubuntu" when you boot from the installation media. The desktop installer’s built-in tools don’t support creating encrypted RAID directly, so we’ll set up the RAID and encryption manually first.
  • Open a terminal (press Ctrl+Alt+T), then install the required tools with this command:
    sudo apt update && sudo apt install mdadm cryptsetup
    
  • Run lsblk to list all your drives and confirm the device names for the disks you want to use in the RAID 6 (e.g., /dev/sdb, /dev/sdc, /dev/sdd—double-check you don’t pick your SSDs for root/boot!).
  • Create the RAID 6 array. Replace X with the number of disks you’re using (minimum 3) and the /dev/sd* entries with your actual disk names:
    sudo mdadm --create /dev/md0 --level=6 --raid-devices=X /dev/sdb /dev/sdc /dev/sdd
    
  • Now encrypt the RAID array. You’ll be prompted to set a strong password—don’t lose this, as it’s the only way to recover your data later:
    sudo cryptsetup luksFormat /dev/md0
    
  • Unlock the encrypted RAID device (we’ll use encrypted_raid as an alias here, but you can name it anything):
    sudo cryptsetup luksOpen /dev/md0 encrypted_raid
    
  • Format the unlocked encrypted device with a filesystem like ext4:
    sudo mkfs.ext4 /dev/mapper/encrypted_raid
    
  • Launch the Ubuntu installer from the live desktop. When you get to the partitioning step, select "Something else" (manual partitioning).
  • Set up your two SSDs for /boot and / (root) as you planned. Then locate /dev/mapper/encrypted_raid and assign it a mount point (like /data, or whatever makes sense for your use case).
  • Finish the installation as normal. The installer will automatically add the necessary entries to /etc/fstab and /etc/crypttab, so after rebooting you’ll just need to enter your encryption password to unlock the RAID 6 array.

Quick Notes

  • Double-check your disk names before running any commands—you don’t want to accidentally wipe your SSDs!
  • Store your encryption password somewhere safe. If you lose it, there’s no way to retrieve the data on the RAID array.
  • If you want automatic unlocking (not recommended for desktop setups, since it reduces security), you can set up a key file, but manual password entry is the safer default.

备注:内容来源于stack exchange,提问作者hank744

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 10:29:34