There are many tutorials on ZFS but I couldn't find a single one which covers the changes in commands when one uses only a single drive. I know by now that the parameter copies=2
is used but what changes in the other commands and how do the workflow commands looks like when I want to sync my data to the ZFS drive?
I understand that when the singe drive breaks (not only one block, since this could still be repaired because the data is twice there) but the whole drive), all data is lost, even if the data is twice there (copies=2), but this way ZFS's features still work so I want to try it. I also understand that the capacity of the drive is of course halved because of copies=2
.
At the moment I use ext4 and want change to use ZFS, what do the commands look like? Do I need like delete the data in a special way, or at all, first?
Also as I understand it, no rsync
is needed and ZFS provides its own tools?
-- edit --
Ok, it looks like this works, just tested it:
- Find/view drive:
# fdisk -l
or$ mount
Create pool:
# zpool create -f YOURPOOLNAME /dev/sdX
Create filesystem and set features:
# zfs create YOURPOOLNAME/YOURNAME # zfs set compression=off YOURPOOLNAME/YOURNAME # zfs set copies=2 YOURPOOLNAME/YOURNAME
(to turn compression on: .. compression=gzip ..
)
- Use filesystem. It should be located in /YOURPOOLNAME/YOURNAME when mounted (when you excuted these commands, it should already be mounted there).
4.1 The typical tools like rsync
can be used on it.