4K sector drives on Freenas 8

Status
Not open for further replies.

fuyun1965

Dabbler
Joined
Jul 25, 2011
Messages
17
Hi, I just wondering which way will be better for 4K sector drives on FreeNAS 8.
1. set the pin7 pin8 jumper on WD green lable drives to force it to 512byte sector compatible mode. Use FreeNAS 8.0 release.
2. Use FreeNAS 8.0.1 beta 4, and check the 4K sector box when creating ZFS volume.

Thanks!
fuyun
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Have a look in the FAQ(s) in my signature below, there's a question about 4k sectors. If you're starting with clean disks, you might as well use beta4 and set 4k sectors now.
 

fuyun1965

Dabbler
Joined
Jul 25, 2011
Messages
17
Thanks, Protosd,
I can't delete ZFS volume when using beta3 and beta4. Also can't activate S.M.A.R.T function on beta3 and beta4. No problem for beta2 and 8.0 release.
So which version should I used?

Regards,
Fuyun
 

fuyun1965

Dabbler
Joined
Jul 25, 2011
Messages
17
Dear Protosd,
I saw your signature, that you are using 4 Samsung F4 drives and 2 Hitachi 7K3000. As Samsung F4 should be 4K sector driver, and 7K3000 should be 512 sector drive. How do you make ZFS Raidz2?

Thanks!
Fuyun
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I created my pool before the option to select 4k sectors was available, so I just selected my disks and created my pool. You can't change after you've already created your pool. I haven't had any problems. I will say I have had one of my Hitachi disks fail 31 days after I bought it and had to RMA it, and the 2nd one bought at the same time is also giving me a random clicking noise, so I know it's failing too (but no hard errors yet).
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
@Fuyun,
If you are in a place where you can reformat your drives to 4K Sectors, you should do it. Once you have a large amount of data on your drives you will not feel like making a change like that so readily. I've been testing for quite some time now and have reformatted my drives a few times to say the least. As protosd said, you should go ahead and create those 4K but you will need Beta-4 or one of the new nightly builds. Build 7209 looks much nicer and has a lot of bug fixes. Soon Beta-5 will come out (think they will call it a new release version). On those WD drives, you can leave them as 512 byte emulation or go right to 4K sectors. I would choose the 4K sectors myself if all my drives are 4K sector and not emulation (it's a personal preference) And there is a difference in the mechanics of how data is transferred, the 512 byte emulation is a little slower however you will never see that on your hard drive performance. Let me say that again, you will never notice the difference in performance between a 512 byte emulation and true 4K sector I/O. Not in this application and the drives are not speed demons.

As for how to create a RaidZ2, easy. You will need at least 4 hard drives, when you create your volume, Name the volume, you have to select 4+ hard drives, select ZFS, select 4K sector, and select RAID-Z2, last is Add Volume. That's about it. Keep in mind a RAID-Z2 is better with 5+ drives. If you were only using 4 drives, I'd just mirror them and get better performance out of the 4 drives.

If you can't find the nightly builds, ask, we will point you there.
 

fuyun1965

Dabbler
Joined
Jul 25, 2011
Messages
17
Thanks, joeschmuck,
Thanks for your advise. I just wondering if I can mix using true 512byte sector HD and 4K sector HD (setting to 512 byte emulation) to form RaidZ? This might be the reason for me to use 512 byte emulation.
And another problem I've got, which is although I have 4G ram installed, but Freenas is reporting 3048M ram available. Am I missing some RAM? Memory is very important for ZFS.

If I use beta 4, will that be easy to upgrade to a new build? or get revers to the previous build? Where can I have a step-by-step guide for it?

Regards,
Fuyun
 

fuyun1965

Dabbler
Joined
Jul 25, 2011
Messages
17
@Fuyun,
If you are in a place where you can reformat your drives to 4K Sectors, you should do it. Once you have a large amount of data on your drives you will not feel like making a change like that so readily. I've been testing for quite some time now and have reformatted my drives a few times to say the least. As protosd said, you should go ahead and create those 4K but you will need Beta-4 or one of the new nightly builds. Build 7209 looks much nicer and has a lot of bug fixes. Soon Beta-5 will come out (think they will call it a new release version). On those WD drives, you can leave them as 512 byte emulation or go right to 4K sectors. I would choose the 4K sectors myself if all my drives are 4K sector and not emulation (it's a personal preference) And there is a difference in the mechanics of how data is transferred, the 512 byte emulation is a little slower however you will never see that on your hard drive performance. Let me say that again, you will never notice the difference in performance between a 512 byte emulation and true 4K sector I/O. Not in this application and the drives are not speed demons.

