ZFS *file* backed zpool for snapshots… safe in production?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












2















Are there any disadvantages of single file vdev zpool other than absence of fault tolerance which make it dangerous or impractical for production use?



e.g performance or stability concerns?



The man page only warns of absence of fault tolerance:



 file A regular file. The use of files as a backing store is strongly
discouraged. It is designed primarily for experimental purposes,
as the fault tolerance of a file is only as good as the file sys‐
tem of which it is a part. A file must be specified by a full
path.


My use case is for snapshoting a database on a Linux server before syncing it to an offsite backup-server which uses a real disk backed mirrored zpool. The only purpose of using ZFS on the database server is to gain fast atomic snapshots which vastly reduce the time the database has to remain locked.



My aim is to keep the setup for the database server as automated as possible. This is intended to be set up on top of standard VPS images, where re-partitioning the main volume cannot be easily automated, and adding extra block devices is wasteful in this case.



Alternatively is there a better way to allocate a portion of the underlying ext4 partition to a zpool without partitioning it or in a way which can be automated without the need to delve into a VPS manager?










share|improve this question
























  • Here are two possible better ways to do this: use LVM under ext4 to do the snapshottting (although LVM snapshots have a performance overhead for writes until you delete them, and I don’t know of a way to efficiently send just the changed data from and LVM snapshot like ZFS can do); or, better yet, just use ZFS for the whole server instead of just for the database files.

    – Dan
    Jan 5 at 18:42















2















Are there any disadvantages of single file vdev zpool other than absence of fault tolerance which make it dangerous or impractical for production use?



e.g performance or stability concerns?



The man page only warns of absence of fault tolerance:



 file A regular file. The use of files as a backing store is strongly
discouraged. It is designed primarily for experimental purposes,
as the fault tolerance of a file is only as good as the file sys‐
tem of which it is a part. A file must be specified by a full
path.


My use case is for snapshoting a database on a Linux server before syncing it to an offsite backup-server which uses a real disk backed mirrored zpool. The only purpose of using ZFS on the database server is to gain fast atomic snapshots which vastly reduce the time the database has to remain locked.



My aim is to keep the setup for the database server as automated as possible. This is intended to be set up on top of standard VPS images, where re-partitioning the main volume cannot be easily automated, and adding extra block devices is wasteful in this case.



Alternatively is there a better way to allocate a portion of the underlying ext4 partition to a zpool without partitioning it or in a way which can be automated without the need to delve into a VPS manager?










share|improve this question
























  • Here are two possible better ways to do this: use LVM under ext4 to do the snapshottting (although LVM snapshots have a performance overhead for writes until you delete them, and I don’t know of a way to efficiently send just the changed data from and LVM snapshot like ZFS can do); or, better yet, just use ZFS for the whole server instead of just for the database files.

    – Dan
    Jan 5 at 18:42













2












2








2








Are there any disadvantages of single file vdev zpool other than absence of fault tolerance which make it dangerous or impractical for production use?



e.g performance or stability concerns?



The man page only warns of absence of fault tolerance:



 file A regular file. The use of files as a backing store is strongly
discouraged. It is designed primarily for experimental purposes,
as the fault tolerance of a file is only as good as the file sys‐
tem of which it is a part. A file must be specified by a full
path.


My use case is for snapshoting a database on a Linux server before syncing it to an offsite backup-server which uses a real disk backed mirrored zpool. The only purpose of using ZFS on the database server is to gain fast atomic snapshots which vastly reduce the time the database has to remain locked.



My aim is to keep the setup for the database server as automated as possible. This is intended to be set up on top of standard VPS images, where re-partitioning the main volume cannot be easily automated, and adding extra block devices is wasteful in this case.



Alternatively is there a better way to allocate a portion of the underlying ext4 partition to a zpool without partitioning it or in a way which can be automated without the need to delve into a VPS manager?










share|improve this question
















Are there any disadvantages of single file vdev zpool other than absence of fault tolerance which make it dangerous or impractical for production use?



e.g performance or stability concerns?



The man page only warns of absence of fault tolerance:



 file A regular file. The use of files as a backing store is strongly
discouraged. It is designed primarily for experimental purposes,
as the fault tolerance of a file is only as good as the file sys‐
tem of which it is a part. A file must be specified by a full
path.


My use case is for snapshoting a database on a Linux server before syncing it to an offsite backup-server which uses a real disk backed mirrored zpool. The only purpose of using ZFS on the database server is to gain fast atomic snapshots which vastly reduce the time the database has to remain locked.



My aim is to keep the setup for the database server as automated as possible. This is intended to be set up on top of standard VPS images, where re-partitioning the main volume cannot be easily automated, and adding extra block devices is wasteful in this case.



Alternatively is there a better way to allocate a portion of the underlying ext4 partition to a zpool without partitioning it or in a way which can be automated without the need to delve into a VPS manager?







linux zfs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 4 at 19:11







Thomas Brierley

















asked Jan 4 at 18:47









Thomas BrierleyThomas Brierley

1133




1133












  • Here are two possible better ways to do this: use LVM under ext4 to do the snapshottting (although LVM snapshots have a performance overhead for writes until you delete them, and I don’t know of a way to efficiently send just the changed data from and LVM snapshot like ZFS can do); or, better yet, just use ZFS for the whole server instead of just for the database files.

    – Dan
    Jan 5 at 18:42

















  • Here are two possible better ways to do this: use LVM under ext4 to do the snapshottting (although LVM snapshots have a performance overhead for writes until you delete them, and I don’t know of a way to efficiently send just the changed data from and LVM snapshot like ZFS can do); or, better yet, just use ZFS for the whole server instead of just for the database files.

    – Dan
    Jan 5 at 18:42
















Here are two possible better ways to do this: use LVM under ext4 to do the snapshottting (although LVM snapshots have a performance overhead for writes until you delete them, and I don’t know of a way to efficiently send just the changed data from and LVM snapshot like ZFS can do); or, better yet, just use ZFS for the whole server instead of just for the database files.

– Dan
Jan 5 at 18:42





Here are two possible better ways to do this: use LVM under ext4 to do the snapshottting (although LVM snapshots have a performance overhead for writes until you delete them, and I don’t know of a way to efficiently send just the changed data from and LVM snapshot like ZFS can do); or, better yet, just use ZFS for the whole server instead of just for the database files.

– Dan
Jan 5 at 18:42










1 Answer
1






active

oldest

votes


















3














ZFS is perfectly happy using a single file for a pool. You may not be, however. There are a few disadvantages.



  1. Performance. All ZFS iops are now translated to vnode ops, so ZFS is now sitting on top of a few more layers than it's used to. This comes with a significant performance impact.

  2. Reliability. ZFS ensures the atomicity of its transactions by writing its root node, called the "uberblock", with a single I/O issued to the uberblock's 4 locations. ZFS issues an fsync on the file after writing the uberblocks, but that turns out to be not 100% reliable.

  3. Redundancy. A single file (or a single disk for that matter) means that one of ZFS's better features, repairing read errors on the fly, is turned off. You may want to consider using a pair of files in a RAID1 (ZFS "mirror") config just to be a bit safer.





share|improve this answer























  • Thanks, #1 and #2 are the answer I was looking for (i.e significant performance and reliability reduction), I suspected there was more to it than mere absence of fault tolerance but wanted to be sure it was necessary to look for other options.

    – Thomas Brierley
    Jan 4 at 20:17










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492554%2fzfs-file-backed-zpool-for-snapshots-safe-in-production%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














ZFS is perfectly happy using a single file for a pool. You may not be, however. There are a few disadvantages.



  1. Performance. All ZFS iops are now translated to vnode ops, so ZFS is now sitting on top of a few more layers than it's used to. This comes with a significant performance impact.

  2. Reliability. ZFS ensures the atomicity of its transactions by writing its root node, called the "uberblock", with a single I/O issued to the uberblock's 4 locations. ZFS issues an fsync on the file after writing the uberblocks, but that turns out to be not 100% reliable.

  3. Redundancy. A single file (or a single disk for that matter) means that one of ZFS's better features, repairing read errors on the fly, is turned off. You may want to consider using a pair of files in a RAID1 (ZFS "mirror") config just to be a bit safer.





