Go to file
Jose M. Guisado dd999bfe34 utils: rewrite ogReduceFs
Drop subprocess call to bash function ogReduceFs. Use a native python
solution with subprocess calls to the required underlying tools.

Use get_filesystem_type to get the filesystem from a partition and call
the corresponding supported filesystem shrink function.

Filesystem specific functions are declared "_reduce_{filesystem}" and
should not be imported elsewhere.

In case of NTFS filesystems, the output of 'ntfsresize' is processed
directly. This is dirty, but we can expect no changes to the output
strings if we read the following comment in the nftsresize.c source
code:
https://github.com/tuxera/ntfs-3g/blob/edge/ntfsprogs/ntfsresize.c#L12

ntfsresize requires to do previous dry-run executions to confirm
that the resizing is possible.
If a dry-run fails but a 10% increase in size is still smaller than
original filesystem then retry the operation until dry-run reports
sucess or the size increase is bigger than original.

If resizing to a smaller ntfs filesystem is not possible then ogReduceFs
will do nothing.
2023-05-02 17:31:08 +02:00
cfg src: improve logging 2022-06-08 10:27:06 +02:00
src utils: rewrite ogReduceFs 2023-05-02 17:31:08 +02:00
tests ogClient is AGPLv3+ 2021-05-14 00:19:28 +02:00
.gitignore Create new ogClient 2020-01-19 19:50:44 +01:00
COPYING Rename LICENSE to COPYING 2020-06-18 16:45:46 +02:00
ogclient src: improve logging 2022-06-08 10:27:06 +02:00
setup.py Rename 'linux' folder and operations to 'live' 2020-12-03 13:38:43 +01:00