Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
59 votes
Accepted

How do I change the mount point for a ZFS pool?

zfs set mountpoint=/myspecialfolder mypool
Tim Fletcher's user avatar
50 votes
Accepted

What is the sense behind ZFS's limits?

What internally limits these things? Long answer ZFS's limits are based on fixed-size integers because that's the fastest way to do arithmetic in a computer. The alternative is called arbitrary-...
Warren Young's user avatar
  • 72.2k
34 votes
Accepted

How to move files from one zfs filesystem to a different zfs filesystem in the same pool?

Unfortunately, the answer is "No". There isn't a faster, or smarter way to do this. ZFS filesystems (even though they are on the same pool) are separate filesystems. Neither mv nor any ...
cas's user avatar
  • 78.9k
25 votes
Accepted

How to mount external ZFS file system without clobbering/altering current or external filesystem

Well, it really depends on how read-only you want the pool to be. And no, that's not a joke. First, a bit of terminology: in ZFS, you import a pool, and optionally mount the (any) file systems within ...
user's user avatar
  • 29.1k
20 votes

Create RAID-Z2 in degraded state possible?

Yes, it is possible by using fake file-backed disks for your redundant ones. Of course, not supported and you should have a backup, so simulate it first with small files on your old pool to see if ...
user121391's user avatar
  • 1,302
20 votes

Adding disks to ZFS pool

There are basically two ways of growing a ZFS pool. Add more vdevs This is what user1133275 is suggesting in their answer. It's done with zpool add (which has basically the same syntax as zpool ...
user's user avatar
  • 29.1k
18 votes
Accepted

With ZFS on Linux, how do I list device (vdev) specific properties?

In order to view the current value of a specific setting like ashift, you will need to use the zdb command instead of the zpool command. Running zdb on its own with no arguments will give you a view ...
Tim Kennedy's user avatar
  • 19.7k
16 votes
Accepted

Does ZFS deduplicates across datasets or only inside a single dataset?

ZFS deduplication is pool-wide. Identical blocks in all datasets that have dedup=on will be shared.
Matthew Ahrens's user avatar
15 votes

ZFS on Linux send/receive resume on poor/bad ssh connection

