Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am attempting to setup an ISCSI target using the qcow2 image format. It does not appear that tgtd supports the qcow2 format. The disk size will show zero or give a 250kb or so disk size. My question is what is the best way to setup a virtual disk using iscsi? For example I would like to create an ISCSI 1TB virtual disk. The disk would not consume 1TB but would have 1TB available. As data is added to it, the actual file size would grow.
Micro$oft has the ability to use VHD files to do this.I can easily setup a dd image file that consumes the entire size specified and ISCSI will work fine. But filling up an entire 1TB drive in my application is not practical. Any help would be appreciated.
This should work and I feel like I have seen the how to on it not too long ago.
In a very basic sense it would be the same as a virtual image on a scsi drive. We know that work. The issue here is that you may not have iscsi support in the loading. What you are trying do is boot or load some OS or virtual machine client, correct?
Correct. I am looking for disk storage and not to boot an OS. The sparse file idea works. However, I am looking to use the Fuse file system to store the virtual drive. Sparse files do not show up correctly on a fuse file system. I am looking to mount a folder to Amazon or Rackspace using fuse, and then store a virtual disk inside the folder. ISCSI would use this virtual disk as storage and the file would grow as space is needed. I know performance would not be great but it would work for my needs. QCow2 is not necessarily a requirement as long as I do not need to allocate the full amount of space to the storage.
ISCSI > virtual disk > stored on a cloud Rackspace or AWS.
Basically an ISCSI drive that has 1TB of storage housed in a cloud. That grows as files are stored in it.
Thanks for the responses. If anyone has any further feedback that would be great. I will continue trying to pursue the idea and will post if I figure it out. Thanks!
I think he wanted to grow it as needed in a transparent manner as is the case with a qcow2 image.
qcow2 is not a partition, and it cannot grow on it's own - something has to extend it (whether it's the underlying FS extending a sparse file, or a monitoring system that periodically runs lvextend).
And in any case, partitions can grow, in online mode, without interruption and having to remount, both in Windows and in Linux.
I'd like to know about that then. I have never heard of a transparent method to grow a partition as the need for it exists as is the case with qcow2 virtual drives.
I was pretty sure that qcow2 isn't a partition but thanks for pointing that out.
dyasny, you have not been following the post. We have all known all this from the beginning. The OP wanted some method to replicate the way a qcow2 disk works on a real system.
but that's the thing - qcow2 provides a block device. Give your machine access to a larger LUN (or increase the LUN size - most SANs allow you to do that) and you've got a larger block device, but the partition on it will be the same size. Expand a qcow2 or raw file, while a VM is running, and it'll also have a larger block device attached, but the partitions will not change.
All I'm saying is that this behaviour is the same on all systems, and you can expand the partition's size live, using the OS tools, without powering down your machine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.