User Tools

Site Tools


zfs:add_a_mirror_to_an_existing_zfs_drive

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
zfs:add_a_mirror_to_an_existing_zfs_drive [2020/06/15 21:52] peterzfs:add_a_mirror_to_an_existing_zfs_drive [2021/10/13 22:27] (current) – removed peter
Line 1: Line 1:
-====== ZFS - Add a Mirror to an Existing ZFS Drive ====== 
- 
-Convert the most basic ZFS pool, a system with a single disk, to a Mirror or Stripe. 
- 
-Current Setup: 
- 
-  * We have a single disk attached to our system, **/dev/da1** 
-  * This disk is used as a simple zfs pool, **tank** 
-  * You bought another disk and want to mirror the pool to the new disk, **/dev/da2** 
- 
----- 
- 
-===== Ensure the disk names are correct ===== 
- 
-Make sure you’ve got the disk names correct. 
- 
-Use **dmesg** to see the system messages, to determine which disk is which. 
- 
-<WRAP alert> 
-**ALERT:**  This can be dangerous if you use the wrong disk, as it will destroy all data on the selected disk. 
-</WRAP> 
- 
- 
----- 
- 
-===== Prepare Your Drive ===== 
- 
-Delete any existing partitions if needed. 
- 
-<code bash> 
-sudo gpart destroy -F /dev/da2 
-</code> 
- 
-Format the drive as gpt: 
- 
-<code bash> 
-sudo gpart create -s gpt /dev/da2 
-</code> 
- 
-Create a zfs partition: 
- 
-<code bash> 
-sudo gpart add -t freebsd-zfs /dev/da2 
-</code> 
- 
-This new partition is **/dev/da2p1**, and will nbe added to the existing partition next. 
- 
- 
  
zfs/add_a_mirror_to_an_existing_zfs_drive.1592257965.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki