autoNAS / CHANGELOG.md
Newer Older
613 lines | 30.172kb
Bogdan Timofte authored 3 months ago
1
# AutoNAS - Change Log
2

            
Bogdan Timofte authored 2 weeks ago
3
## [v3.2.0] - 2026-05-18
4

            
5
### Enhanced Media Importer (v2.0)
6

            
7
- **autonas-media-importer.sh**: Completely refactored with advanced features:
8
  - Organization patterns support: `ymd` (default), `ym`, `y`, `m`, `d`, `h` for flexible folder structures
9
  - Filename modes: `full` (timestamp), `auto` (pattern-based), `orig` (preserve original)
10
  - Date source options: `auto`, `exif`, `filesystem` for flexible date extraction
11
  - Advanced EXIF parsing with fallback to filesystem timestamps
12
  - GoPro special handling with THM/LRV sidecar file detection
13
  - Explicit `--unattended` support for background imports
14
  - Automatic SD/MMC udev attach support for GoPro cards exposed as `/dev/mmcblkNpM`
15
  - Per-card import locking to ignore duplicate udev/systemd starts
16
  - Verified copy-then-delete moves, preventing partial destination files when SD/MMC reads fail
17
  - GoPro metadata rewrites now happen in `/dev/shm` staging when space allows
18
  - Imported files now keep filesystem mtime aligned with the chosen capture timestamp
19
  - GoPro filesystem timestamp selection now uses the MP4 file itself, not THM/LRV sidecars
20
  - GoPro QuickTime integer dates are written with `QuickTimeUTC=1` so local camera time is stored as UTC metadata correctly
21
  - QuickTime UTC date conversion for accurate timestamps
22
  - Conflict resolution with automatic numeric suffix generation
23
  - Unsortable file collection into dedicated directory
24
  - Enhanced error handling and detailed logging
25
  - Backward compatible with existing autonas-core.sh integration
26

            
27
- **standalone-media-importer.sh**: Updated to v1.0 with full feature parity
28
  - Complete rewrite with all advanced features for standalone use
29
  - Dry-run mode for safe previewing of import operations
30
  - Comprehensive reporting and statistics
