[rhelv6-list] How can I create sparse block devices as a logical volumes with lvm
John Haxby
john.haxby at gmail.com
Fri Feb 4 12:05:45 UTC 2011
On 4 February 2011 11:45, carlopmart <carlopmart at gmail.com> wrote:
> On 02/04/2011 12:37 PM, John Haxby wrote:
>
>>
>> Do you mean something like this (from the lvcreate man page):
>>
>> "lvcreate --virtualsize 1T --size 100M --snapshot --name sparse vg1"
>> creates a sparse device named /dev/vg1/sparse of size 1TB with
>> space
>> for just under 100MB of actual data on it.
>>
>>
>> jch
>>
>>
>>
> Yes, but If I understand good, these options are only valid for snapshots
> ... I am trying to do a sparse logical volume without using snapshots ...
>
>
Hmmm. So you want to create a sparse logical volume using something other
than the mechanism for creating sparse logical volumes? Quoting the man
page again:
--virtualsize VirtualSize
Create a sparse device of the given size (in MB by
default)
using a snapshot. Anything written to the device will
be
returned when reading from it. Reading from other areas of
the
device will return blocks of zeros. It is implemented by
creat‐
ing a hidden virtual device of the requested size using the
zero
target. A suffix of _vorigin is used for this device.
Actually, I think the "--snapshot" on the man page example I previously
quoted is either redundant or wrong, this command works just fine:
lvcreate --virtualsize 1T --size 100M --name sparse vg1
Now it doesn't mention the s-word are you happy?
jch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhelv6-list/attachments/20110204/d4f4d2f4/attachment.htm>
More information about the rhelv6-list
mailing list