As for how to create a RaidZ2, easy. You will need at least 4 hard drives, when you create your volume, Name the volume, you have to select 4+ hard drives, select ZFS, select 4K sector, and select RAID-Z2, last is Add Volume. That's about it. Keep in mind a RAID-Z2 is better with 5+ drives. If you were only using 4 drives, I'd just mirror them and get better performance out of the 4 drives.

If you can't find the nightly builds, ask, we will point you there.


Hi, joeschmuck,
As you strongly recommand me to reformat my drives to 4K sectors, where for me to do this? As I can't find HD formatting function on the new FreeNAS 8, while there is on FreeNAS 7.

Thanks!
Fuyun
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
You can mix the drive types, just stick to the same capacity. You don't need to use 4K sectors, it's just recommended if you have a 4K sector hard drive regardless of emulation.

The memory you are missing is likely due to one of the following conditions: 1) you are using 386 build which is limited to 3GB, you need the amd64 version, or 2) your motherboard is consuming some RAM for onboard video but 1GB gone really sounds like the wrong version of the software.

Last, to format the drives, follow the instructions I gave before about how to create the volume, that is "formatting" the drive for FreeNAS.

You have a ton of questions and I think you need to sit down and play with FreeNAS for a few days and learn it on your own. This is the way we do it with Beta software.
 

Tekkie

Patron
Joined
May 31, 2011
Messages
353
As you strongly recommand me to reformat my drives to 4K sectors, where for me to do this? As I can't find HD formatting function on the new FreeNAS 8, while there is on FreeNAS 7.
From your first posting
2. Use FreeNAS 8.0.1 beta 4, and check the 4K sector box when creating ZFS volume.
 
Joined
Oct 17, 2011
Messages
1
Using the 4K sector format to do more advanced Freenas setup

I am no freenas expert, I have been using since 0.69 and recently (3 mos) went to 8.0.x. However, after looking around and not seeing these particular pieces put together, I thought I would share what I did: I had found examples for striped mirrored setup instructions from http://forums.freenas.org/showthread.php?1815-How-can-I-make-zfs-raid-10-in-FreeNAS-8& and further reading found http://www.zfsbuild.com/2010/06/03/howto-create-striped-mirror-vdev-pool/#more-220.

These, in combination with this information http://swegen.blogspot.com/2011/09/zfs-with-4k-sectors-on-debian.html and here is what I was able to do: Take 2 x 2 TB Hitachi 7K2000 and 2 x 3 TB 5K3000 Hitachi drives (10 terabyte total) and make 2 mirrored stripes in one zpool:

[root@freenas] ~# zpool list
no pools available
[root@freenas] ~# geom nop create -v -S 4096 ada1
Done.
[root@freenas] ~# geom nop create -v -S 4096 ada2
Done.
[root@freenas] ~# geom nop create -v -S 4096 ada3
Done.
[root@freenas] ~# geom nop create -v -S 4096 ada4
Done.
[root@freenas] ~# zpool create pentagon mirror ada1.nop ada3.nop
cannot mount '/pentagon': failed to create mountpoint
[root@freenas] ~# zpool add pentagon mirror ada2.nop ada4.nop
[root@freenas] ~# zpool export pentagon
[root@freenas] ~# geom nop destroy -v ada1.nop ada2.nop ada3.nop ada4.nop
Done.
[root@freenas] ~# zdb pentagon | grep ashift
ashift=12
ashift=12
[root@freenas] ~# zpool status -v
pool: pentagon
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
pentagon ONLINE 0 0 0
mirror ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada3 ONLINE 0 0 0
mirror ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada4 ONLINE 0 0 0

errors: No known data errors

The pool is 4.5 gigabytes, and all drives are 4k sector formatted in freenas. You cannot do mirrored stripes in the GUI, but it imported in the "autoimport" in GUI without any issues (make sure you export it at the command line... ie zpool export yourpoolname
 

Daisuke

Contributor
Joined
Jun 23, 2011
Messages
1,041
Have a look in the FAQ(s) in my signature below, there's a question about 4k sectors. If you're starting with clean disks, you might as well use beta4 and set 4k sectors now.

The forced 4k sectors option is an illusion with WD20WEARS disks. If you check the disks, you will see that every mounted partition reports the sector size as 512. If anyone knows a manual method to create a ZFS array properly, please post it into this thread.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
So just for clarity, what happened when you did the stuff from the FAQ? Setting 4k sectors in the GUI doesn't change the firmware or native format of the disk, it just forces ZFS to use 4k sectors when it writes/reads from the disk.

  • zpool set cachefile=/data/zfs/zpool.cache tank (change tank to your pool name)
  • zdb -U /data/zfs/zpool.cache | grep ashift
  • If the answer = 9, you have 512 byte sectors.
  • If the answer = 12, you have 4k byte sectors.
 
Status
Not open for further replies.
Top