[PVE-User] sparse and compression

Miguel González miguel_3_gonzalez at yahoo.es
Mon Dec 11 15:34:37 CET 2017


On 12/11/17 3:29 PM, Fabian Grünbichler wrote:
> On Mon, Dec 11, 2017 at 03:23:34PM +0100, Miguel González wrote:
>>
>>>>  Can I change a zpool to sparse on the fly or do I need to turn off all
>>>> VMs before doing so?
>>>
>>> sparse will only affect newly created volumes. you can "convert" sparse
>>> volumes to fully reserved ones and vice versa manually though.
>>>
>>
>> how can I convert manually from non-sparse to sparse? Creating a new
>> zpool and copy disk with dd? Or any other easier way?
> 
> (un)set the reservations appropriately. like I said, "sparse" is
> entirely virtual for ZFS, the only difference is whether the full size
> is reserved upon creation or not.

from Andreas comment maybe i should look more into change blocksize.

> 
>>>>  Why a virtual disk shows as 60G when originally It was 36 Gb in raw format?
>>>>
>>>>  NAME                       USED  AVAIL  REFER  MOUNTPOINT
>>>>  rpool/data/vm-102-disk-1  60.0G  51.3G  20.9G  -
>>>
>>> wild guess - you are using raidz of some kind? ashift is set to 12 /
>>> auto-detected?
>>
>> Yes, raid1
>>
>> Thanks for your promptly reply!
> 
> raid1 (aka mirror)? or raidZ-1 ? those are two very different things ;)

from zfs perspective is called mirror-0 (not softraid underneath):

zpool status
  pool: rpool
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not
support
        the features. See zpool-features(5) for details.
  scan: scrub repaired 0B in 0h39m with 0 errors on Sun Dec 10 02:03:43 2017
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            sda2    ONLINE       0     0     0
            sdb2    ONLINE       0     0     0






---
This email has been checked for viruses by AVG.
http://www.avg.com




More information about the pve-user mailing list