diff options
author | RAMON MARIA GOMEZ LABRADOR <ramongomez@us.es> | 2021-03-19 13:42:08 +0100 |
---|---|---|
committer | RAMON MARIA GOMEZ LABRADOR <ramongomez@us.es> | 2021-03-19 13:42:08 +0100 |
commit | 280a77fbb2f13fe99641f576247676d03b475c93 (patch) | |
tree | ed192f0951017e9f4ecc46abb1c30c0a55bc460f /client/engine | |
parent | ac2d1cc7e4de0632d458c69d3305c72d1d4b6156 (diff) |
#1033: Formatear la caché compatible con versiones 4.x y 5.x de Linux.
Diffstat (limited to 'client/engine')
-rwxr-xr-x | client/engine/Cache.lib | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/client/engine/Cache.lib b/client/engine/Cache.lib index 40715946..cacba40d 100755 --- a/client/engine/Cache.lib +++ b/client/engine/Cache.lib @@ -275,7 +275,7 @@ ogDevToDisk ${PART%% *} 2>/dev/null function ogFormatCache () { # Variables locales. -local DEV MNTDIR +local DEV MNTDIR OPTIONS # Si se solicita, mostrar ayuda. if [ "$*" == "help" ]; then ogHelp "$FUNCNAME" "$FUNCNAME" @@ -288,7 +288,9 @@ DEV=$(ogDiskToDev $DEV) || return $? # Formatear sistema de ficheros. ogUnmountCache 2>/dev/null -mkfs.ext4 -q -F $DEV -L "CACHE" -O extent,large_file 2>/dev/null || ogRaiseError $OG_ERR_PARTITION "CACHE" || return $? +OPTIONS="extent,large_file" +[[ $(uname -r) =~ ^5 ]] && OPTIONS+=",uninit_bg,^metadata_csum,^64bit" +mkfs.ext4 -q -F $DEV -L "CACHE" -O "$OPTIONS" 2>/dev/null || ogRaiseError $OG_ERR_PARTITION "CACHE" || return $? # Crear estructura básica. MNTDIR=$(ogMountCache) |