Defining SSD on non-SSD (HDD) iscsi extent

Status
Not open for further replies.

jamesx

Cadet
Joined
Nov 18, 2018
Messages
9
I would like to ask a quick question regarding ISCSI target. I am currently setting up Freenas 11.u6 for my existing ESXi 6.5. My freenas has 3x4TB HDD and configured as RAIDZ1. I wanted to use SSD but have limited budget. I understand that I can set NON-SSD (RPM) instead of SSD if my initiator is vmware. However, i am still going to have windows as guest OS, and defragmentation will still run.

My question is, would it be possible to set SSD as value for LUN RPM in the ISCSI extent just to eliminate the issue with windows defragmentation?
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
I’m in no way an expert, but what I read when I did my first trials with iSCSI was to set it to SSD so defrag wouldn’t runt. Basically, if you defrag an iSCSI extent you will generate huge snapshots. Also, your Z1 pool is far from ideal and with iSCSI you will need to keep the utilization below 50% of the pool.
 

jamesx

Cadet
Joined
Nov 18, 2018
Messages
9
I’m in no way an expert, but what I read when I did my first trials with iSCSI was to set it to SSD so defrag wouldn’t runt. Basically, if you defrag an iSCSI extent you will generate huge snapshots. Also, your Z1 pool is far from ideal and with iSCSI you will need to keep the utilization below 50% of the pool.

Thanks garm, there is a thread that is similar to this and someone commented that I can follow what the documentation says, that I can use non-ssd to a vmware initiator. But my i am worrying about the Windows guest OS, it probably runs defragmentation.

Does anybody have experience with this kind of scenario?
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Ok so you have a few layers:

Windows
VM VMDK
VMware
iSCSI
FreeNAS

FreeNAS can tell VMware the LUN is SSD over iSCSI but then VMware gives the VM a spinning hard drive so Windows thinks its a normal spinning drive. As you may know or guess from the layers of abstraction ESXi nor windows have any clue where the data is on the physical disks. This all means you should be disabling defrag in all of your windows VMs. If you are deploying many VMs, consider using templates and sysprep.

When defining virtual disks it is possible to manually set the SSD flag in the VMX file but this is considered an advanced option and may have unintended consequences.
 

Ender117

Patron
Joined
Aug 20, 2018
Messages
219
I might be missing sth but why not just lie to vmware and claim it's an ssd?
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
I might be missing sth but why not just lie to vmware and claim it's an ssd?

FreeNAS can present the iSCSI extent as having RPM=1 (SSD) and VMware will treat the datastore as being an SSD; but VMware by default presents its VMDKs to guests as being a spinning disk.

And Windows will try to defrag a spinning disk.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
I might be missing sth but why not just lie to vmware and claim it's an ssd?
Because VMware is still telling windows its a traditional spinning disk. Therefor Windows will still think it needs to defrag.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
FreeNAS can present the iSCSI extent as having RPM=1 (SSD) and VMware will treat the datastore as being an SSD; but VMware by default presents its VMDKs to guests as being a spinning disk.

And Windows will try to defrag a spinning disk.
Echo...
 

Ender117

Patron
Joined
Aug 20, 2018
Messages
219
FreeNAS can present the iSCSI extent as having RPM=1 (SSD) and VMware will treat the datastore as being an SSD; but VMware by default presents its VMDKs to guests as being a spinning disk.

And Windows will try to defrag a spinning disk.
Then sounds to me it's vmware's problem. The solution is either have vmware correctly report disk type, or configure windows not to de-frag... Nothing FreeNAS can help here.

Or maybe create a new iSCSI target on FN, then have the windows VM do network boot?


Edit: Or this could be windows's problem, it doesn't make sense to de-frag in a vituralized environment.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Then sounds to me it's vmware's problem.
It's not a problem, its expected. The default to spinning disks is a choice of compatibility. You would gain nothing by defaulting to SSD looking VMDKs at least not at this point. Is not hard to disable defrag and in most environments it just done to the base template.
Or maybe create a new iSCSI target on FN, then have the windows VM do network boot?
The only time i have ever seen VMs booting from network is for lab testing. There are extremely few reasons to netboot a VM especially a Windows one. I guess its something to do... I would rather spend my time tinkering with WDS.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
Trying to defrag a filesystem "on top of" ZFS is, in general, a bad idea, because copy-on-write will probably make the problem worse.

Modern Windows OSes, both client and server, are supposed to have better knowledge of when a disk is thin/virtual/etc, when they're running as a VM, etc, and in turn disable their defragmentation routines and stick to things like space reclamation/TRIM/etc.

But as I've said before, Windows is supposed to do a lot of things. It's best to make certain it actually is. And that usually means "disable defrag in your template/gold image."
 

jamesx

Cadet
Joined
Nov 18, 2018
Messages
9
Thank you guys for your answers and I am sorry I did not get a chance to reply, I was sick all week.

Anyway, I am going to set the LUN to be an SSD and disable the default settings on defragmentation in the task scheduler of Windows guest VM.
 
Status
Not open for further replies.
Top