SCIENTIFIC-LINUX-USERS Archives

May 2015

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Vladimir Mosgalin <[log in to unmask]>
Reply To:
Vladimir Mosgalin <[log in to unmask]>
Date:
Sat, 2 May 2015 16:19:52 +0300
Content-Type:
text/plain
Parts/Attachments:
text/plain (61 lines)
Hi ToddAndMargo!

 On 2015.05.02 at 02:00:20 -0700, ToddAndMargo wrote next:

> That is what I thought.  But when I allocated a 40 GB
> several times using both methods, ls gave me the full
> size.  What am I missing?

Either 1) your storage backend doesn't support sparse images or 2) you
are using wrong method to check image size.

Example of 1) is LVM on older systems that don't support
thin-provisioned devices. You create 40GB volume - it's allocated right
away. (new system, at least EL7 based libvirt should be able to create
thin-provisioned LVM as well)

Example of 2) is file backend in RAW format. It's just a full disk
image, so reported file size is just as requested (40GB). ls -l will
show you that. It's a sparse file, so it doesn't take that much disk
space. du -s will show you the actual size it takes. In other words,
it doesn't have the full size, it just seems like it does.

If you're using advanced storage format like qcow, you won't see 40GB
size at all.

Note that unless you're backed up by SSD storage and need performance,
you really should consider always using preallocated images. Sparse
images add extra fragmentation.

> >>3) What is the difference between and IDE and a Virtio
> >>   disk?  It the Virtio disk any faster?
> >>
> >>Many thanks,
> >>-T
> 
> >It can be: the guest operating system has to support the drivers for
> >it, and not all older operating systems do.
> 
> So, we are basically talking about a Linux OS.  And a second
> drive on Windows if the guest additions will install.

Second drive?
You install windows right away on system with virtio drivers (disk &
network), just install with virtio-win drivers iso mounted use "add
driver" (or w/e it's called). You can add all drivers (virtio, scsi,
network, serial, balloon) this way during installation.

Note that "virtio" is a somewhat deprecated disk interface, the new one
caled virtio-scsi (for that, specify disk type as "scsi", not virtio),
it offers more features, sometimes superior performance and (maybe most
important) UNMAP support, which is very effective when your storage is
backed by SSD or thinly-provisioned device. Works like a charm - e.g.
you delete files on windows, run "optimize drive" and you can see that
thinly-provisioned disk takes less space after that. Of course, you
should never mess with this if you're using preallocated images on a
regular HDD.

-- 

Vladimir

ATOM RSS1 RSS2