feat: Add complete iSCSI target management to Web UI- Add iSCSI tab with full target management- Implement create/delete targets with auto-generated IQN- Add LUN (backing store) management- Implement initiator ACL management (bind/unbind)- Add real-time target listing with LUN/ACL counts- Add comprehensive iSCSI management guide- Update sudoers to allow tgtadm commands- Add tape management features (create/list/delete/bulk delete)- Add service status monitoring- Security: Input validation, path security, sudo restrictions- Tested: Full CRUD operations working- Package size: 29KB, production ready
This commit is contained in:
47
scripts/load-mhvtl.sh
Executable file
47
scripts/load-mhvtl.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
NC='\033[0m'
|
||||
|
||||
print_info() {
|
||||
echo -e "${YELLOW}➜${NC} $1"
|
||||
}
|
||||
|
||||
print_success() {
|
||||
echo -e "${GREEN}✓${NC} $1"
|
||||
}
|
||||
|
||||
print_error() {
|
||||
echo -e "${RED}✗${NC} $1"
|
||||
}
|
||||
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
print_error "Please run as root or with sudo"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
print_info "Loading mhvtl kernel modules..."
|
||||
|
||||
if lsmod | grep -q mhvtl; then
|
||||
print_info "mhvtl modules already loaded"
|
||||
else
|
||||
if [ -f /lib/modules/$(uname -r)/kernel/drivers/scsi/mhvtl.ko ]; then
|
||||
modprobe mhvtl
|
||||
print_success "mhvtl kernel module loaded"
|
||||
else
|
||||
print_info "Kernel module not found, using userspace mode"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f /usr/bin/vtllibrary ]; then
|
||||
print_success "mhvtl is ready"
|
||||
echo ""
|
||||
print_info "Start mhvtl daemon with: systemctl start mhvtl"
|
||||
else
|
||||
print_error "mhvtl binaries not found"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user