# Virtues of ZFS Disk vs Virtual Disk (Files)



## schafferm (May 26, 2013)

Hi *a*ll*,*

I don't have multiple drives that I can use as they are all being used in my NAS. Would it be wrong to create a virtual file on each disk as follows:


```
Device Disk 1 /mnt/File1 (250GB)
Device Disk 2 /mnt/File2 (250 GB)
DEvice Disk 3 /mnt/File3 (250 GB)
Device Disk 4 /mnt/File4 (250 GB)
```

This way the files are spread across multiple physical disks (so I'm not running all the disks on one drive that could crash. What if any risks might I expose myself to? My goal would be to copy files over to ZFS and then augment the files as I go. I recognize this is slower as it runs on TOP of UFS.


----------



## kpa (May 26, 2013)

ZFS with files as vdev components is not recommended for production use, see:

http://docs.oracle.com/cd/E19253-01/819-5461/gazcr/index.html


----------



## throAU (May 28, 2013)

What are you attempting to achieve? Learn about ZFS? Protect data? Chasing some particular benefit of ZFS? Bear in mind that ZFS needs to know when a transaction has completed so that it can update its intent log.

If your NAS lies to ZFS about writes being completed when they are actually still in the NAS's cache, and then you have an issue with the NAS, etc. - I'm guessing you could face issues with pool corruption (e.g., file representing disk 0 ACKs completion of a write when it hasn't actually hit the disk, and power is lost/NAS crashes after writing to disk 1 with more recent data).

Not exactly sure on the possible failure modes as I'm not a ZFS developer, but I certainly would not trust it.  At all.


----------