31

            
32
- Both scripts maintain 100% backward compatibility with positional arguments: `script.sh <source_mount> <destination_path> --verbose`
33

            
Bogdan Timofte authored 3 months ago
34
## [v3.1.2] - 2026-03-07
35

            
36
### Fixed
37
- motivatie: topologiile AutoNAS self-hosted pot monta exportul local inapoi ca storage Proxmox, iar shutdown-ul devenea dependent de o cursa implicita intre `umount.nfs4` si oprirea `nfs-server.service`
Bogdan Timofte authored 3 months ago
38
- solutie: installerul genereaza acum un drop-in pentru `nfs-server.service` care ordoneaza explicit mount-urile Proxmox self-hosted identificate din `storage.cfg` inaintea opririi providerului NFS; aceasta este partea AutoNAS din incidentul cluster-wide `ISSUE-2026-002`
Bogdan Timofte authored 3 months ago
39

            
Bogdan Timofte authored 3 months ago
40
## [v3.1.1] - 2026-03-07
41

            
42
### Fixed
43
- kept `autonas.service` and `autonas-boot-scan.service` ordered before `remote-fs.target` and `umount.target` so local AutoNAS exports remain available long enough for Proxmox NFS client mounts to unmount during shutdown
44
- reduced reboot delay observed on `ebony` when `AutoNAS-1` is exported locally and also mounted back as a Proxmox NFS storage
45

            
46
### Notes
47
- this does not remove all self-hosted NFS edge cases; it only prevents the provider side from stopping before the client-side unmount phase finishes
48
- PBS availability loss during `pgs suspend` on `ebony` remains expected while VM `301 is-anjohibe` is intentionally suspended
49

            
Bogdan Timofte authored 3 months ago
50
## [v3.1.0] - 2026-03-06
51

            
52
### Standardized Install Layout
53
- standardized runtime under `/usr/local/lib/xdev/autonas`
54
- moved the operator-facing command to `/usr/local/sbin/autonas`
55
- standardized canonical uninstall path to `/usr/local/lib/xdev/autonas/uninstall.sh`
56
- added `/etc/default/xdev-autonas` as the namespaced defaults location
57
- added installed documentation under `/usr/local/share/doc/xdev/autonas`
58
- updated systemd units and udev rules to use the namespaced runtime path
59
- preserved cluster-shared config in `/etc/pve/autonas`
60
- preserved `/mnt/autonas` and NFS export references as explicit uninstall exceptions
Bogdan Timofte authored 3 months ago
61

            
Bogdan Timofte authored 3 months ago
62
## [v3.0.1] - 2026-03-02
63

            
64
### 🔧 CLI Simplification
65

            
66
#### Removed Redundant Disk Commands
67
- **Removed** `autonas mount` and `autonas unmount/umount` from user-facing CLI
68
- **Standardized disk operations** on `autonas attach` and `autonas detach`
69
- **Updated help output and documentation** to reflect the simplified command set
70

            
71
#### Why This Change
72
- Reduced command redundancy and ambiguity between attach/detach vs mount/unmount
73
- Clearer operational model for both manual and automated workflows
74

            
Bogdan Timofte authored 3 months ago
75
## [v3.0.0] - 2025-08-15 🚀
76

            
77
### 🎉 **CLEAN USER INTERFACE & SCRIPT ORGANIZATION**
78

            
79
#### 🔧 Complete Script Architecture Refactoring
80
- **Single User Command**: Only `autonas` visible in shell autocomplete
81
- **Internal Script Organization**: All utility scripts moved to `/usr/local/lib/autonas/`
82
- **47% Code Reduction**: ~2,300 lines eliminated through deduplication
83
- **Single Source of Truth**: All shared functions in `autonas-core.sh` library
84

            
85
#### 📁 New Script Architecture
86
```
87
/usr/local/bin/
88
├── autonas -> autonas.sh          # Only user-visible command
89
├── autonas.sh                     # Main CLI interface (1,208 lines)
90
└── autonas-core.sh                # Core business logic library (1,044 lines)
91

            
92
/usr/local/lib/autonas/            # Internal scripts (hidden from autocomplete)
93
├── autonas-boot-scan.sh           # Boot scanner
94
├── autonas-disk-handler.sh        # Disk event handler
95
├── autonas-media-importer.sh      # Media importer
96
├── autonas-network-handler.sh     # Network handler
97
├── autonas-udev-wrapper.sh        # Udev wrapper
98
└── autonas-uninstall.sh           # System uninstaller
99
```
100

            
101
#### 🎯 Clean User Experience
102
- **Professional Interface**: Only `autonas` command appears in tab completion
103
- **Unified Functionality**: All operations through single command interface
104
- **Organized Backend**: All system utilities properly categorized and hidden
105
- **Zero Code Duplication**: Complete elimination of duplicate functions
106

            
107
#### 🔄 Revolutionary Background Import Architecture (Preserved)
108
- **Service-Based Import System**: Complete separation of mount/import through systemd services
109
- **Unlimited Import Duration**: No more systemd timeout constraints (tested with 300+ files)
110
- **Production Scalability**: Architecture tested and validated in production environment
111

            
112
#### �️ **Complete System Integration Updates**
113
- **All Service Files**: Updated systemd services with new script paths
114
- **All udev Rules**: Updated with `/usr/local/lib/autonas/` paths
115
- **All Configuration References**: Updated throughout entire system
116
- **Deploy Script**: Enhanced with directory creation and proper installation
117
- **Install/Uninstall**: Complete support for new architecture
118

            
119
#### 🔧 **Technical Architecture Improvements**
120
- **Core Library Pattern**: `autonas-core.sh` with all shared business logic
121
- **Clean Separation**: User interface vs. system utilities properly organized
122
- **Professional Deployment**: Only essential commands visible to users
123
- **Backward Compatibility**: Seamless upgrade path from previous versions
124

            
125
#### 📊 **Production Test Results** (Background Import)
126
- **✅ 302 files imported** successfully in single session (36 minutes)
127
- **✅ 100% success rate** with zero errors
128
- **✅ Perfect UTC conversion** for all QuickTime/EXIF timestamps
129
- **✅ Complete workflow** mount → background import → auto unmount
130
- **✅ Robust error handling** and disconnect detection
131

            
132
#### 🚨 **Architecture Changes**
133
- **Script Locations**: Internal scripts moved from `/usr/local/bin/` to `/usr/local/lib/autonas/`
134
- **User Interface**: Single `autonas` command replaces multiple visible scripts
135
- **Configuration Updates**: All references updated throughout system
136
- **Clean Autocomplete**: Professional user experience with hidden utilities
137

            
138
---
139

            
140
## [v2.5.0] - 2024-08-12
141

            
142
### 🚀 Dual Configuration System
143

            
144
#### Enhanced Mounting Options
145
- **Dual Configuration Support**: Complete system supporting both NFS shares and simple local mounts
146
  - **NFS share complet**: Cu IP și export pentru acces de rețea
