One thing to note: the '-o ashift' option is a per-drive (vdev) attribute according to the manual. So, when replacing a vdev, be sure to specify this option again if you do not use the default: zpool replace -o ashift=12 old new.
3-Way Disk Mirrors with ZFS on Linux
11–15 of 15 posts
Re: 3-Way Disk Mirrors with ZFS on Linux
#12Re: 3-Way Disk Mirrors with ZFS on Linux
#13Earlier quoted context omitted.
Author here, thanks for the heads up. It doesn't look like mkfile is included with the Jessie base system I was using to test. For those wishing to use this method it looks like the xfsprogs package contains xfs_mkfile which operates the same as parent's example.
mkfile is standard on Solaris. On Debain use fallocate: $ fallocate -l 128MB /home/user/disk1
Re: 3-Way Disk Mirrors with ZFS on Linux
#14One thing to note: the '-o ashift' option is a per-drive (vdev) attribute according to the manual. So, when replacing a vdev, be sure to specify this option again if you do not use the default: zpool replace -o ashift=12 old new.
vfs.zfs.min_auto_ashift=12
in /etc/sysctl.conf to handle this automatically.Re: 3-Way Disk Mirrors with ZFS on Linux
#15Earlier quoted context omitted.
mkfile is standard on Solaris. On Debain use fallocate: $ fallocate -l 128MB /home/user/disk1
Is there an advantage of using fallocate over say, dd to pipe random or zeroes to a file?
From the fallocate man page:
> For filesystems which support the fallocate system call, preallocation is done quickly by allocating blocks and marking them as uninitialized, requiring no IO to the data blocks. This is much faster than creating a file by filling it with zeros.