LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This 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

Reply
 
Search this Thread
Old 03-14-2012, 03:23 PM   #1
st_disk
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Rep: Reputation: Disabled
iscsi growing disk qcow2?


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.
 
Old 03-15-2012, 04:09 PM   #2
jefro
Guru
 
Registered: Mar 2008
Posts: 11,340

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
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?

I wish I could remember where I saw that.

See this for some ideas to start. http://lists.gnu.org/archive/html/qe.../msg01977.html

I get the idea it was on a gpxe or ipxe site.

Last edited by jefro; 03-15-2012 at 04:14 PM.
 
Old 03-16-2012, 05:19 AM   #3
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 834

Rep: Reputation: 91
Sparse fuiles can be used with raw files, it doesn't have to be qcow2
http://www.ruslansivak.com/index.cfm...files-on-Linux
 
Old 03-16-2012, 03:16 PM   #4
jefro
Guru
 
Registered: Mar 2008
Posts: 11,340

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
I may have misunderstood this. Do you want to use the compressed virtual hard drive without a virtual machine?
 
Old 03-19-2012, 03:29 PM   #5
st_disk
LQ Newbie
 
Registered: Mar 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Smile

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!
 
Old 03-19-2012, 04:02 PM   #6
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 834

Rep: Reputation: 91
why iSCSI? It is not a protocol to be used over WAN, or even over a VPN link - very heavy and noisy. I would just use sftp
 
Old 03-27-2012, 04:53 AM   #7
Olivianerden
LQ Newbie
 
Registered: Mar 2012
Posts: 2

Rep: Reputation: Disabled
I'm with dyasny, use sftp
Good luck

Last edited by Olivianerden; 03-27-2012 at 04:55 AM.
 
Old 03-27-2012, 02:41 PM   #8
jefro
Guru
 
Registered: Mar 2008
Posts: 11,340

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
And I don't know of a way to grow a real partition.
 
Old 03-27-2012, 04:15 PM   #9
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 834

Rep: Reputation: 91
Quote:
Originally Posted by jefro View Post
And I don't know of a way to grow a real partition.
man parted
man resize2fs
 
Old 03-27-2012, 06:46 PM   #10
jefro
Guru
 
Registered: Mar 2008
Posts: 11,340

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
I think he wanted to grow it as needed in a transparent manner as is the case with a qcow2 image.
 
Old 03-28-2012, 08:17 AM   #11
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 834

Rep: Reputation: 91
Quote:
Originally Posted by jefro View Post
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.
 
Old 03-28-2012, 02:53 PM   #12
jefro
Guru
 
Registered: Mar 2008
Posts: 11,340

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
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.

Last edited by jefro; 03-28-2012 at 02:56 PM.
 
Old 03-29-2012, 05:11 AM   #13
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 834

Rep: Reputation: 91
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.
 
Old 03-29-2012, 03:11 PM   #14
jefro
Guru
 
Registered: Mar 2008
Posts: 11,340

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
The OP wanted to install a real linux system to a iscsi, not a virtual machine.
 
Old 03-30-2012, 05:25 AM   #15
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 834

Rep: Reputation: 91
This conversation had strayed away from the OP's question long ago, when you started claiming partitions could not be resized
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] qemu, qcow2 -> hard disk qrange Linux - Software 3 05-01-2013 11:25 PM
KVM disk formats - difference between qcow2 and raw slacky Linux - Virtualization and Cloud 3 09-16-2011 01:27 PM
[SOLVED] Need Tools to Identify a Growing Disk Space ethereal1m Linux - Newbie 5 10-01-2010 12:54 AM
Problem while creating PV on iSCSI disk. itsakc Linux - Enterprise 3 09-17-2009 10:13 AM
MySQL ibdata1 growing and growing and growing and... jnojr Linux - Software 1 07-20-2009 07:11 PM


All times are GMT -5. The time now is 01:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration