Resizing ZFS backed iSCSI volumes with Windows initiators

One of the first things I really hoped ZFS could do when I heard about it (and its ability to share using iSCSI) was the ability to resize things at will. Resizing file systems is something that has been possible for a while but it has never been this easy, at least in my mind. With the ability to resize storage volumes you can put a ton of disks into a single system and then share out exactly what is needed to your systems and then resize if you need more later on. Today I got a chance to test ZFS’s ability to resize volumes as well as how Windows handles the task.

Although the ability to resize file systems has been around for a while it has never been as easy as it is today. Linux has been able to resize file systems for some time and the latest versions of Windows provides the ability right in Disk Management. I run a number of Windows systems and the ability to resize NTFS iSCSI volumes is what I’m primarily interested in.

Click read more to learn how this is done. This isn’t a full how-to but more of an overview of how to make it all happen.

Please bear with me a bit, I’m writing all of this from memory. Some things may differ slightly from what I’ve written. I’ll do what I can to come back and update this post. Also note that this has been tested using Server 2003 and Vista SP1. I resized the disk using Vista, remounted it in Server 2003.

To get started create a new ZFS dataset and share it using iSCSI. The following command will accomplish this.

zfs create -V 1G -o shareiscsi=on test/iscsi2

Unless you are running Vista or Server 2008 you will need to install the iSCSI initiator software for Windows. Once installed start the software and add an entry on the Discovery tab’s Target Portals that points to your OpenSolaris server. In my case I just entered the IP address 192.168.0.233. Click ok and head to the targets tab. You should then see an entry that you can log in to. Log in to the target.

Start Disk Management by clicking start and doing the following. Right click My Computer, choose Manage. Once open, click Disk Management. You may be prompted to initialize the new disk. Go ahead and do so, then partition and format the disk as well.

Once this process is finished, a new disk will be available in My Computer. You can copy files, delete files or what ever you like. As far as the system is concerned it is just another disk.

We can now go ahead and resize the disk. To do so, return to the iSCSI initiator software and to the targets tab. Click the entry that you are connected to and click the details button. Click the check box for the disk your connected to and click Log off.

Return to your Solaris box and resize the dataset. The following command will achieve this.

zfs set volsize=2G test/iscsi2

Return to your Windows machine and start the iSCSI initiator software. Reattach to the iSCSI share and then return to Disk Management. If you are using Vista or Server 2008 you can extend the iSCSI disk to fill all available space.

2 comments

  1. How can you extend the disk with windows 2003? I tried diskpart and it wouldn’t work.

    thanks — dee

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.