Is it VERY dangerous to Edit Zvol size to a smaller value?

Status
Not open for further replies.

Jimm Chen

Dabbler
Joined
Apr 20, 2015
Messages
30
In FreeNAS 9.3, after mapping a zvol to a iSCSI extent, user is still allow to change the zvol size, as in the image below:

JKJFP.png


Decreasing zvol's size can be disastrous for iSCSI LUN client, isn't it? From the iSCSI client's perspective, it is just like its hard disk is suddenly truncated, right? If it is so dangerous, I think FreeNAS should give a warning on doing this. Do you think so?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,525
It could be dangerous.

Consider this scenario. You create a 3TB zvol. You mount it through iSCSI and partition the 3TB drive. You put a bunch of data on the iSCSI extent, then expand it to 5TB. If you never expand the partition, then you could safely shrink back down to 3TB without consequence. Likewise if you used one of those tools to shrink the partition down to 1TB, you could shrink your 3TB zvol to 1TB without consequence.

Is there room for you to be incredibly stupid? Absolutely.

While I don't think preventing the action is the right answer, I think that the WebGUI should give you some warning before proceeding. I'd put in a feature request for that at bugs.freenas.org.
 
Status
Not open for further replies.
Top