Created
June 28, 2023 22:01
-
-
Save goller/52a0bfb8d7806e3c8152962b2b13c27f to your computer and use it in GitHub Desktop.
ceph xfs vs ext4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -xe | |
ceph version | |
echo ext4 | |
rbd create goller-test-image --size 800GB | |
rbd map goller-test-image | |
mkfs -t ext4 /dev/rbd0 | |
sleep 10 | |
rbd du --exact goller-test-image | |
rbd du goller-test-image | |
mount /dev/rbd0 /mnt | |
dd if=/dev/urandom of=/mnt/1g.bin bs=64M count=16 | |
sleep 30 | |
rbd du --exact goller-test-image | |
rbd du goller-test-image | |
rm /mnt/1g.bin | |
sleep 30 | |
rbd du --exact goller-test-image | |
rbd du goller-test-image | |
fstrim -v /mnt | |
fstrim -v /mnt | |
fstrim -v /mnt | |
sleep 30 | |
rbd du --exact goller-test-image | |
rbd du goller-test-image | |
umount /mnt | |
rbd unmap goller-test-image | |
rbd rm goller-test-image | |
echo xfs | |
rbd create goller-test-image --size 800GB | |
rbd map goller-test-image | |
mkfs -t xfs -f /dev/rbd0 | |
sleep 10 | |
rbd du --exact goller-test-image | |
rbd du goller-test-image | |
mount /dev/rbd0 /mnt | |
dd if=/dev/urandom of=/mnt/1g.bin bs=64M count=16 | |
sleep 30 | |
rbd du --exact goller-test-image | |
rbd du goller-test-image | |
rm /mnt/1g.bin | |
sleep 30 | |
rbd du --exact goller-test-image | |
rbd du goller-test-image | |
fstrim -v /mnt | |
fstrim -v /mnt | |
fstrim -v /mnt | |
sleep 30 | |
rbd du --exact goller-test-image | |
rbd du goller-test-image | |
umount /mnt | |
rbd unmap goller-test-image | |
rbd rm goller-test-image |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment