I want to change the recordsize property on an existing ZFS dataset.

The man page states:

Changing the file system's recordsize affects only files created afterward; existing files are unaffected.

So simply changing the recordsize property will only have an effect on newly created files. I want existing files to take advantage of the new recordsize as well.

Will a zfs sendand zfs receive of the dataset convert the existing files to to new recordsize or will I have to copy the files off of the dataset manually and then back?


You need to copy the data off and back onto the filesystem if you want to take advantage of the new record size.

I'm not sure what your question is, though.

  • I've updated the question to clarify, I wanted to know if copying the dataset using zfs send and zfs receive would let me take advantage of the new recordsize for existing files in the dataset. – Mikolan Apr 19 '17 at 12:08
  • The existing files need to go away, otherwise the record size change won't apply. – ewwhite Apr 19 '17 at 12:15
  • cp -p filename filename.new; mv filename.new filename won't work, assuming there's enough space? – Andrew Henle Apr 19 '17 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.