Skip to content

Commit

Permalink
scylla_raid_setup: make --online-discard argument useful
Browse files Browse the repository at this point in the history
This argument was dead since its introduction and 'discard' was
always configured regardless of its value.
This patch allows actually configuring things using this argument.

Fixes #14963

Closes #14964

(cherry picked from commit e13a2b6)
  • Loading branch information
vladzcloudius authored and denesb committed Aug 22, 2023
1 parent eae8a18 commit 12a3c20
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dist/common/scripts/scylla_raid_setup
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import os
import argparse
import distutils.util
import pwd
import grp
import sys
Expand Down Expand Up @@ -37,11 +38,14 @@ if __name__ == '__main__':
help='force constructing RAID when only one disk is specified')
parser.add_argument('--raid-level', default='0',
help='specify RAID level')
parser.add_argument('--online-discard', default=True,
parser.add_argument('--online-discard', default="True",
help='Enable XFS online discard (trim SSD cells after file deletion)')

args = parser.parse_args()

# Allow args.online_discard to be used as a boolean value
args.online_discard = distutils.util.strtobool(args.online_discard)

root = args.root.rstrip('/')
if args.volume_role == 'all':
mount_at=root
Expand Down

0 comments on commit 12a3c20

Please sign in to comment.