[SOLVED] Is downsizing persistent.dat possible? - Printable Version +- Ventoy Forums (https://forums.ventoy.net) +-- Forum: Ventoy General Use —— Ventoy 使用交流 (https://forums.ventoy.net/forumdisplay.php?fid=1) +--- Forum: Ventoy Discussion Forum (https://forums.ventoy.net/forumdisplay.php?fid=2) +--- Thread: [SOLVED] Is downsizing persistent.dat possible? (/showthread.php?tid=1812) |
[SOLVED] Is downsizing persistent.dat possible? - Plurix - 09-23-2021 It is now possible to extend persistent dat file by using sudo sh ExtendPersistentImg.sh datfile extend_size_mb (see 5. Extend persistent dat file here). For example: Code: sudo sh ExtendPersistentImg.sh persistent.dat 2048 "That means extend persistent.dat by 2048MB (+2GB), if the old size is 1GB, then it will grow to 3GB after you extend it." My question is: Is it possible to do the opposite? Downsize persistent.dat?... Example: Assuming I have a 96GB persistent.dat file, I want to resize to 64GB (65536MB). Can I issue the command below? Code: sudo sh ExtendPersistentImg.sh persistent.dat -32768 So that, in the end, I'd get a persistent dat file reduced to 64GB (65536MB). RE: Is downsizing persistent.dat possible? - longpanda - 09-24-2021 Download https://github.com/ventoy/Ventoy/blob/master/INSTALL/ExtendPersistentImg.sh It accepts a negative number for shrinking the dat file. But: 1. Only ext4 filesystem is supported. XFS is not supported. XFS filesystem can not be shrinked. 2. You must make sure that after shrink, the dat file can still hold all the files inside it. RE: Is downsizing persistent.dat possible? - Plurix - 09-24-2021 (09-24-2021, 02:16 AM)longpanda Wrote: Download https://github.com/ventoy/Ventoy/blob/master/INSTALL/ExtendPersistentImg.sh Great to know that! Thank you you Longpanda! RE: [SOLVED] Is downsizing persistent.dat possible? - elvisvan - 02-11-2023 If we're gonna use the same command/function "ExtendPersistentImg.sh" to reduce file size we might as well change its name to "UpdatePersistentImg.sh" to avoid confusions |