Re: delete on snapshot does not free space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dne 30. 04. 24 v 19:54 Michael DiDomenico napsal(a):
this is probably expected behavior, but i'd like to confirm as i'm not
a device-mapper expert

we're using COW snapshots overtop of a readonly block device.  this
seems to be working fine, however, when a person deletes files the
blocks are not freed.  case in point a RO block device with a COW
filled up to 100% as shown in df.  when i deleted some files to free
space the usage never decreased

to create the mount we do

echo "0 <realsize> linear /dev/loop1 0" | dmsetup create roimage-base-real
echo "0 <cowsize> linear /dev/loop2 0" | dmsetup create roimage-snap-cow
echo "0 <realsize> snapshot-origin /dev/mapper/roimage-base-real" |
dmsetup create roimage-base
echo "0 <realsize> snapshot /dev/mapper/roimage-base-real
/dev/mapper/roimage-snap-cow n 1" | dmsetup create roimage-cow

mount /dev/mapper/roimage-cow /roimagemntpnt

this is working as the origin device is Read-Only, but we can change files.

so two questions come up

1 when we delete files, how do we reclaim the space
2 should/can we roll the snapshots to reclaim space?

Please consider using thin-pools - this should be giving you the features you are likely looking for.

Note - you can use thin-pool to hold only snapshots and use your read-only volume as the external origin for thin volume.

Regards

Zdenek








[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux