setup: add the lazytime XFS version
Starting with kernel 4.17 XFS will support the lazytime mount option. That will be beneficial for Scylla as updating times synchronously is one of our current sources of stalls. Fortunately, older kernels are able to parse the option and just ignore it. We verified that to be the case in a 4.15 kernel on ubuntu. Therefore, just add the option unconditionally. Signed-off-by: Glauber Costa <glauber@scylladb.com> Message-Id: <20180920170017.13215-1-glauber@scylladb.com>
This commit is contained in:
committed by
Avi Kivity
parent
0bf9a78c78
commit
f828fe0d59
4
dist/common/scripts/scylla_raid_setup
vendored
4
dist/common/scripts/scylla_raid_setup
vendored
@@ -128,7 +128,7 @@ if __name__ == '__main__':
|
||||
f.write(res)
|
||||
|
||||
makedirs(mount_at)
|
||||
run('mount -t xfs -o noatime {raid} "{mount_at}"'.format(raid=fsdev, mount_at=mount_at))
|
||||
run('mount -t xfs -o noatime,lazytime {raid} "{mount_at}"'.format(raid=fsdev, mount_at=mount_at))
|
||||
|
||||
makedirs('{}/data'.format(root))
|
||||
makedirs('{}/commitlog'.format(root))
|
||||
@@ -146,7 +146,7 @@ if __name__ == '__main__':
|
||||
match = re.search(r'^/dev/\S+: (UUID="\S+")', res.strip())
|
||||
uuid = match.group(1)
|
||||
with open('/etc/fstab', 'a') as f:
|
||||
f.write('{uuid} {mount_at} xfs noatime,nofail 0 0\n'.format(uuid=uuid, mount_at=mount_at))
|
||||
f.write('{uuid} {mount_at} xfs noatime,nofail,lazytime 0 0\n'.format(uuid=uuid, mount_at=mount_at))
|
||||
mounts_conf = '/etc/systemd/system/scylla-server.service.d/mounts.conf'
|
||||
if not os.path.exists(mounts_conf):
|
||||
makedirs('/etc/systemd/system/scylla-server.service.d/')
|
||||
|
||||
Reference in New Issue
Block a user