JBOD Setup Checklist

Multi-Bay External Enclosure Configuration for Linux/UNIX Systems
Mediasonic ProBox HF2-SU3S2 (4-Bay USB 3.0)

Pre-Installation Preparation

TIP: Label drives before installation with filesystem labels or physical labels matching intended mount points.

Physical Installation

NOTE: Most USB enclosures support hot-swap, but initial setup should be done with system powered off for safety.

Drive Detection Verification

# Check kernel ring buffer for USB/drive detection dmesg | tail -50 dmesg | grep -i usb dmesg | grep sd[a-z] # List all block devices with details lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL,UUID,MOUNTPOINT # Alternative detailed view sudo fdisk -l # Check USB connection details lsusb -t
WARNING: Device names (/dev/sdX) may change between reboots. Always use UUID or LABEL for fstab entries.

Filesystem Check and Identification

# Display UUIDs and labels for all block devices sudo blkid # Check specific drive details sudo blkid /dev/sda1 sudo blkid /dev/sdb1 sudo blkid /dev/sdc1 sudo blkid /dev/sdd1 # Display filesystem labels lsblk -o NAME,LABEL,UUID,FSTYPE # Check filesystem integrity (unmounted drives only) sudo fsck -n /dev/sda1 # -n flag for no changes (dry run)

Filesystem Labeling (Optional but Recommended)

# Label ext2/ext3/ext4 filesystems sudo e2label /dev/sda1 DISK1 sudo e2label /dev/sdb1 DISK2 sudo e2label /dev/sdc1 DISK3 sudo e2label /dev/sdd1 DISK4 # Verify labels sudo e2label /dev/sda1 # For XFS filesystems sudo xfs_admin -L "DISK1" /dev/sda1 # For other filesystem types, consult appropriate tools # (tune2fs for ext, xfs_admin for XFS, etc.)
TIP: Use descriptive labels that indicate content or purpose (e.g., BACKUP2024, ARCHIVE01, PROJECTS).

Mount Point Creation

# Create mount points sudo mkdir -p /mnt/disk1 sudo mkdir -p /mnt/disk2 sudo mkdir -p /mnt/disk3 sudo mkdir -p /mnt/disk4 # Alternatively, create with single command sudo mkdir -p /mnt/disk{1,2,3,4} # Set ownership (optional, adjust as needed) sudo chown $USER:$USER /mnt/disk1 # Or keep as root-owned and mount with user access options

Manual Mount Testing

# Test mount using UUID (recommended) sudo mount UUID=xxxx-xxxx-xxxx-xxxx /mnt/disk1 # Or using device name (temporary testing only) sudo mount /dev/sda1 /mnt/disk1 # Verify mount mount | grep disk1 df -h /mnt/disk1 # Test read access ls -la /mnt/disk1 # Test write access (if appropriate) touch /mnt/disk1/test-file rm /mnt/disk1/test-file # Unmount when done testing sudo umount /mnt/disk1
NOTE: For read-only media or archive drives, add 'ro' option to mount command.

fstab Configuration

# Backup fstab sudo cp /etc/fstab /etc/fstab.backup.$(date +%Y%m%d) # Edit fstab sudo vi /etc/fstab # Example fstab entries using UUID: UUID=1234-5678-90ab-cdef /mnt/disk1 ext4 defaults,noatime 0 2 UUID=abcd-ef12-3456-7890 /mnt/disk2 ext4 defaults,noatime 0 2 UUID=5678-90ab-cdef-1234 /mnt/disk3 ext4 defaults,noatime 0 2 UUID=ef12-3456-7890-abcd /mnt/disk4 ext4 defaults,noatime 0 2 # Example using LABELs: LABEL=DISK1 /mnt/disk1 ext4 defaults,noatime 0 2 LABEL=DISK2 /mnt/disk2 ext4 defaults,noatime 0 2 LABEL=DISK3 /mnt/disk3 ext4 defaults,noatime 0 2 LABEL=DISK4 /mnt/disk4 ext4 defaults,noatime 0 2 # For read-only mounts (archives/backups): UUID=xxxx /mnt/disk1 ext4 ro,noatime 0 0 # Test fstab without rebooting sudo mount -a # Verify all mounts successful mount | grep /mnt/disk df -h
WARNING: Errors in /etc/fstab can prevent system boot. Always test with 'mount -a' before rebooting.