share|improve this answer























  • Thanks, #1 and #2 are the answer I was looking for (i.e significant performance and reliability reduction), I suspected there was more to it than mere absence of fault tolerance but wanted to be sure it was necessary to look for other options.

    – Thomas Brierley
    Jan 4 at 20:17















3














ZFS is perfectly happy using a single file for a pool. You may not be, however. There are a few disadvantages.



  1. Performance. All ZFS iops are now translated to vnode ops, so ZFS is now sitting on top of a few more layers than it's used to. This comes with a significant performance impact.

  2. Reliability. ZFS ensures the atomicity of its transactions by writing its root node, called the "uberblock", with a single I/O issued to the uberblock's 4 locations. ZFS issues an fsync on the file after writing the uberblocks, but that turns out to be not 100% reliable.

  3. Redundancy. A single file (or a single disk for that matter) means that one of ZFS's better features, repairing read errors on the fly, is turned off. You may want to consider using a pair of files in a RAID1 (ZFS "mirror") config just to be a bit safer.





share|improve this answer























  • Thanks, #1 and #2 are the answer I was looking for (i.e significant performance and reliability reduction), I suspected there was more to it than mere absence of fault tolerance but wanted to be sure it was necessary to look for other options.

    – Thomas Brierley
    Jan 4 at 20:17













3












3








3







ZFS is perfectly happy using a single file for a pool. You may not be, however. There are a few disadvantages.



  1. Performance. All ZFS iops are now translated to vnode ops, so ZFS is now sitting on top of a few more layers than it's used to. This comes with a significant performance impact.

  2. Reliability. ZFS ensures the atomicity of its transactions by writing its root node, called the "uberblock", with a single I/O issued to the uberblock's 4 locations. ZFS issues an fsync on the file after writing the uberblocks, but that turns out to be not 100% reliable.

  3. Redundancy. A single file (or a single disk for that matter) means that one of ZFS's better features, repairing read errors on the fly, is turned off. You may want to consider using a pair of files in a RAID1 (ZFS "mirror") config just to be a bit safer.





share|improve this answer













ZFS is perfectly happy using a single file for a pool. You may not be, however. There are a few disadvantages.



  1. Performance. All ZFS iops are now translated to vnode ops, so ZFS is now sitting on top of a few more layers than it's used to. This comes with a significant performance impact.

  2. Reliability. ZFS ensures the atomicity of its transactions by writing its root node, called the "uberblock", with a single I/O issued to the uberblock's 4 locations. ZFS issues an fsync on the file after writing the uberblocks, but that turns out to be not 100% reliable.

  3. Redundancy. A single file (or a single disk for that matter) means that one of ZFS's better features, repairing read errors on the fly, is turned off. You may want to consider using a pair of files in a RAID1 (ZFS "mirror") config just to be a bit safer.






share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 4 at 20:00









mmusantemmusante

60736




60736












  • Thanks, #1 and #2 are the answer I was looking for (i.e significant performance and reliability reduction), I suspected there was more to it than mere absence of fault tolerance but wanted to be sure it was necessary to look for other options.

    – Thomas Brierley
    Jan 4 at 20:17

















  • Thanks, #1 and #2 are the answer I was looking for (i.e significant performance and reliability reduction), I suspected there was more to it than mere absence of fault tolerance but wanted to be sure it was necessary to look for other options.

    – Thomas Brierley
    Jan 4 at 20:17
















Thanks, #1 and #2 are the answer I was looking for (i.e significant performance and reliability reduction), I suspected there was more to it than mere absence of fault tolerance but wanted to be sure it was necessary to look for other options.

– Thomas Brierley
Jan 4 at 20:17





Thanks, #1 and #2 are the answer I was looking for (i.e significant performance and reliability reduction), I suspected there was more to it than mere absence of fault tolerance but wanted to be sure it was necessary to look for other options.

– Thomas Brierley
Jan 4 at 20:17

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492554%2fzfs-file-backed-zpool-for-snapshots-safe-in-production%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)