Questions tagged [zfs]

ZFS is a modern file system and volume manager originally developed by Sun Microsystems and licensed under the CDDL. It is a copy-on-write file system with support for large storage arrays, protection against corruption, snapshots, clones, compression, deduplication and NFSv4 ACLs.

An open-source fork of ZFS can be found at http://open-zfs.org/ , which is supported by ZFSonlinux.org, illumos.org and ZFS developers in the FreeBSD & Mac OS X communities.

ZFS is supported out of the box on a number of operating systems:

  • Solaris 10
  • Oracle Solaris 11 Express
  • FreeBSD
  • NexentaStor
  • illumos - specifically, illumos-based distributions, like:
    • Nexenta's illumian
    • Joyent's SmartOS (server OS with strong focus on virtualization)
    • OmniTI's OmniOS (general purpose server OS)
    • OpenIndiana (general purpose desktop/server OS)

Due to license incompatibilities, the CDDL licensed ZFS code cannot be distributed as part of the GPL licensed Linux kernel. Other alternatives methods are available for running ZFS on Linux:

1419 questions
46
votes
11 answers

How to delete all but last [n] ZFS snapshots?

I'm currently snapshotting my ZFS-based NAS nightly and weekly, a process that has saved my ass a few times. However, while the creation of the snapshot is automatic (from cron), the deletion of old snapshots is still a manual task. Obviously…
growse
  • 8,060
42
votes
2 answers

Why are all the zpools named "tank"?

In practically every example of ZFS usage that I've seen online (including several questions here), the zpool is named "tank". Why? Is there some sort of significance to the name or is it just that the original documentation used "tank" so that's…
asciiphil
  • 3,146
19
votes
2 answers

What does a permanent ZFS error indicate?

Several permanent errors were reported on my zpool today. pool: seagate3tb state: ONLINE status: One or more devices has experienced an error resulting in data corruption. Applications may be affected. action: Restore the file in…
18
votes
3 answers

Increase the ZFS partition to use the entire disk

I have a ZFS pool that currently occupies 100Gb. I increased the disk size to 150Gb, but I can't seem to get the ZFS use the entire disk. I have a the same exact issue yesterday with another server, and there a certain mixture of zpool set…
justadev
  • 463
18
votes
2 answers

ZFS: re-compress existing files after change in compression algorithm

I have a pool that was created in 2011, using lzjb compression, and it wasn't until a couple of years later that an upgrade allowed me to set the compression to lz4. I estimate that at least 20% of the content (by space) on the array was created…
rowan194
  • 181
13
votes
4 answers

ZFS: Is there a way to find out where the blocks for a file are stored?

Is there a way in zfs to find out where blocks for a particular file are stored? I'd like to be able to ask for the locations of all the blocks for a file, including ditto blocks. (Yes, I understand that this is low-level stuff not normally exposed…
13
votes
4 answers

ZFS: Removing files from snapshots?

Say I have a dataset with 100 snapshots and want to rm -rf all folders named "cache" in all snapshots. I want to actually free up the space, not just hide it away in layers of snapshots, so making a clone and removing from that and then taking a new…
12
votes
3 answers

ZFS: How do you restore the correct number of copies after losing a drive?

With zfs, if you have copies=2 and then you lose a drive containing some of those copies, how do you tell the system that it should make a new copy of the data blocks for the affected files? Or does zfs just start adding data blocks for the extra…
9
votes
1 answer

ZFS delete snapshots with interdependencies and clones

Below is my list of ZFS volumes and snapshots, as well as the origin and clone for each. I want to delete all the snapshots, but keep all the filesystems. How can I do this? I have tried zfs promote followed by attempting to delete each filesystem…
9
votes
4 answers

zfs: scrub vs resilver (are they equivalent?)

Is a resilver as good as a scrub? If not, why? Use case: during a scrub checksum errors come up. Instead of continuing with the scrub, stop it, replace drive and resilver. Did the resilver do some/all of the checking that a scrub would have done?
8
votes
2 answers

Split a ZFS clone?

Is it possible to split a zfs clone to allow the original snapshot to be destroyed? # zfs create zpool1/test1 # zfs snapshot zpool1/test1@snap1 # zfs clone zpool1/test1@snap1 zpool1/test1clone # zfs destroy zpool1/test1@snap1 cannot destroy…
8
votes
2 answers

ZFS - Can one mirrored pair be a different size than another pair?

If I have a mirrored pair of 250GB drives in a pool, and I later buy two more drives and add another mirrored pair to the same pool, can that second mirrored pair be 500gb? Such that my total usable space would be 750GB? Or do all the mirrored…
AaronLS
  • 975
6
votes
1 answer

Is `zfs destroy fs@snapshot`, a blocking 'stop the world' operation?

Or can reads, and preferably writes, that are outside the snapshot (basically everything) still progress?
6
votes
2 answers

Fix ZFS DEGRADED pool that had hot spare

I have a pool of 8-mirrored drives and one hot spare. One of the drives in a mirrored set failed, but I can't tell if the hot-spare was automatically added or not. The status of the spare is "IN USE", and the scan says it resilvered 1.7T. The…
John P
  • 1,689
6
votes
1 answer

ZFS Performance 80% rule

Does the 80% capacity rule of thumb for ZFS pools apply regardless of the size of the pool? If I have a pool of 10TB, that means I have to keep 2TB free. Fair enough, the loss isn't too great. But in a 50TB pool, that means I need to keep 10TB free.…
dmuir
  • 311
1
2 3 4 5 6