Common Mount Options Explained

# defaults - Use default options (rw, suid, dev, exec, auto, nouser, async) # noatime - Don't update access times (improves performance) # ro - Read-only mount # rw - Read-write mount # auto - Mount automatically at boot # noauto - Don't mount automatically (require manual mount) # user - Allow regular users to mount # nouser - Only root can mount (default) # exec - Allow execution of binaries # noexec - Prevent execution of binaries (security) # nofail - Don't report errors if device doesn't exist (useful for removable media) # Example for search-only archive drives: LABEL=ARCHIVE /mnt/archive ext4 ro,noatime,noexec,nofail 0 0

System Integration Testing

# Reboot to test automatic mounting sudo reboot # After reboot, verify all drives mounted df -h | grep /mnt mount | grep /mnt/disk # Test file search across all mounted drives grep -r "search_pattern" /mnt/disk*/ # Or using find find /mnt/disk* -type f -name "*.conf" # Test manual umount/mount sudo umount /mnt/disk1 sudo mount /mnt/disk1

Documentation and Maintenance

# Create documentation file cat >jbod-config.txt << 'EOF' JBOD Configuration - Mediasonic ProBox HF2-SU3S2 Date: $(date) System: $(hostname) Drive Mapping: Bay 1: /dev/sda -> /mnt/disk1 (UUID: xxxx) [DISK1] Bay 2: /dev/sdb -> /mnt/disk2 (UUID: yyyy) [DISK2] Bay 3: /dev/sdc -> /mnt/disk3 (UUID: zzzz) [DISK3] Bay 4: /dev/sdd -> /mnt/disk4 (UUID: wwww) [DISK4] Serial Numbers: Disk1: S/N xxxxx Disk2: S/N yyyyy Disk3: S/N zzzzz Disk4: S/N wwwww EOF # Check drive health periodically sudo smartctl -a /dev/sda | less sudo smartctl -H /dev/sda # Quick health summary # Create cron job for periodic SMART checks (optional) # Add to crontab: 0 2 * * 0 /usr/sbin/smartctl -H /dev/sda >> /var/log/disk-health.log

Troubleshooting Common Issues

Drives Not Detected

# Check USB connection lsusb dmesg | grep -i usb # Verify power to enclosure # - Check power LED on enclosure # - Verify power supply voltage # - Try different USB port # Check for USB controller issues lspci | grep -i usb

Drives Enumerate in Different Order

SOLUTION: This is why we use UUID or LABEL in fstab instead of /dev/sdX device names.

Mount Fails at Boot

# Boot to single-user mode or recovery # Check system logs journalctl -xb | grep mount tail -100 /var/log/syslog | grep mount # Verify fstab syntax cat /etc/fstab # Test mount manually sudo mount -a -v # Verbose output # Add 'nofail' option if drive may be disconnected at boot

Permission Denied When Accessing Files

# Check ownership and permissions ls -la /mnt/disk1 # Fix ownership if needed sudo chown -R $USER:$USER /mnt/disk1 # Or adjust mount options in fstab # Add uid=1000,gid=1000 for specific user access

Quick Reference Commands

# List all block devices lsblk # Show UUIDs sudo blkid # Mount all fstab entries sudo mount -a # Show mounted filesystems mount df -h # Unmount safely sudo umount /mnt/disk1 # Check if filesystem is mounted mountpoint /mnt/disk1 # Search across all JBOD drives grep -r "pattern" /mnt/disk*/ find /mnt/disk* -name "filename" # Check drive health sudo smartctl -H /dev/sda

Post-Setup Checklist