Skip to content

Instantly share code, notes, and snippets.

View Promit's full-sized avatar

Promit Roy Promit

  • SlimDX Consulting
View GitHub Profile
@Promit
Promit / partition_mach2.sh
Created September 13, 2024 21:35
Simplified Linux partitioning script for Seagate Mach.2 drives
#!/bin/bash
# Check if a LUN is provided as an argument
if [ -z "$1" ]; then
echo "Usage: $0 <lun-from-/dev/disk/by-id>"
exit 1
fi
# Validate the LUN path and ensure it's under /dev/disk/by-id
LUN="$1"
/*This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit