<commit_before>#!/usr/bin/env bash
# as root

EXTRA_VOLUME=galaxy-data # adapt to the name of the GCE extra volume available on the web interface
# Be careful to point to the correct interface (here sdb with one extra volume)
DEVICE=/dev/sdb

# see https://cloud.google.com/compute/docs/disks/add-persistent-disk for adding persistent disk to gce instances

# Format and attach an extra volume (ext4 formated) to the gce main instance
mkfs.ext4 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/disk/by-id/google-$EXTRA_VOLUME
mkdir -p /mnt/disks/$EXTRA_VOLUME
mount -o discard,defaults /dev/disk/by-id/google-$EXTRA_VOLUME /mnt/disks/$EXTRA_VOLUME
chmod a+w /mnt/disks/$EXTRA_VOLUME
echo "$DEVICE /mnt/disks/$EXTRA_VOLUME ext4 defaults 0 0" | sudo tee -a /etc/fstab # to get persistent mounting<commit_msg>now mount volume with UUID and adapt potential mount failing to unbutu 14.04<commit_after>#!/usr/bin/env bash
# as root

EXTRA_VOLUME=galaxy-data # adapt to the name of the GCE extra volume available on the web interface
# Be careful to point to the correct interface (here sdb with one extra volume)
DEVICE=/dev/sdb

# see https://cloud.google.com/compute/docs/disks/add-persistent-disk for adding persistent disk to gce instances

# Format and attach an extra volume (ext4 formated) to the gce main instance
mkfs.ext4 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/disk/by-id/google-$EXTRA_VOLUME
mkdir -p /mnt/$EXTRA_VOLUME
mount -o discard,defaults /dev/disk/by-id/google-$EXTRA_VOLUME /mnt/$EXTRA_VOLUME
chmod a+w /mnt/$EXTRA_VOLUME

# to get persistent mounting
echo UUID=`sudo blkid -s UUID -o value /dev/sdb` /mnt/$EXTRA_VOLUME ext4 discard,defaults,nobootwait 0 2 | sudo tee -a /etc/fstab
{'fraction_non_alphanumeric': 0.09692396982008125, 'fraction_numerical': 0.01044689495066744, 'mean_word_length': 4.5792880258899675, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7135280', 'n_tokens_mistral': 631, 'n_tokens_neox': 601, 'n_words': 191}