147
  - **Montare locală simplă**: Doar mount point, fără IP și NFS (NOUĂ!)
148
- **LOCAL Configuration Format**: New `UUID:NAME:LOCAL:LOCAL:MOUNT_POINT:LOCAL` format
149
- **Interactive Configuration Selection**: Enhanced `autonas-config.sh add` with mount type selection
150
- **Mixed Environment Support**: Both NFS and LOCAL configurations can coexist seamlessly
151

            
152
#### Core System Improvements
153
- **Extended UUID Support**: Support for both standard UUIDs and FAT32 short UUIDs (e.g., `8765-4321`)
154
- **Enhanced Manager Integration**: Complete autonas-manager.sh support for LOCAL configurations
155
- **Clean Logging**: LOCAL configurations show "Skipping X for local mount configuration" instead of errors
156
- **Synchronized Disk Display**: Fixed desynchronization between disk display and mapping logic
157

            
158
#### Bug Fixes Resolved
159
- **Disk Selection Mapping Bug**: Fixed issue where selecting disk 6 would map to wrong UUID
160
- **LOG Spam Resolution**: Eliminated infinite "Waiting for interface LOCAL" loops
161
- **UUID Regex Enhancement**: Updated regex pattern to handle FAT32 short UUIDs properly
162
- **Manager Function Updates**: All network-related functions now properly detect and skip LOCAL configurations
163

            
164
#### Technical Implementation
165
```bash
166
# NFS Configuration (existing)
167
UUID:NAME:IP:INTERFACE:MOUNT_POINT:NFS_OPTIONS
168

            
169
# LOCAL Configuration (new)
170
UUID:NAME:LOCAL:LOCAL:MOUNT_POINT:LOCAL
171
```
172

            
173
#### Manager Function Enhancements
174
- **`activate_ip()`**: Skips IP activation for LOCAL configurations
175
- **`deactivate_ip()`**: Skips IP deactivation for LOCAL configurations
176
- **`add_nfs_export()`**: Skips NFS export for LOCAL configurations
177
- **`remove_nfs_export()`**: Skips NFS export removal for LOCAL configurations
178

            
179
#### Use Cases for LOCAL Configurations
180
- **Simple local storage**: Diskuri pentru backup-uri locale fără acces de rețea
181
- **Scratch space**: Space temporar pentru procesare locală de date
182
- **Development storage**: Storage local pentru cache-uri și fișiere temporare
183
- **Archive storage**: Archive locale care nu necesită export NFS
184
- **Mixed environments**: Combinație de storage local și shares de rețea
185

            
186
#### Configuration Examples
187
```properties
188
# NFS Shares (network access)
189
920fe1b7-4091-4d6a-bab8-2f48d8d704bc:shared-docs:192.168.1.100:eth0:/mnt/autonas/shared-docs:*(rw,all_squash,insecure,async,no_subtree_check,anonuid=0,anongid=0)
190

            
191
# LOCAL Mounts (local only)
192
8765-4321:local-backup:LOCAL:LOCAL:/mnt/autonas/local-backup:LOCAL
193
abcd-1234:scratch-space:LOCAL:LOCAL:/mnt/autonas/scratch-space:LOCAL
194
```
195

            
196
#### Backward Compatibility
197
- **Full compatibility**: Existing NFS configurations continue to work unchanged
198
- **No migration required**: Current setups work without any changes
199
- **Enhanced functionality**: New LOCAL options available alongside existing NFS features
200

            
201
## [v2.4.0] - 2025-08-11
202

            
203
### 🌐 Interface Stability Management System
204

            
205
#### Problema Rezolvată
206
- **USB/Thunderbolt interfaces instabile**: Interfețele USB și Thunderbolt dispar și revin periodic
207
- **IP-uri pierdute**: IP-urile configurate pentru diskuri nu se readaugă automat când interfața revine
208
- **NFS exports indisponibile**: Export-urile devin temporar inaccesibile din cauza IP-urilor lipsă
209

            
210
#### Interface Management Tools
211
- **autonas-interface-handler.sh**: Handler principal pentru evenimente udev de interfețe
212
- **Event-driven only**: Arhitectură complet bazată pe evenimente (fără daemon/servicii permanente)
213
- **Emergency diagnostics**: Tool-uri de diagnostic pentru depanare în cazuri extreme
214

            
215
#### Interface Handler System
216
- **autonas-interface-handler.sh**: Handler principal pentru evenimente udev de interfețe
217
- **Event-driven architecture**: Răspuns instant la schimbările interfețelor (nu polling)
218
- **Multiple event types**: Detectează add/remove/change/carrier/operstate events
219
- **Focus USB/Thunderbolt**: Tratament special pentru interfețele instabile
220
- **Smart restoration**: Verifică starea interfețelor înainte de configurare IP
221
- **Background processing**: Execuție asincronă pentru a evita timeout-urile udev
222
- **Retry mechanism**: Logică de retry pentru configurarea IP-urilor pe interfețe instabile
223

            
224
#### Advanced IP Management
225
- **Interface existence checking**: Verificare inteligentă dacă interfața există înainte de configurare
226
- **IP conflict resolution**: Detectează și evită conflictele de IP-uri
227
- **Retry mechanism**: Logic de retry pentru configurarea IP-urilor pe interfețe instabile
228
- **Shared IP management**: Gestionarea corectă a IP-urilor folosite de multiple diskuri
229
- **Wait for interface**: Așteaptă ca interfețele USB/Thunderbolt să apară (până la 30 secunde)
230

            
231
#### Comprehensive Debug Tools
232
- **autonas-interface-debug.sh**: Tool complet de diagnostic pentru probleme interfețe
233
- **Status analysis**: Analiză detaliată a statusului interfețelor și IP-urilor configurate
234
- **Real-time monitoring**: Monitorizare în timp real a schimbărilor de interfețe
235
- **Configuration validation**: Verificare configurații AutoNAS vs. starea actuală
236
- **Troubleshooting guide**: Sugestii automate pentru rezolvarea problemelor
237
- **Color-coded output**: Interface prietenoasă cu coding color pentru status
238

            
239
#### Enhanced udev Rules
240
- **98-autonas-interfaces.rules**: Reguli udev comprehensive pentru interfețe de rețea
241
- **Event-driven primary mechanism**: Detectare principală prin evenimente, nu polling
242
- **Multiple trigger types**: add/remove/change/operstate/carrier events
243
- **USB/Thunderbolt specific**: Tratament special pentru interfețele instabile
244
- **State change monitoring**: Monitorizează schimbările de stare operațională și carrier
245
- **Instant response**: Răspuns în 2-3 secunde la schimbările interfețelor
246

            
247
#### Management Commands
248
```bash
249
# Debug interfețe și IP-uri
250
autonas-interface-debug.sh check
251

            
252
# Monitorizare timp real schimbări
253
autonas-interface-debug.sh realtime
254

            
255
# Test stabilitate interfețe USB/Thunderbolt
256
autonas-test-interface-stability.sh
257
```
258

            
259
#### Installation & Service Integration
260
- **Automatic installation**: Toate componentele sunt instalate automat de `install.sh`
261
- **Service auto-start**: Serviciul de monitorizare pornește automat la instalare
262
- **Initial restore**: Restaurare automată a IP-urilor la finalul instalării
263
- **Proper dependencies**: Dependențe corecte cu serviciile de rețea și NFS
264

            
265
### 🔧 Îmbunătățiri Core Manager
266

            
267
#### Smart IP Configuration
268
- **Interface existence validation**: Verifică dacă interfața există înainte de configurare
269
- **Wait for interface**: Logică de așteptare pentru interfețele care apar cu întârziere
270
- **Retry mechanism**: Până la 3 încercări pentru configurarea IP-urilor
271
- **Conflict detection**: Evită adăugarea IP-urilor deja configurate
272

            
273
#### Enhanced Error Handling
274
- **Detailed error reporting**: Mesaje de eroare mai descriptive
275
- **Recovery suggestions**: Sugestii pentru rezolvarea problemelor
276
- **Graceful degradation**: Continuă operațiunea chiar dacă unele componente eșuează
277

            
278
### 📚 Documentație Extinsă
279

            
280
#### New Troubleshooting Section
281
- **USB/Thunderbolt specific issues**: Secțiune dedicată pentru problemele interfețelor instabile
282
- **Debug commands**: Liste complete de comenzi pentru diagnosticare
283
- **Step-by-step solutions**: Soluții pas cu pas pentru probleme comune
284
- **Power management tips**: Sugestii pentru managementul power al USB
285

            
286
#### Updated Architecture Documentation
287
- **Interface monitoring flow**: Documentare completă a fluxului de monitorizare
288
- **Service interactions**: Interacțiunile între servicii și dependențele lor
289
- **Debug methodology**: Metodologie pentru diagnosticarea problemelor
290

            
291
### 🎯 Use Cases Noi
292

            
293
#### Unstable Interface Environments
294
- **USB docking stations**: Stații de andocare USB care se deconectează periodic
295
- **Thunderbolt hubs**: Hub-uri Thunderbolt cu conectivitate intermitentă
296
- **USB-C multiport adapters**: Adaptoare multiport cu stabilitate variabilă
297
- **Laptop docking scenarios**: Scenarii de laptop care se conectează/deconectează des
298

            
299
#### Enterprise Environment
300
- **Multiple identical setups**: Deploy pe multiple servere cu aceleași probleme interfețe
301
- **Centralized monitoring**: Monitorizare centralizată a stabilității interfețelor
302
- **Automated recovery**: Recuperare automată fără intervenție manuală
303

            
304
## [v2.3.0] - 2025-07-22
305

            
306
### 🚀 Boot Recovery System
307

            
308
#### Boot Scan Service
309
- **Automatic boot detection**: New `autonas-boot-scan.service` detects and mounts configured disks at system boot
310
- **Pre-connected disk support**: Handles disks that were already attached before system start
311
- **Intelligent scanning**: Checks all configured UUIDs from `/etc/pve/autonas/disks.conf`
312
- **Mount status detection**: Identifies disks already mounted elsewhere and handles appropriately
313

            
314
#### Boot Scanner Script
315
- **autonas-boot-scan.sh**: Comprehensive boot-time disk scanner
316
- **UUID existence verification**: Checks if configured disk UUIDs are present as devices
317
- **Mount state analysis**: Determines if disks are unmounted, mounted elsewhere, or correctly mounted
318
- **Automatic attachment**: Uses `autonas-manager.sh` to properly mount and configure detected disks
319
- **Detailed reporting**: Statistics on total, processed, already-mounted, and newly-attached disks
320

            
321
#### System Integration
322
- **Service dependencies**: Proper ordering after filesystem, udev-settle, network, and NFS services
323
- **Installation automation**: Added to install/uninstall scripts with proper enable/disable
324
- **Documentation updates**: Complete documentation of new boot recovery architecture
325
- **RemainAfterExit=yes**: Service stays active to indicate successful boot scan completion
326

            
327
#### Main Service Integration
328
- **autonas.service**: New main AutoNAS service for centralized system management
329
- **Enhanced reload functionality**: Comprehensive reload of udev rules, NFS exports, and systemd daemon
330
- **Service orchestration**: Proper dependencies and integration with boot-scan service
331
- **Centralized control**: Single point of management for the entire AutoNAS system
332

            
333
#### Orphan File Prevention System
334
- **Pre-installation cleanup**: Automatic cleanup of previous installations before reinstalling
335
- **Uninstaller integration**: Install script now installs uninstaller for future clean upgrades
336
- **Deploy script uninstall**: New `./deploy.sh uninstall` command for remote uninstallation
337
- **Force mode uninstaller**: Silent cleanup mode with `--force` flag for automated use
338
- **Evolution protection**: Prevents orphan files during project evolution and upgrades
339

            
340
#### Problem Resolution
341
- **Solves reboot issue**: Addresses problem where pre-connected disks weren't exported after system restart
342
- **udev gap coverage**: Handles scenario where udev doesn't re-trigger events for existing devices
343
- **NFS export recovery**: Ensures all configured disks are properly exported after boot
344
- **Robust boot process**: System now handles both hot-plug and pre-connected disk scenarios
345

            
346
## [v2.2.0] - 2025-07-22
347

            
348
### 🚀 Remote Deployment System
349

            
350
#### Deploy Script Added
351
- **Remote deployment support**: New `deploy.sh` script for automated installation on multiple targets
352
- **Multi-target management**: Support for servers 192.168.2.91, 192.168.2.92, 192.168.2.93
353
- **SSH-based automation**: Uses SSH keys for seamless remote operations
354
- **Intelligent connectivity checks**: Host availability verification before operations
355

            
356
#### Enhanced Reliability
357
- **Host status verification**: Ping test before attempting SSH connections
358
- **Graceful failure handling**: Skip unavailable hosts with clear warnings
359
- **Connection testing**: SSH connectivity validation before deployment
360
- **Error reporting**: Clear status messages for each operation step
361

            
362
#### Deployment Features
363
- **Complete installation**: Automated install, configure, and start services
364
- **Service management**: Start, restart, stop remote AutoNAS services
365
- **Status monitoring**: Remote status checking and health validation
366
- **Cleanup operations**: Temporary file cleanup on target systems
367

            
368
#### Command Operations
369
- **install**: Complete AutoNAS installation and configuration
370
- **start/restart/stop**: Service lifecycle management
371
- **status**: Health check and configuration validation
372
- **cleanup**: Temporary file removal
373
- **help**: Comprehensive usage documentation
374

            
375
#### Documentation Consolidation
376
- **Merged TECHNICAL.md into README.md**: Complete technical documentation in single file
377
- **Enhanced architecture section**: Detailed component descriptions and workflows
378
- **Comprehensive troubleshooting**: Technical debugging and extensibility guides
379
- **Unified documentation**: Single source of truth for all AutoNAS information
380

            
381
## [v2.1.0] - 2024-12-02
382

            
383
### 🚀 udev Context Improvements
384

            
385
#### Simplified Execution Strategy
386
- **Direct systemd execution**: Removed unreliable direct execution in udev context
387
- **Guaranteed privilege handling**: All mount operations now run through systemd service
388
- **Improved reliability**: Eliminates "permission denied" issues in restricted udev context
389
- **Consistent behavior**: Same execution path for all environments
390

            
391
#### Enhanced Logging
392
- **Streamlined logging**: Clear indication of systemd service usage
393
- **Better debugging**: Simplified troubleshooting without fallback complexity
394

            
395
## [v2.0.0] - 2024-12-02
396

            
397
### 🚀 Major Features Added
398

            
399
#### Intelligent Device Detection
400
- **Multiple device type support**: USB storage, SCSI removable, USB-to-SATA bridges
401
- **UUID-based identification**: Precise device matching via filesystem UUID
402
- **Smart udev rules**: Comprehensive detection for various hardware configurations
403

            
404
#### Enhanced User Experience
405
- **Interactive configuration helper**: `autonas-config.sh` with guided setup
406
- **UUID parameter support**: Pre-populate UUIDs in `add` and `test` commands
407
- **Automatic mounting post-configuration**: Immediate disk availability after setup
408
- **Standardized NFS configuration**: Optimized settings applied automatically
409

            
410
#### Advanced System Integration
411
- **udev wrapper**: Prevents timeout issues with asynchronous execution
412
- **Intelligent IP management**: Shared IP handling across multiple disks
413
- **Comprehensive logging**: Structured logging with proper syslog tags
414
- **Error handling and recovery**: Robust failure handling with detailed reporting
415

            
416
### 🛡️ Data Protection & Safety
417

            
418
#### Installation Safety
419
- **Configuration preservation**: Existing `disks.conf` files are never overwritten
420
- **User data detection**: Automatically detects and preserves user configurations
421
- **Template system**: New installs get templates, upgrades preserve data
422

            
423
#### Uninstallation Safety
424
- **Data-preserving uninstall**: User configurations and mount points preserved
425
- **Selective cleanup**: Only removes AutoNAS components, keeps user data
426
- **Manual cleanup guidance**: Clear instructions for complete removal if desired
427

            
428
### 🔧 Configuration Management
429

            
430
#### Simplified Configuration Process
431
```bash
432
# Old method (manual editing)
433
sudo nano /etc/pve/autonas/disks.conf
434

            
435
# New method (guided interactive)
436
sudo autonas-config.sh add <UUID>
437
```
438

            
439
#### Smart Validation
440
- **UUID format validation**: Proper 8-4-4-4-12 hex format checking
441
- **Disk name validation**: Character restrictions and reserved name checking
442
- **Network interface validation**: Real-time interface existence checking
443
- **IP address validation**: Format and availability checking
444

            
445
#### Enhanced Commands
446
- **`autonas-config.sh add [UUID]`**: Interactive configuration with optional UUID
447
- **`autonas-config.sh test [UUID]`**: Configuration testing with optional UUID
448
- **`autonas-config.sh list`**: Formatted display of all configurations
449
- **`autonas-config.sh remove`**: Interactive configuration removal
450

            
451
### 🌐 Network & NFS Improvements
452

            
453
#### Standardized NFS Configuration
454
```
455
*(rw,all_squash,insecure,async,no_subtree_check,anonuid=0,anongid=0)
456
```
457
- **Optimized for performance**: Async writes with no_subtree_check
458
- **Security balanced**: all_squash with root mapping for compatibility
459
- **Wide compatibility**: insecure flag for broader client support
460

            
461
#### Intelligent IP Management
462
- **Shared IP support**: Multiple disks can use the same IP address
463
- **Smart cleanup**: IPs only removed when no longer in use
464
- **Automatic configuration**: IP setup integrated with disk mounting
465

            
466
### 🔍 Monitoring & Debugging
467

            
468
#### Enhanced Logging System
469
- **Structured logging**: Separate tags for different components
470
  - `autonas`: Main manager operations