You can use the -s option of zfs receive which will save a resumable token on the receiving side if the transfer fails. It depends if you are using netcat (nc) or SSH. On the recv machine (netcat ...
Phil M.'s user avatar
  • 251
14 votes
Accepted

ZFS encrypted pool on Linux?

Encryption was added to ZFS On Linux with the release of version 0.8. So you need at least that version. In ZFS, encryption is on a per-dataset basis, not on a pool - but, as with most things in ZFS, ...
cas's user avatar
  • 78.9k
13 votes
Accepted

Restore ZFS Pool and storage data after a system re-install

If the disks are recognized from your OS the command: zpool import should be enough to get the pool imported and visible in your current OS. You can check the status with command zpool status You ...
Romeo Ninov's user avatar
  • 17.7k
12 votes
Accepted

How are files/dirs hidden from ls -a while still being accessible otherwise in a POSIX compliant system?

Well, how to do it is easy enough: ls gets its list from a syscall (or, on Linux, libc function) called readdir. Changing into a directory is done with a separate syscall, chdir. stat is also a ...
derobert's user avatar
  • 110k
12 votes

Adding disks to ZFS pool

In addition to the options in the excellent answer above, there will soon be another option. The OpenZFS project (ZFS on Linux, ZFS on FreeBSD) is working on a feature to allow the addition of new ...
Blieque's user avatar
  • 221
11 votes
Accepted

Install zfs on debian 9 stretch

The actual answer by @cas is good but have some corrections to be applied. So let's take a fresh installation of Debian 9 and assuming that the contrib non-free repositories are also not enabled. ...
user3450548's user avatar
  • 2,944
10 votes
Accepted

Command to list vdev device names for a ZFS pool for scripting?

zpool list -v -H -P -v verbose -P show full paths, not just the last component -H script mode - no headings, fields separated by tab character That will get you a lot closer.
frymaster's user avatar
  • 216
10 votes
Accepted

zpool list vs zfs list - why free space is 10x different?

Internally ZFS reserves a small amount of space (slop space) to ensure some critical ZFS operations can complete even in situations with very low free space. The amount is 3.2% of total pool ...
binarysta's user avatar
  • 3,082
9 votes
Accepted

ZFS replace disks by id

The zpool won't get destroyed if the names of the disks change. The pool will very likely not import automatically, but data should not be destroyed. Unless there is a script or mechanism which doing ...
Thomas's user avatar
  • 6,412
9 votes
Accepted

/etc/crypttab not updating in initramfs

I'm here because I ran into the same problem, found this question via Google, and have some information to add. I am attempting to auto-unlock a LUKS drive without having type a passphrase. First, I ...
8 votes

Forcing zpool to use /dev/disk/by-id in Ubuntu Xenial

I know this thread is sort of stale, but there is an answer. You need to update your cache file after you import. This example shows the default location for the cache file. $> sudo zpool export ...
Steve O's user avatar
  • 81
8 votes

Understanding the error reporting of ZFS (on Linux)

For a general overview, see Resolving Problems with ZFS, most interesting part: The second section of the configuration output displays error statistics. These errors are divided into three ...
user121391's user avatar
  • 1,302
8 votes

Encryption of existing dataset in ZFS (ZoL 0.8)

Yes, it is. See this simple example (tested on ZoL 0.8.3). If you would like to use a raw keyfile (rather than a passphrase): ( umask 777 dd if=/dev/urandom of=/path/to/keyfile bs=32 count=1 ) Create ...
kappa_t's user avatar
  • 81
7 votes
Accepted

How to replace a disk in a non-redundant ZFS pool?

Don't know if things were that different in `13 but 'zfs replace' works on non-redundant pools. You just run the 1 command instead of detaching first. d1 is 1G, d2 is 2G, both are empty files in /...
alaricljs's user avatar
  • 186
7 votes
Accepted

ZFS: send / receive with rolling snapshots

You can't do exactly what you want. Whenever you create a zfs send stream, that stream is created as the delta between two snapshots. (That's the only way to do it as ZFS is currently implemented.) ...
user's user avatar
  • 29.1k
7 votes
Accepted

How to remove device from pool

You can't. It's now in the pool as a single-drive vdev. vdevs can not be removed from a pool. That's the bad news. The worse news is that you've now effectively got a RAID-0 with your raidz2-0 ...
cas's user avatar
  • 78.9k
7 votes

What is maximum number of files you can store in a tar archive under Solaris 11?

This is not a limitation of tar. You are exceeding the maximum size of arguments that can be passed to a program. If the list of file names is available in a file, then you can use GNU tar's -T option:...
Johan Myréen's user avatar
7 votes
Accepted

Does ZFS scrub update compression and copies on existing data?

No. Changing dataset properties like compression and copies only affects files written after the change. To apply changes like this to existing files, you would need to copy them and mv them over ...
cas's user avatar
  • 78.9k
7 votes

How to stop people disturbing a ZFS dataset which is only used to receive?

You can indeed set your target dataset to be readonly (by setting the zfs property readonly=on directly on the target dataset or one of its parents). This will not hinder you from receiving newer ...
John Smith's user avatar
7 votes
Accepted

ZFS Mirror over one large disk and a RAID0 of two small disks

ZFS really doesn't support what you want to do. It's possible to wrestle it into doing what you want, but you're fighting the intended use all the way in doing so. It's worth keeping in mind that ZFS ...
user's user avatar
  • 29.1k
7 votes

zpool list vs zfs list - why free space is 10x different?

To add to binarysta's answer, you can tune the amount of reserved ("slop") space with the spa_slop_shift module option. The ZFS-on-Linux module documentation suggests that the default value of 5 can ...
Malvineous's user avatar
  • 6,923
7 votes
Accepted

Filesystem with checksums?

You could use either ZFS or btrfs. Both of them are copy-on-write filesystems with error detection (and correction too, if there's sufficient redundancy to repair the original data - e.g. mirror ...
cas's user avatar
  • 78.9k

Only top scored, non community-wiki answers of a minimum length are eligible