Solved how to rebuild zfs/zpool after reinstall os ?

How to rebuild a zpool after reinstall the freebsd ?


I know there is a command
Code:
zpool export import

But I mean :
if the os disk *dead* , Then I must drop it and replace a new one and reinstall new os on it , So how to rebuild zpool and zfs on that worst situation?
 
Don't understand. Please give more details.

Is the zpool on the same disk as the OS? Is the disk with the zpool still OK and available? If the OS disk and the zpool share the same disk (or you are using root-on-ZFS), how did you install?

As an example: My server has a small SSD for the root file system, and two spinning disks for a (mirrored) ZFS pool for the home directories, and a few smaller things. I reinstalled the OS by creating a new root disk (on a new SSD), then physically replaced the old SSD with the new SSD, and my zpool simply worked after doing a "zpool import"; I had already done "zpool export" before shutting the old version down.
 
Don't understand. Please give more details.

Is the zpool on the same disk as the OS? Is the disk with the zpool still OK and available? If the OS disk and the zpool share the same disk (or you are using root-on-ZFS), how did you install?

As an example: My server has a small SSD for the root file system, and two spinning disks for a (mirrored) ZFS pool for the home directories, and a few smaller things. I reinstalled the OS by creating a new root disk (on a new SSD), then physically replaced the old SSD with the new SSD, and my zpool simply worked after doing a "zpool import"; I had already done "zpool export" before shutting the old version down.

I tryed that , its working , and even i didnt export zpool,zpool will find the old pool by import
 
Back
Top