我最近将Ubuntu 16.04上的镜像mdadm分区转换为zfs镜像池,所以我想。 在使用zfs池几天后,我重新启动了系统,zfs池消失了。 “zpool list”没有列出丢失的zpool。 它只列出了我有的另一个zpool。
我的问题是:
- 我可以恢复丢失的ZFS池吗?
- 如何从mdadm中完全删除分区,所以这不会再发生?
/ proc / mdstat使用我用于zfs池的分区显示一个新的md设备:
md127 : inactive sdb3[1] sda3[0] 2047737856 blocks super 1.2
在尝试将此设备转换为ZFS之前,它显示在/ proc / mdstat中,如下所示:
md3 : active raid1 sdb3[1] sda3[0] 1023868928 blocks super 1.2 [2/2] [UU] bitmap: 0/8 pages [0KB], 65536KB chunk
为了把分区转换成ZFS,我做了:
- 注释掉/etc/mdadm/mdadm.conf中的条目
- 使用mdadm命令停止RAID分区(我没有记下我使用的确切命令)。
/etc/mdadm/mdadm.conf包含:
# mdadm.conf # # Please refer to mdadm.conf(5) for information about this file. # # by default (built-in), scan all partitions (/proc/partitions) and all # containers for MD superblocks. alternatively, specify devices to scan, using # wildcards if desired. #DEVICE partitions containers # auto-create devices with Debian standard permissions CREATE owner=root group=disk mode=0660 auto=yes # automatically tag new arrays as belonging to the local system HOMEHOST <system> # instruct the monitoring daemon where to send mail alerts MAILADDR root@localhost # definitions of existing MD arrays ARRAY /dev/md2 UUID=345b919e:df7ab6fa:a4d2adc2:26fd5302 #ARRAY /dev/md/3 metadata=1.2 UUID=a276579e:ac9ae714:8e35cebf:75ca9fad name=...
摆脱mdadm元数据。
mdadm --zero-superblock /dev/sdb3 mdadm --stop /dev/md3