ZFS ZFS create vs mkdir

Is there any benefit to using create rather than mkdir when using zfs to just create a directory for normal usage? For a new project in a projects directory, for example?
 
Excellent. Some of those things did cross my mind. On the other hand, though, if I just create a dataset for every new directory, am I not making some kind of overly complicated knot? Or is that like a gen 1 filesystem mentality one has to overcome?
 
Excellent. Some of those things did cross my mind. On the other hand, though, if I just create a dataset for every new directory, am I not making some kind of overly complicated knot? Or is that like a gen 1 filesystem mentality one has to overcome?
Really just depends on what you want. If they have different backup(/snapshot) requirements, or might want to be separated in the future (to different pools, or even different systems) having their own filesystem can make sense.

If they’re all fundamentally similar in those respects, individual file systems is likely over-complicating things and you’ll be happier with directories.
 
For me, a clean install with a single user, do a zfs list. You'll see the basic breakdown of datasets.
anything on "home" (user directories) is always interesting. Some think each user should have their own dataset, others think a directory under the home dataset is fine.
It boils down to granularity. First one you can snapshot/backup each individual user, the other, all users wind up in the same snapshot.
On a single user system no big deal, multiuser, a big deal.

Now translate that thinking to "data directories" should they be individual datasets or just directories?
That thought process coupled with what Eric A. Borisch talks about should help guide you.
 
I like the guidance I've been given so far. If you have the slimmest reason to need some of the added functionally of a dataset, don't hesitate to make one. Otherwise, just mkdir.

Since I have never thoguth about CoW systems before, specially one that is also a volume manager, I just wanted to make sure there weren't random wires lying around that I might trip over or break.
 
I like the guidance I've been given so far. If you have the slimmest reason to need some of the added functionally of a dataset, don't hesitate to make one. Otherwise, just mkdir.

Since I have never thoguth about CoW systems before, specially one that is also a volume manager, I just wanted to make sure there weren't random wires lying around that I might trip over or break.
Stopping and thinking is never a bad thing. For me ZFS (I've been using on FreeBSD as soon as it came in) comes down to BEs (system upgrades made sensible) and datasets "Do I or will I want o back just this thing up" Those are distinct from "volume manager" (mirrors, RAID, etc).
Roughly similar to "partitions for UFS".

Stop, think, ask questions, then do can save you a lot of pain in the future.

Oh and everyone has opinions on best practices :)
 
You are right. Specially since I am new to thinking about zfs. I guess I just meant that I feel I may have ruled out the "stepping on a huge land mine" possibility in going one way or the other, and can now leasurely sit down to consider best practice directions.

For which I will definitely be referring back to this thread.
 
  • Like
Reactions: mer
You cannot think of a ZFS dataset as a directory. It's a filesystem tool. Think of it as a way to create a logical volume and a filesystem in one command. Like an HP/UX or Linux lvcreate and mkfs combined, and easier to use and maintain. Because, that's what it is.
 
And, as I am finding oput, once you create a dataset, you cannot simply rm it. Haha, things I wish I had considered before following random recipes. Thankfully it's early enough days that this shouldn't be too painful to untangle.
 
And, as I am finding oput, once you create a dataset, you cannot simply rm it. Haha, things I wish I had considered before following random recipes. Thankfully it's early enough days that this shouldn't be too painful to untangle.
Of course not. ZFS datasets are not directories or folders as the M$ types like to call them.
 
Back
Top