将 /home 移动到镜像根分区

将 /home 移动到镜像根分区

我在构建新系统时把分区搞砸了。

我已经在 msi 主板上配置了硬件镜像,因此在安装时我假设操作系统会看到单个驱动器。

相反,操作系统(ubuntu 20.04)看到两个独立的驱动器,并在一个驱动器上创建了 /root,在另一个驱动器上创建了 /home。

我现在希望将其恢复为单个驱动器,最好是在镜像阵列上(无需重建系统)。

这有可能吗?使用软件 raid 是一个可以接受的答案。

df -Th显示:

df -Th
Filesystem                                       Type      Size  Used Avail Use% Mounted on
udev                                             devtmpfs   16G     0   16G   0% /dev
tmpfs                                            tmpfs     3.2G  2.3M  3.2G   1% /run
rpool/ROOT/ubuntu_c520d1                         zfs       314G  4.3G  310G   2% /
tmpfs                                            tmpfs      16G  541M   16G   4% /dev/shm
tmpfs                                            tmpfs     5.0M  4.0K  5.0M   1% /run/lock
tmpfs                                            tmpfs      16G     0   16G   0% /sys/fs/cgroup
rpool/USERDATA/root_b4334o                       zfs       310G   27M  310G   1% /root
rpool/USERDATA/bsutton_b4334o                    zfs       394G   84G  310G  22% /home/bsutton
bpool/BOOT/ubuntu_c520d1                         zfs       1.7G  180M  1.5G  11% /boot
rpool/ROOT/ubuntu_c520d1/var/games               zfs       310G  128K  310G   1% /var/games
rpool/ROOT/ubuntu_c520d1/srv                     zfs       310G  128K  310G   1% /srv
rpool/ROOT/ubuntu_c520d1/var/mail                zfs       310G  128K  310G   1% /var/mail
rpool/ROOT/ubuntu_c520d1/usr/local               zfs       310G  128K  310G   1% /usr/local
rpool/ROOT/ubuntu_c520d1/var/lib                 zfs       312G  2.4G  310G   1% /var/lib
rpool/ROOT/ubuntu_c520d1/var/log                 zfs       310G   71M  310G   1% /var/log
rpool/ROOT/ubuntu_c520d1/var/snap                zfs       310G  256K  310G   1% /var/snap
/dev/nvme0n1p1                                   vfat      511M   16M  496M   4% /boot/efi
rpool/ROOT/ubuntu_c520d1/var/spool               zfs       310G  128K  310G   1% /var/spool
rpool/ROOT/ubuntu_c520d1/var/www                 zfs       310G  128K  310G   1% /var/www
rpool/ROOT/ubuntu_c520d1/var/lib/apt             zfs       310G   66M  310G   1% /var/lib/apt
rpool/ROOT/ubuntu_c520d1/var/lib/NetworkManager  zfs       310G  256K  310G   1% /var/lib/NetworkManager
rpool/ROOT/ubuntu_c520d1/var/lib/AccountsService zfs       310G  128K  310G   1% /var/lib/AccountsService
rpool/ROOT/ubuntu_c520d1/var/lib/dpkg            zfs       310G   38M  310G   1% /var/lib/dpkg
/dev/loop1                                       squashfs   98M   98M     0 100% /snap/core/9289
/dev/loop2                                       squashfs  145M  145M     0 100% /snap/code/34
/dev/loop3                                       squashfs   97M   97M     0 100% /snap/core/9436
/dev/loop4                                       squashfs   55M   55M     0 100% /snap/core18/1754
/dev/loop0                                       squashfs  145M  145M     0 100% /snap/code/35
/dev/loop6                                       squashfs   55M   55M     0 100% /snap/core18/1705
/dev/loop5                                       squashfs   43M   43M     0 100% /snap/leafpad/73
/dev/loop7                                       squashfs   50M   50M     0 100% /snap/snap-store/467
/dev/loop8                                       squashfs  256K  256K     0 100% /snap/gtk2-common-themes/13
/dev/loop10                                      squashfs   36M   36M     0 100% /snap/remmina/4222
/dev/loop9                                       squashfs  256M  256M     0 100% /snap/gnome-3-34-1804/36
/dev/loop11                                      squashfs   44M   44M     0 100% /snap/snap-store/415
/dev/loop12                                      squashfs   30M   30M     0 100% /snap/snapd/8140
/dev/loop13                                      squashfs  176M  176M     0 100% /snap/gimp/273
/dev/loop14                                      squashfs  8.7M  8.7M     0 100% /snap/nmap/1356
/dev/loop15                                      squashfs  177M  177M     0 100% /snap/gimp/281
/dev/loop16                                      squashfs  241M  241M     0 100% /snap/gnome-3-34-1804/24
/dev/loop17                                      squashfs  256K  256K     0 100% /snap/gtk2-common-themes/9
/dev/loop18                                      squashfs  162M  162M     0 100% /snap/gnome-3-28-1804/128
/dev/loop19                                      squashfs   63M   63M     0 100% /snap/gtk-common-themes/1506
/dev/loop20                                      squashfs   28M   28M     0 100% /snap/snapd/7264
tmpfs                                            tmpfs     3.2G   52K  3.2G   1% /run/user/1000

相关内容