<commit_before>#!/bin/bash

ISCSIADM=/sbin/iscsiadm

UUID_URL=$1
DEVICE_LINK=$2
DEVICE_MARKER=$DEVICE_LINK.iscsi.uuid

# Hardcoded (for now) portal information. 
PORTAL_IP=192.168.3.11
PORTAL_PORT=3260
PORTAL="$PORTAL_IP:$PORTAL_PORT"

# Disk name information. 
DISK_PREFIX="iqn.2011-01.eu.stratuslab"
DISK_UUID=`echo $UUID_URL | cut -d : -f 2`
DISK="$DISK_PREFIX:$DISK_UUID"

DISK_PATH="/dev/disk/by-path/ip-$PORTAL-iscsi-$DISK-lun-0"

# Must contact the server to discover what disks are available.
DISCOVER_CMD="$ISCSIADM --mode discovery --type sendtargets --portal $PORTAL"
echo $DISCOVER_CMD
$DISCOVER_CMD

# Attach the iSCSI disk on the host.
ATTACH_CMD="$ISCSIADM --mode node --portal $PORTAL --targetname $DISK --login"
echo $ATTACH_CMD
$ATTACH_CMD

# Ensure that the disk device aliases are setup. 
sleep 2

# Get the real device name behind the alias and link to it.
REAL_DEV=`readlink -e -n $DISK_PATH`
LINK_CMD="ln -s $REAL_DEV $DEVICE_LINK"<commit_msg>Use lun 1 instead of lun 0 when mounting disk<commit_after>#!/bin/bash

ISCSIADM=/sbin/iscsiadm

UUID_URL=$1
DEVICE_LINK=$2
DEVICE_MARKER=$DEVICE_LINK.iscsi.uuid

# Hardcoded (for now) portal information. 
PORTAL_IP=192.168.3.11 # onehost-2.lal.in2p3.fr
PORTAL_PORT=3260
PORTAL="$PORTAL_IP:$PORTAL_PORT"

# Disk name information. 
DISK_PREFIX="iqn.2011-01.eu.stratuslab"
DISK_UUID=`echo $UUID_URL | cut -d : -f 2`
DISK="$DISK_PREFIX:$DISK_UUID"

DISK_PATH="/dev/disk/by-path/ip-$PORTAL-iscsi-$DISK-lun-1"

# Must contact the server to discover what disks are available.
DISCOVER_CMD="$ISCSIADM --mode discovery --type sendtargets --portal $PORTAL"
echo $DISCOVER_CMD
$DISCOVER_CMD

# Attach the iSCSI disk on the host.
ATTACH_CMD="$ISCSIADM --mode node --portal $PORTAL --targetname $DISK --login"
echo $ATTACH_CMD
$ATTACH_CMD

# Ensure that the disk device aliases are setup. 
sleep 2

# Get the real device name behind the alias and link to it.
REAL_DEV=`readlink -e -n $DISK_PATH`
LINK_CMD="ln -s $REAL_DEV $DEVICE_LINK"
{'fraction_non_alphanumeric': 0.1231774761186526, 'fraction_numerical': 0.026646556058320763, 'mean_word_length': 4.9226190476190474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '977732', 'n_tokens_mistral': 828, 'n_tokens_neox': 776, 'n_words': 195}