471
  - `autonas-wrapper`: udev wrapper operations
472
  - `autonas-config`: Configuration helper operations
473
- **Informative messages**: Clear indication of actions and results
474
- **Debugging support**: Detailed error reporting with context
475

            
476
#### Monitoring Commands
477
```bash
478
# Live monitoring all AutoNAS components
479
journalctl -t autonas -t autonas-wrapper -t autonas-config -f
480

            
481
# Component-specific monitoring
482
journalctl -t autonas --since "10 minutes ago"
483

            
484
# udev debugging
485
udevadm monitor --subsystem-match=block
486
```
487

            
488
### 📁 Project Structure Improvements
489

            
490
#### Organized Component Structure
491
```
492
autoNAS/
493
├── README.md                   # User documentation
494
├── TECHNICAL.md               # Technical documentation
495
├── CHANGELOG.md               # This file
496
├── config/
497
│   ├── disks.conf              # Configuration template
498
│   ├── 99-autonas-disk.rules   # udev detection rules
499
│   └── autonas-attach@.service # systemd fallback service
500
└── scripts/
501
    ├── autonas-manager.sh      # Main disk management
502
    ├── autonas-udev-wrapper.sh # udev timeout prevention
503
    ├── autonas-config.sh       # Interactive configuration
504
    ├── install.sh              # Safe installation
505
    └── uninstall.sh            # Safe uninstallation
506
```
507

            
508
#### Documentation Overhaul
509
- **Complete README**: Comprehensive user guide with examples
510
- **Technical documentation**: Developer-focused implementation details
511
- **Inline comments**: Extensive code documentation for maintainability
512

            
513
### ⚡ Performance Optimizations
514

            
515
#### udev Integration
516
- **Timeout prevention**: Asynchronous wrapper prevents udev blocking
517
- **Background processing**: Non-blocking device handling
518
- **Immediate feedback**: Quick udev response with background operations
519

            
520
#### File System Operations
521
- **UUID-based mounting**: Consistent device identification
522
- **Optimized mount points**: Organized `/mnt/autonas/` structure
523
- **Efficient configuration parsing**: Fast config file processing
524

            
525
### 🔒 Security Enhancements
526

            
527
#### File Permissions
528
- **Proper ownership**: All scripts owned by root:root
529
- **Secure permissions**: 755 for scripts, 644 for configs
530
- **Protected configuration**: Config files not world-writable
531

            
532
#### NFS Security
533
- **User mapping**: all_squash prevents privilege escalation
534
- **Anonymous mapping**: anonuid=0,anongid=0 for consistent access
535
- **Performance vs security**: Balanced configuration for practical use
536

            
537
### 🧪 Testing & Validation
538

            
539
#### Configuration Testing
540
- **Real-time validation**: Test configurations against current system state
541
- **Device detection**: Check if UUIDs correspond to actual devices
542
- **Network validation**: Verify interface existence and IP availability
543

            
544
#### Integration Testing
545
- **Manual testing support**: Commands for manual mount/unmount testing
546
- **Status verification**: Built-in checks for successful operations
547
- **Rollback capability**: Automatic cleanup on operation failures
548

            
549
### 🚨 Error Handling Improvements
550

            
551
#### Graceful Failure Handling
552
- **Descriptive error messages**: Clear indication of what went wrong
553
- **Suggested remedies**: Specific commands to fix common issues
554
- **Logging preservation**: All errors logged for later analysis
555

            
556
#### Recovery Mechanisms
557
- **Automatic rollback**: Failed operations clean up after themselves
558
- **State consistency**: System left in known good state after failures
559
- **Manual recovery**: Clear instructions for manual intervention when needed
560

            
561
### 📖 Breaking Changes
562

            
563
#### Configuration Format
564
- **No breaking changes**: Existing configurations continue to work
565
- **Enhanced format**: New configurations use optimized NFS settings
566
- **Backwards compatibility**: Old configurations preserved during upgrades
567

            
568
#### Command Interface
569
- **Extended syntax**: Commands now accept optional parameters
570
- **Backwards compatibility**: Old syntax continues to work
571
- **Enhanced features**: New parameters provide additional functionality
572

            
573
### 🔄 Migration Guide
574

            
575
#### From Manual Configuration
576
If you've been manually editing configuration files:
577
1. **Backup existing configs**: `sudo cp /etc/pve/autonas/disks.conf ~/backup.conf`
578
2. **Run installer**: `sudo bash scripts/install.sh` (preserves existing configs)
579
3. **Use new tools**: `autonas-config.sh list` to see current configurations
580

            
581
#### From Previous AutoNAS Version
582
1. **Safe upgrade**: `sudo bash scripts/install.sh` automatically preserves data
583
2. **New features**: Start using `autonas-config.sh add <UUID>` for new disks
584
3. **Enhanced monitoring**: Use new logging commands for better visibility
585

            
586
### 🎯 Future Roadmap
587

            
588
#### Planned Features
589
- **Web interface**: GUI for configuration management
590
- **Notification system**: Email/webhook notifications for disk events
591
- **Health monitoring**: SMART data integration and disk health reporting
592
- **Cloud integration**: Automatic cloud backup triggers
593

            
594
#### Performance Improvements
595
- **Parallel processing**: Concurrent handling of multiple disk operations
596
- **Caching**: Configuration caching for faster operations
597
- **Optimization**: Further NFS and mount option tuning
598

            
599
#### Security Enhancements
600
- **TLS support**: Encrypted NFS where supported
601
- **Access control**: Per-disk user/group restrictions
602
- **Audit logging**: Enhanced security logging for compliance
603

            
604
---
605

            
606
### 📝 Notes
607

            
608
- **Semantic versioning**: AutoNAS follows semver for version numbering
609
- **Stability focus**: All changes prioritize data safety and system stability
610
- **Community feedback**: Features developed based on user needs and feedback
611

            
612
For detailed technical information, see [TECHNICAL.md](TECHNICAL.md).
Bogdan Timofte authored 3 months ago
613
For user documentation, see [README.md](README.md).