63
votes
Accepted
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-...
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 ...
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 ...
20
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 ...
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 ...
17
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.
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 ...
14
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 ...
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, ...
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 ...
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 ...
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.
...
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.
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 ...
10
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 ...
Community wiki
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 ...
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 ...
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 ...
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 ...
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 /...
7
votes
Accepted
Explain ZFS system output
1: refcnt means reference count, i.e. the number of times blocks are referenced by objects (It is a power of two progression so 1 is 1 but 2 actually means 2 or 31; 4 means 4,5,6, or 7 and so on)
2: ...
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:...
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 ...
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 ...
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 ...
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 ...
7
votes
Accepted
How to increase swap space on Ubuntu 20.04 ZFS?
This from the ArchWiki https://wiki.archlinux.org/index.php/ZFS#Swap_volume:
What do 'getconf PAGESIZE', ie the memory system's preferred memory page size ?
create a zfs volume for swap
prepare as ...
7
votes
ZFS send/recv full snapshot
First you'll need to create an empty pool on Server A. zfs recv cannot create a new pool. So on Server A:
zpool create -R /mnt zfs49 [ mirror diskID1 diskID2 ]
... or some other VDEV structure of ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
zfs × 606linux × 91
freebsd × 73
solaris × 63
filesystems × 54
ubuntu × 50
debian × 34
raid × 29
snapshot × 27
mount × 21
nfs × 19
storage × 19
boot × 16
hard-disk × 16
encryption × 16
disk × 15
btrfs × 15
arch-linux × 14
backup × 14
freenas × 13
centos × 12
permissions × 10
rsync × 10
lvm × 10
luks × 10