Discussion:
Manually Setting ashift at zpool creation time
(too old to reply)
Gordan Bobic
2014-02-20 10:24:27 UTC
Permalink
I'm trying to set ashift manually at pool creation time, but the current
zpool implementation doesn't support

-o ashift=n

option.

In fact, looking at the output of

zpool get all <poolname>

ashift property is not listed at all.

What ashift do pools get created with by default?

Where in the code would I need to make a change to hard-code it to 12
(2^12=4096 for new drives with 4KB sectors)?

Thanks.

Gordan
--
--
To post to this group, send email to zfs-fuse-/***@public.gmane.org
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-fuse+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Durval Menezes
2014-02-20 10:53:18 UTC
Permalink
Hi Gordan,

This would be interesting to know. Presently I have a smallish (4 x 1TB
drives) RAIDZ1 pool running with ashift=12 under zfs-fuse with no issues,
but I created it using ZFSOnLinux...

Cheers,
--
Durval.
Post by Gordan Bobic
I'm trying to set ashift manually at pool creation time, but the current
zpool implementation doesn't support
-o ashift=n
option.
In fact, looking at the output of
zpool get all <poolname>
ashift property is not listed at all.
What ashift do pools get created with by default?
Where in the code would I need to make a change to hard-code it to 12
(2^12=4096 for new drives with 4KB sectors)?
Thanks.
Gordan
--
--
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
--
To post to this group, send email to zfs-fuse-/***@public.gmane.org
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-fuse+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Gordan Bobic
2014-02-20 11:22:04 UTC
Permalink
Indeed, my plan B was to yank the disks and create the pools on an x86 box
using ZoL, but that's a bit lame. I'd much rather patch the code in
zfs-fuse to always use ashift=12 instead of ashift=9 since today 12 makes
far more sense in the default case.



On Thu, Feb 20, 2014 at 10:53 AM, Durval Menezes
Post by Durval Menezes
Hi Gordan,
This would be interesting to know. Presently I have a smallish (4 x 1TB
drives) RAIDZ1 pool running with ashift=12 under zfs-fuse with no issues,
but I created it using ZFSOnLinux...
Cheers,
--
Durval.
Post by Gordan Bobic
I'm trying to set ashift manually at pool creation time, but the current
zpool implementation doesn't support
-o ashift=n
option.
In fact, looking at the output of
zpool get all <poolname>
ashift property is not listed at all.
What ashift do pools get created with by default?
Where in the code would I need to make a change to hard-code it to 12
(2^12=4096 for new drives with 4KB sectors)?
Thanks.
Gordan
--
--
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups
"zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
--
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
--
To post to this group, send email to zfs-fuse-/***@public.gmane.org
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-fuse+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
ray vantassle
2014-02-20 16:44:32 UTC
Permalink
Post by Gordan Bobic
Indeed, my plan B was to yank the disks and create the pools on an x86 box
using ZoL, but that's a bit lame. I'd much rather patch the code in
zfs-fuse to always use ashift=12 instead of ashift=9 since today 12 makes
far more sense in the default case.
I tried that once. Being lazy I just hardcoded 12. Worked fine...until I
tried to add a new disk into a pool that had been created with the original
ashift=9. Which it complained about and refused to do. So now I have both
executables, one does 9 the other does 12.

I once came across a patch which added the -ashift option to zfs-fuse,
wasn't sure why it had never gotten into a release. AFAIK it still isn't
in.
--
--
To post to this group, send email to zfs-fuse-/***@public.gmane.org
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-fuse+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Gordan Bobic
2014-02-20 16:47:03 UTC
Permalink
It isn't in the build I'm using, but if you can find the patch please do
post a link.
My proposed patch is broken - it creates a pool that is incompatible with
unmodified ZFS which is _bad_.
Post by Gordan Bobic
Indeed, my plan B was to yank the disks and create the pools on an x86 box
Post by Gordan Bobic
using ZoL, but that's a bit lame. I'd much rather patch the code in
zfs-fuse to always use ashift=12 instead of ashift=9 since today 12 makes
far more sense in the default case.
I tried that once. Being lazy I just hardcoded 12. Worked fine...until
I tried to add a new disk into a pool that had been created with the
original ashift=9. Which it complained about and refused to do. So now I
have both executables, one does 9 the other does 12.
I once came across a patch which added the -ashift option to zfs-fuse,
wasn't sure why it had never gotten into a release. AFAIK it still isn't
in.
--
--
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
--
To post to this group, send email to zfs-fuse-/***@public.gmane.org
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-fuse+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Emmanuel Anne
2014-02-20 17:49:35 UTC
Permalink
There was never a patch for this, I have no hardware to test it so I never
did it, but it's easy to manually modify the hard coded value in the code
(just grep ashift, you'll find it).
Post by Gordan Bobic
It isn't in the build I'm using, but if you can find the patch please do
post a link.
My proposed patch is broken - it creates a pool that is incompatible with
unmodified ZFS which is _bad_.
Post by Gordan Bobic
Indeed, my plan B was to yank the disks and create the pools on an x86
box using ZoL, but that's a bit lame. I'd much rather patch the code in
zfs-fuse to always use ashift=12 instead of ashift=9 since today 12 makes
far more sense in the default case.
I tried that once. Being lazy I just hardcoded 12. Worked fine...until
I tried to add a new disk into a pool that had been created with the
original ashift=9. Which it complained about and refused to do. So now I
have both executables, one does 9 the other does 12.
I once came across a patch which added the -ashift option to zfs-fuse,
wasn't sure why it had never gotten into a release. AFAIK it still isn't
in.
--
--
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups
"zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
--
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
--
To post to this group, send email to zfs-fuse-/***@public.gmane.org
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-fuse+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Gordan Bobic
2014-02-20 19:34:20 UTC
Permalink
I did, but clearly I put it in the wrong place, as per the patch I sent. It
seems to work OK, but the pool shows up as corrupted when accessed with
unmodified zfs-fuse. Since a pool created with ashift=12 using ZoL works
fine with zfs-fuse, I'm 100% certain my patch breaks it.

So a pointer on which instance to edit would be most welcome.
Post by Emmanuel Anne
There was never a patch for this, I have no hardware to test it so I never
did it, but it's easy to manually modify the hard coded value in the code
(just grep ashift, you'll find it).
Post by Gordan Bobic
It isn't in the build I'm using, but if you can find the patch please do
post a link.
My proposed patch is broken - it creates a pool that is incompatible with
unmodified ZFS which is _bad_.
Post by Gordan Bobic
Indeed, my plan B was to yank the disks and create the pools on an x86
box using ZoL, but that's a bit lame. I'd much rather patch the code in
zfs-fuse to always use ashift=12 instead of ashift=9 since today 12 makes
far more sense in the default case.
I tried that once. Being lazy I just hardcoded 12. Worked
fine...until I tried to add a new disk into a pool that had been created
with the original ashift=9. Which it complained about and refused to do.
So now I have both executables, one does 9 the other does 12.
I once came across a patch which added the -ashift option to zfs-fuse,
wasn't sure why it had never gotten into a release. AFAIK it still isn't
in.
--
--
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google
Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/groups/opt_out.
--
--
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups
"zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
--
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
--
To post to this group, send email to zfs-fuse-/***@public.gmane.org
To visit our Web site, click on http://zfs-fuse.net/
---
You received this message because you are subscribed to the Google Groups "zfs-fuse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-fuse+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Loading...