Skip to content

Commit

Permalink
fix: configure clusters in OCFS2
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoaldamav committed Oct 31, 2023
1 parent 21191eb commit 31c9947
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
linux-e2e:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
fs: ['btrfs', 'xfs', 'ocfs2']
steps:
Expand Down
14 changes: 12 additions & 2 deletions scripts/linux-ocfs2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,23 @@
# Install required package for OCFS2
echo "::group::Install OCFS2 Tools"
sudo apt-get update
sudo apt-get install -y ocfs2-tools
sudo apt-get install -y ocfs2-tools ocfs2console
echo "::endgroup::"

# Configure Cluster
echo "::group::Configure Cluster"
sudo o2cb init-node test-node
sudo o2cb add-cluster test-cluster
sudo o2cb add-node test-cluster test-node --ip 127.0.0.1
sudo o2cb heartbeat-mode test-cluster global
sudo o2cb online-cluster test-cluster
echo "::endgroup::"

# Prepare Disk
echo "::group::Prepare Disk"
sudo mkdir -p /mnt/ocfs2
sudo mkfs.ocfs2 -b 4K -C 32K -L "OCFS2Volume" /dev/sdb
sudo mount -t ocfs2 -o local /dev/sdb /mnt/ocfs2
sudo mount -t ocfs2 /dev/sdb /mnt/ocfs2
echo "::endgroup::"

# Create "code" directory in the OCFS2 volume
Expand All @@ -21,3 +30,4 @@ sudo chown -R $USER:$USER /mnt/ocfs2/code

# Give full permissions to the current user
sudo chmod -R 777 /mnt/ocfs2/code

0 comments on commit 31c9947

Please sign in to comment.