How do I mirror a ZFS disk?

How do I mirror a ZFS disk?

To create a mirrored storage pool, you use the zpool create command followed by the pool name, the mirror keyword, and the storage devices that will compose the mirror. Multiple mirrors can be specified by repeating the mirror keyword on the command line.

How do you replace a failed disk in a ZFS mirror?

The following are the basic steps for replacing a disk:

  1. Offline the disk, if necessary, with the zpool offline command.
  2. Remove the disk to be replaced.
  3. Insert the replacement disk.
  4. Run the zpool replace command. For example: # zpool replace tank c1t1d0.
  5. Bring the disk online with the zpool online command.

What is ZFS mirror?

ZFS allows you to integrate many disks into a “zpool” for storage. There are many different configurations one could setup, but I’ll just focus on a simple ZFS mirror, where I have two disks, each of which will contain the same data, hence the name ‘mirror’.

How do I mirror a root drive in Solaris 11?

How to Create a Mirrored Root Pool (Post Installation)

  1. Display your current root pool status.
  2. Attach a second disk to configure a mirrored root pool.
  3. View the root pool status to confirm that resilvering is complete.
  4. Apply boot blocks to the second disk after resilvering is complete.

How do I create a new ZFS pools and file system?

How to Create ZFS File Systems

  1. Become root or assume an equivalent role with the appropriate ZFS rights profile.
  2. Create the desired hierarchy.
  3. Set the inherited properties.
  4. Create the individual file systems.
  5. Set the file system-specific properties.
  6. View the results.

Can you expand a Vdev?

You can’t just add a single disk to the existing 3-disk RAIDZ vdev to create a 4-disk RAIDZ vdev because vdevs can’t be expanded. The impact of this limitation is that you have to buy all storage upfront even if you don’t need the space for years to come.

How do I remove a disk from ZFS pool?

To remove devices from a pool, use the zpool remove command. This command supports removing hot spares, cache, log, and top level virtual data devices. You can remove devices by referring to their identifiers, such as mirror-1 in Example 3, Adding Disks to a Mirrored ZFS Configuration.

How do you repair ZFS in pool?

Repair the failures, such as:

  1. Replace the faulted or missing device and bring it online.
  2. Restore the faulted configuration or corrupted data from a backup.
  3. Verify the recovery by using the zpool status -x command.
  4. Back up your restored configuration, if applicable.

How do I transfer data from one ZFS drive to another?

Quick answer: You need the zpool attach command. And you will see that a mirror has been created. Your data on the already existing drive will be keep, and will be replicated to the new one (Resilvered). As ZFS only copys the actual information this process will take more or less depending on the amount of Data.

What is hdd0 device in ZFS?

Where device is your previous vdev with data (the single hard drive with Data in the ZFS pool named ‘hdd0’). As I did you want to use the Id of the device and not the name, so you will use the identifier in /dev/disk/by-id/ and not sdb, sdc…

What happens to your data when you move to ZFS?

Your data on the already existing drive will be keep, and will be replicated to the new one (Resilvered). As ZFS only copys the actual information this process will take more or less depending on the amount of Data.