autoNAS / DEVELOPMENT.md
Newer Older
1072 lines | 46.215kb
Bogdan Timofte authored 3 months ago
1
# AutoNAS Development Documentation
2

            
3
## Development Architecture Overview
4

            
5
### Project Structure - v3.0 Clean Architecture
6
```
7
autoNAS/
8
├── README.md                   # User documentation & quick start
9
├── DEVELOPMENT.md             # Development documentation (this file)
10
├── deploy.sh                  # Remote deployment system
11
├── config/
12
│   ├── disks.conf             # Disk configuration template
13
│   ├── 99-autonas-disk.rules  # udev rules for disk detection
14
│   ├── 98-autonas-interfaces.rules # Network interface monitoring
15
│   ├── autonas.service        # Main AutoNAS service
16
│   ├── autonas-attach@.service # Individual disk services
17
│   └── autonas-boot-scan.service # Boot time disk scanning
18
├── scripts/
19
│   ├── autonas.sh             # ✅ Main CLI interface (1,208 lines)
20
│   ├── autonas-core.sh        # ✅ Core business logic library (1,044 lines)
21
│   ├── autonas-disk-handler.sh    # Internal: Disk event handler
22
│   ├── autonas-network-handler.sh # Internal: Network event handler
23
│   ├── autonas-udev-wrapper.sh    # Internal: udev timeout prevention
24
│   ├── autonas-boot-scan.sh       # Internal: Boot-time scanning
25
│   ├── autonas-media-importer.sh  # Internal: Camera import processing
26
│   ├── autonas-uninstall.sh       # Internal: System uninstaller
27
│   └── install.sh             # Installation and setup script
28
```
29

            
30
### Clean User Interface Architecture
31
```
32
User Command: autonas <cmd> [options]
33
             ↓
Bogdan Timofte authored 2 weeks ago
34
    /usr/local/sbin/autonas (Main CLI)
Bogdan Timofte authored 3 months ago
35
             ↓
Bogdan Timofte authored 2 weeks ago
36
    /usr/local/lib/xdev/autonas/autonas-core.sh (Business Logic Library)
Bogdan Timofte authored 3 months ago
37
             ↓
Bogdan Timofte authored 2 weeks ago
38
    /usr/local/lib/xdev/autonas/*.sh (Internal System Scripts - Hidden)
Bogdan Timofte authored 3 months ago
39
```
40

            
41
### Script Organization - Professional Deployment
42
```
Bogdan Timofte authored 2 weeks ago
43
/usr/local/sbin/
44
└── autonas                        # Only user-visible command
Bogdan Timofte authored 3 months ago
45

            
Bogdan Timofte authored 2 weeks ago
46
/usr/local/lib/xdev/autonas/       # Internal scripts (hidden from autocomplete)
47
├── autonas-core.sh                # Core business logic library
Bogdan Timofte authored 3 months ago
48
├── autonas-boot-scan.sh           # Boot scanner
49
├── autonas-disk-handler.sh        # Disk event handler
50
├── autonas-media-importer.sh      # Media importer
51
├── autonas-network-handler.sh     # Network handler
52
├── autonas-udev-wrapper.sh        # Udev wrapper
Bogdan Timofte authored 2 weeks ago
53
└── uninstall.sh                   # System uninstaller
Bogdan Timofte authored 3 months ago
54
```
55

            
56
### v3.0 Code Reduction Achievement - Technical Metrics
57
```
58
BEFORE v3.0 (Duplicated Architecture):
59
- Multiple visible scripts with duplicated functions
60
- ~5,929+ lines across all components
61
- autonas-manager.sh: 696 lines (eliminated)
62
- autonas-config.sh: 1,709 lines (eliminated)
63
- autonas.sh (old): 1,505 lines (replaced)
64

            
65
AFTER v3.0 (Clean Architecture):
66
- Single visible command: autonas
67
- autonas.sh: 1,208 lines (unified CLI)
68
- autonas-core.sh: 1,044 lines (business logic)
69
- Internal scripts: properly organized and hidden
70

            
71
TOTAL CODE REDUCTION: ~2,300 lines (47% reduction)
72
DUPLICATION ELIMINATED: 100% through core library pattern
73
```
74

            
75
### System Integration Updates - v3.0 Complete
76
```
77
Configuration Files (All Updated):
Bogdan Timofte authored 2 weeks ago
78
✅ 99-autonas-disk.rules       - Updated with /usr/local/lib/xdev/autonas/ paths
79
✅ 98-autonas-interfaces.rules - Updated with /usr/local/lib/xdev/autonas/ paths
80
✅ autonas.service             - Updated with /usr/local/lib/xdev/autonas/ paths
81
✅ autonas-boot-scan.service   - Updated with /usr/local/lib/xdev/autonas/ paths
82
✅ autonas-attach@.service     - Updated with /usr/local/lib/xdev/autonas/ paths
Bogdan Timofte authored 3 months ago
83
✅ disks.conf                  - Configuration template (unchanged)
84
```
85

            
86
### Core Architecture Components
87

            
88
#### 1. Clean User Interface (`autonas.sh`) ⭐ v3.0
89
**Single visible command** combining all functionality:
90
```bash
91
autonas attach <uuid>         # Disk operations
92
autonas detach <uuid>
93
autonas list                  # Configuration management
94
autonas add [uuid]
95
autonas show                  # Device discovery
96
autonas status               # System status
97
autonas --help               # Complete help system
98
```
99

            
100
**Key Features:**
101
- **1,208 lines** - Clean CLI interface
102
- **Single command interface** - Professional user experience
103
- **Unified logging** with `LOG_TAG="autonas"`
104
- **Zero code duplication** - All business logic in core library
105

            
106
#### 2. Core Business Logic Library (`autonas-core.sh`) ⭐ v3.0
107
**Single source of truth** for all AutoNAS functionality:
108
```bash
Bogdan Timofte authored 2 weeks ago
109
source "/usr/local/lib/xdev/autonas/autonas-core.sh"  # Loaded by all scripts
Bogdan Timofte authored 3 months ago
110
```
111

            
112
**Key Features:**
113
- **1,044 lines** - Complete business logic library
114
- **Zero duplication** - All shared functions centralized
115
- **47% code reduction** - ~2,300 lines eliminated across system
116
- **Consistent behavior** - Single implementation for all operations
117
- **Complete feature parity** with separate scripts
118

            
119
#### 3. Internal System Scripts (Hidden from Users) ⭐ v3.0
Bogdan Timofte authored 2 weeks ago
120
**Location:** `/usr/local/lib/xdev/autonas/*.sh`
Bogdan Timofte authored 3 months ago
121

            
122
**Professional organization** with scripts hidden from autocomplete:
123
- **autonas-disk-handler.sh**: Disk attach/detach operations
124
- **autonas-network-handler.sh**: Network interface event handling
125
- **autonas-udev-wrapper.sh**: udev timeout prevention
126
- **autonas-boot-scan.sh**: Boot-time disk discovery
127
- **autonas-media-importer.sh**: Camera import processing
Bogdan Timofte authored 2 weeks ago
128
- **uninstall.sh**: Complete system removal
Bogdan Timofte authored 3 months ago
129

            
130
#### 4. udev Detection System
131
**File:** `config/99-autonas-disk.rules`
132

            
133
Detects three types of external storage devices:
134
- **USB Storage**: `ENV{ID_BUS}=="usb"`
135
- **SCSI Removable**: `ATTRS{removable}=="1"`
136
- **USB-SATA Bridges**: `ENV{ID_BUS}=="ata"` + `ENV{ID_USB_TYPE}=="disk"`
137

            
138
#### 5. Background Processing (`autonas-udev-wrapper.sh`)
139
Prevents udev timeout issues through:
140
- **Asynchronous execution** with 2-second device stabilization delay
141
- **Complete environment setup** for restricted udev context
142
- **systemd integration** for privilege escalation
143
- **Comprehensive logging** with device details
144

            
145
### v3.0 Architecture Validation - Technical Assessment
146

            
147
#### Professional User Experience
148
- **✅ Single visible command**: `autonas` only command in autocomplete
149
- **✅ All functionality preserved**: Complete feature parity through unified interface
150
- **✅ Clean backend organization**: All utilities properly categorized and hidden
151
- **✅ Zero duplication**: Single source of truth for all business logic
152

            
153
#### System Integration Status
Bogdan Timofte authored 2 weeks ago
154
- **✅ systemd services**: All updated with `/usr/local/lib/xdev/autonas/` paths
155
- **✅ udev rules**: All updated with `/usr/local/lib/xdev/autonas/` paths
Bogdan Timofte authored 3 months ago
156
- **✅ configuration files**: All references updated throughout system
157
- **✅ deploy script**: Enhanced with directory creation and proper installation
158
- **✅ install/uninstall**: Complete support for new architecture
159

            
160
#### Development Metrics - v3.0 Success
161
- **Scripts organized**: 7 moved to internal directory
162
- **User commands visible**: 1 (`autonas` only)
163
- **Code duplication eliminated**: ~2,300 lines (47% reduction)
164
- **System integration**: 100% updated
165
- **Backward compatibility**: 100% preserved
166
Handles complex mount operations:
167
- **UUID-based device identification**
168
- **Intelligent IP sharing** across multiple disks
169
- **NFS export automation** with optimized settings
170
- **Camera import workflow** with background processing
171

            
172
#### 5. Configuration System (`autonas-config.sh`)
173
Interactive configuration management:
174
- **Three configuration types**: NFS shares, local mounts, camera import
175
- **UUID validation** and device verification
176
- **Interactive setup wizards**
177
- **Configuration testing** and status reporting
178

            
179
#### 6. Media Import System
180
**Script:** `autonas-media-importer.sh` (Non-configurable, built-in)
181
- **EXIF-based organization** with UTC to local time conversion
182
- **Multi-format support**: MP4, MOV, JPG, JPEG, PNG, ARW, DNG, AVI, MKV
183
- **Automated cleanup** of proprietary files (GLV for Garmin cameras)
184
- **Background service integration** for unlimited processing time
185

            
186
### Configuration Types
187

            
188
#### 1. NFS Share (Network Access)
189
```
190
UUID:name:ip:interface:mount_point:nfs_options
191
```
192

            
193
#### 2. Local Mount (Local Only)
194
```
195
UUID:name:LOCAL:LOCAL:mount_point:LOCAL
196
```
197

            
198
#### 3. Camera Import (Automated Processing)
199
```
200
UUID:name:IMPORT:IMPORT:temp_mount:destination_path
201
```
202

            
203
### Remote Deployment System
204

            
205
#### Deploy Script (`deploy.sh`)
206
Manages AutoNAS across multiple production nodes:
207
```bash
208
./deploy.sh install          # Deploy to all nodes (91, 92, 93)
209
./deploy.sh install 192.168.2.91  # Deploy to specific node
210
./deploy.sh start|restart|stop     # Service management
211
./deploy.sh status               # Health checking
212
./deploy.sh uninstall           # Complete removal
213
```
214

            
215
**Features:**
216
- **SSH-based automation** with connectivity validation
217
- **Host availability checking** with ping verification
218
- **Graceful error handling** - continues with available hosts
219
- **Transfer optimization** with rsync and exclude patterns
220
- **Service lifecycle management** across multiple nodes
221

            
222
### Development Testing
223

            
224
#### Target Production Nodes
225
- **192.168.2.91** (baobab.vad.is.xdev.ro) - NFS Consumer
226
- **192.168.2.92** (ebony.vad.is.xdev.ro) - Storage Provider (ext01)
227
- **192.168.2.93** (tapia.vad.is.xdev.ro) - Storage Provider (ext02)
228

            
229
#### SSH Access Requirement
230
```bash
231
# ⚠️ CRITICAL: Always use root user for AutoNAS operations
232
ssh -l root 192.168.2.91 'autonas status'
233
ssh -l root 192.168.2.92 'autonas list'
234
ssh -l root 192.168.2.93 'autonas attach <uuid>'
235
```
236

            
237
AutoNAS requires root privileges for:
238
- Disk mounting/unmounting operations
239
- Network interface IP configuration
240
- NFS export management
241
- systemd service operations
242

            
243
### Logging and Monitoring
244

            
245
#### Log Tag System - v3.0 Clean Architecture
246
- **`autonas`**: Main CLI and core business logic operations
247
- **`autonas-boot-scan`**: Boot-time disk discovery
248
- **`autonas-disk-handler`**: Disk attach/detach operations
249
- **`autonas-network-handler`**: Network interface events
250
- **`autonas-media-import`**: Camera import processing
251
- **`autonas-udev-wrapper`**: udev event processing
252

            
253
#### Real-time Monitoring
254
```bash
255
# All AutoNAS system components
256
journalctl -t autonas -t autonas-boot-scan -t autonas-disk-handler -t autonas-network-handler -t autonas-media-import -f
257
```
258
# All AutoNAS components
259
journalctl -t autonas -t autonas-manager -t autonas-wrapper -f
260

            
261
# Unified script only
262
journalctl -t autonas -f
263

            
264
# Specific component
265
journalctl -t autonas-import --since "10 minutes ago"
266
```
267

            
268
#### System Status Checks
269
```bash
270
# Service status
271
systemctl status autonas autonas-boot-scan
272

            
273
# Active mounts
274
mount | grep autonas
275

            
276
# NFS exports
277
showmount -e localhost
278

            
279
# Network configuration
280
ip addr show | grep "192.168.10"
281
```
282

            
283
## Important Development Notes
284

            
285
### User Context for Testing and Administration
286
- **AutoNAS is a system administration utility designed for root user**
287
- **Always use `ssh -l root` for testing and administration**
288
- AutoNAS manages system-level resources: disk mounting, NFS exports, systemd services
289
- Root privileges are required for all core functionality
290

            
291
### Development Testing Commands
292
```bash
293
# Correct way to test AutoNAS operations
294
ssh -l root 192.168.2.91 'autonas attach <uuid>'
295
ssh -l root 192.168.2.92 'autonas detach <uuid>'
296
ssh -l root 192.168.2.93 'autonas list'
297

            
298
# Check system status
299
ssh -l root <host> 'systemctl status autonas'
300
ssh -l root <host> 'journalctl -t autonas -n 10'
301
```
302

            
303
## Configuration Backup and Recovery
304

            
305
### Current Configuration Backup
306
Date: August 14, 2025
307
Location: `/etc/pve/autonas/disks.conf`
308

            
309
```
310
8765-4321:camera-real:IMPORT:IMPORT:/mnt/autonas/camera-real:/mnt/autonas/ext01/@Camera/import
311
f6ac3d86-5681-4b33-bc64-aa272b333057:ext01:192.168.10.21:thunderbridge:/mnt/autonas/ext01:*(rw,all_squash,insecure,async,no_subtree_check,anonuid=0,anongid=0)
312
920fe1b7-4091-4d6a-bab8-2f48d8d704bc:ext02:192.168.10.22:thunderbridge:/mnt/autonas/ext02:*(rw,all_squash,insecure,async,no_subtree_check,anonuid=0,anongid=0)
313
```
314

            
315
### Configuration Format
316
- **Camera Import Format**: `UUID:name:IMPORT:IMPORT:mount_point:destination_path`
317
  - Media importer script (`/usr/local/bin/autonas-media-importer.sh`) is **built-in and non-configurable**
318
- **External Disk Format**: `UUID:name:ip:interface:mount_point:nfs_options`
319

            
320
### Known UUIDs and Labels
321
- `8765-4321`: Camera device (LABEL="CAMERA-REAL")
322
- `f6ac3d86-5681-4b33-bc64-aa272b333057`: External RAID (LABEL="External RAID")
323
- `920fe1b7-4091-4d6a-bab8-2f48d8d704bc`: External disk ext02
324

            
325
## Recent Issues and Solutions
326

            
327
### Segmentation Fault Resolution (Aug 14, 2025)
328
- **Issue**: Corrupted `log_message` function in `autonas-manager.sh` causing segfaults
329
- **Cause**: During refactoring, sync code from `cleanup_and_unmount` was embedded into `log_message` function
330
- **Solution**: Repaired `log_message` function by removing embedded sync code that executed at global scope
331
- **Status**: ✅ RESOLVED - All nodes functioning correctly
332

            
333
### Configuration Loss
334
- **Issue**: `/etc/pve/autonas/disks.conf` configurations disappeared
335
- **Possible Cause**: Unknown - may be related to system cleanup or restart
336
- **Recovery**: Manual reconstruction using `lsblk` and `blkid` to identify disk UUIDs
337
- **Prevention**: Regular backups of configuration file
338

            
339
## Architecture Notes
340

            
341
### Simplified Architecture (Current)
342
- Removed auxiliary debugging tools and redundant services
343
- Direct udev-based reactive monitoring
344
- SystemD integration with `systemd-run` for background processes
345
- Global LOG_TAG system for standardized logging
346

            
347
### Active Core Components
348
- `autonas-manager.sh`: Main orchestration (LOG_TAG="autonas-manager")
349
- `autonas-config.sh`: Configuration management (LOG_TAG="autonas-config")
350
- `autonas-boot-scan.sh`: Boot-time scanning (LOG_TAG="autonas-boot")
351
- `autonas-udev-wrapper.sh`: udev event handling (LOG_TAG="autonas-wrapper")
352
- `autonas-media-importer.sh`: Camera import processing (LOG_TAG="autonas-import")
353
- `99-autonas-disk.rules`: udev rules for disk detection
354

            
355
## Deployment Information
356

            
357
### Target Nodes
358
- 192.168.2.91 (baobab.vad.is.xdev.ro)
359
- 192.168.2.92 (ebony.vad.is.xdev.ro)
360
- 192.168.2.93 (tapia.vad.is.xdev.ro)
361

            
362
### Deploy Command
363
```bash
364
./deploy.sh install 192.168.2.91 192.168.2.92 192.168.2.93
365
```
366

            
367
## Monitoring and Debugging
368

            
369
### Log Monitoring
370
```bash
371
ssh -l root <host> 'journalctl -t autonas-manager -t autonas-wrapper -f'
372
```
373

            
374
### Service Status
375
```bash
376
ssh -l root <host> 'systemctl status autonas autonas-boot-scan'
377
```
378

            
379
### Manual Operations
380
```bash
381
ssh -l root <host> 'autonas-manager.sh attach <uuid>'
382
ssh -l root <host> 'autonas-manager.sh detach <uuid>'
383
ssh -l root <host> 'autonas-manager.sh reload'
384
```
385

            
386
## ✅ AutoNAS Script Unification COMPLETE! (August 14, 2025)
387

            
388
### Successfully Unified: `autonas.sh`
389
✅ **Deployed on all nodes:**
390
- 192.168.2.91 (baobab) - Unified script active
391
- 192.168.2.92 (ebony) - Unified script active
392
- 192.168.2.93 (tapia) - Unified script active
393

            
394
### Unified Command Interface:
395
```bash
396
autonas attach <uuid>       # Disk operations
397
autonas detach <uuid>
398
autonas list               # Configuration management
399
autonas add [uuid]
400
autonas show               # Device discovery
401
autonas status             # System status
402
```
403

            
404
### Functions Successfully Integrated:
405
✅ **Disk Operations** (from autonas-manager.sh):
406
- `handle_attach()`, `handle_detach()`, `mount_disk()`, `unmount_disk()`
407
- `activate_ip()`, `deactivate_ip()`, `add_nfs_export()`, `remove_nfs_export()`
408
- `handle_camera_import()`, `run_background_import()`
409

            
410
✅ **Configuration Management** (from autonas-config.sh):
411
- `list_disks()`, `show_available_disks()`, `validate_uuid()`, `check_uuid_exists()`
412
- `get_device_info()`, unified parsing and status display
413

            
414
✅ **System Integration**:
415
- Unified logging with `LOG_TAG="autonas"`
416
- Single configuration file parsing
417
- Consistent error handling and status reporting
418

            
419
### Deployment Results:
420
```
421
✓ Unified AutoNAS script installed
422
✓ Created 'autonas' command symlink
423
✓ Unified script: /usr/local/bin/autonas.sh
424
```
425

            
426
### Validated Operations:
427
- `autonas --help` ✅ Complete help system
428
- `autonas list` ✅ Configuration display (3 disks shown perfectly)
429
- `autonas show` ✅ Device discovery (6 devices detected)
430
- `autonas attach 8765-4321` ✅ Camera import process (working)
431
- `autonas status` ✅ System status (working with minor display issue)
432

            
433
### Code Reduction Achievement:
434
- **Before**: 699 + 1720 = 2419 lines (two separate scripts)
435
- **After**: ~2100 lines (single unified script)
436
- **Reduction**: ~13% code reduction + eliminated duplication
437
- **Maintenance**: Single script to maintain vs. two scripts
438

            
439
### Legacy Scripts Status:
440
- `autonas-manager.sh` ✅ Still available for compatibility
441
- `autonas-config.sh` ✅ Still available for compatibility
442
- `autonas.sh` ✅ **NEW unified interface** (recommended)
443

            
444
## 🔄 Script Unification Analysis (August 14, 2025)
445

            
446
### Identified Function Overlaps:
447
**autonas-manager.sh** (699 lines) vs **autonas-config.sh** (1720 lines)
448

            
449
#### Duplicate Functions:
450
1. **Configuration Parsing:**
451
   - `get_disk_config()` vs `get_config()` - Same functionality
452
   - `parse_config()` vs multiple `IFS=':' read -r uuid name...` patterns
453

            
454
2. **File System Operations:**
455
   - `mount_disk()` vs `mount_disk_config()` - Similar mounting logic
456
   - `unmount_disk()` vs `umount_disk_config()` - Similar unmounting logic
457

            
458
3. **Device Detection:**
459
   - Similar UUID validation and device scanning in both scripts
460

            
461
#### Unification Proposal: `autonas.sh`
462
✅ **Created unified script skeleton** with:
463
- Combined logging system (`LOG_TAG="autonas"`)
464
- Unified configuration parsing
465
- Single command dispatcher: `autonas <command> [options]`
466
- Core disk operations (attach, detach, mount, unmount)
467
- Configuration management (add, remove, list, test)
468

            
469
#### Command Structure:
470
```bash
471
# Disk Operations (from manager)
472
autonas attach <uuid>
473
autonas detach <uuid>
474
autonas reload
475

            
476
# Configuration (from config)
477
autonas add [uuid]
478
autonas remove [uuid]
479
autonas list
480
autonas test [uuid]
481
autonas show
482

            
483
# Maintenance
484
autonas status
485
```
486

            
487
#### Benefits of Unification:
488
- **Reduced Code Duplication**: ~40% code reduction estimated
489
- **Consistent Interface**: Single entry point for all operations
490
- **Simplified Maintenance**: One script to debug and update
491
- **Better Error Handling**: Unified logging and error reporting
492

            
493
#### Implementation Status:
494
- ✅ Core manager functions integrated
495
- ⏳ Configuration functions need integration (~1200 lines from config.sh)
496
- ⏳ Testing and validation required
497
- ⏳ Deployment script updates needed
498

            
499
## ✅ AutoNAS Media Importer Integration Complete!
500

            
501
### Key Simplification: Non-Configurable Media Importer (August 14, 2025)
502
✅ **Media importer script is now built-in and non-configurable:**
503
- Script path: `/usr/local/bin/autonas-media-importer.sh` (hardcoded)
504
- Configuration format simplified: `UUID:name:IMPORT:IMPORT:temp_mount_point:destination_path`
505
- Removed redundant script_path parameter from camera configurations
506
- Updated display logic to show "(built-in, non-configurable)" status
507

            
508
### Rationale:
509
- `autonas-media-importer.sh` is a core component with deep system integration
510
- Making it configurable would require extensive testing and validation
511
- Single, well-tested importer ensures consistent behavior across all cameras
512
- Simplified configuration reduces user error and maintenance complexity
513

            
514
## Final Deployment Status (August 14, 2025)
515

            
516
### Version Deployed: AutoNAS v2.1 (Optimized & Segfault-Free)
517
✅ **Successfully deployed on all nodes:**
518
- 192.168.2.91 (baobab.vad.is.xdev.ro) - NFS Consumer
519
- 192.168.2.92 (ebony.vad.is.xdev.ro) - Storage Provider (ext01)
520
- 192.168.2.93 (tapia.vad.is.xdev.ro) - Storage Provider (ext02)
521

            
522
### Key Fixes Deployed:
523
1. **Segmentation Fault Resolution**: Corrupted `log_message` function repaired
524
2. **Configuration Recovery**: All 3 disk configurations restored with backups
525
3. **Architecture Optimization**: Simplified system with removed orphan components
526
4. **Logging Standardization**: Global LOG_TAG system implemented
527
5. **Boot Scan Service**: Fully functional auto-detection at boot
528

            
529
### Current System State:
530
- ✅ All core functionality working
531
- ✅ Configuration backups created with timestamps
532
- ✅ No segmentation faults on any node
533
- ✅ udev-based reactive monitoring active
534
- ✅ SystemD integration optimized
535

            
536
### Validated Operations:
537
```bash
538
ssh -l root 192.168.2.92 'autonas-manager.sh attach f6ac3d86-5681-4b33-bc64-aa272b333057'  # ✅ Works
539
ssh -l root 192.168.2.93 'autonas-config.sh list'                                           # ✅ Works
540
ssh -l root 192.168.2.91 'autonas-manager.sh reload'                                        # ✅ Works
541
```
542

            
543
## Critical Reminders
544

            
545
1. **Always use root user** for AutoNAS operations
546
2. **Backup configurations** before major changes
547
3. **Test on single node** before mass deployment
548
4. **Monitor logs** during operations for early issue detection
549
5. **Keep development context updated** with any architecture changes
550

            
551
---
552

            
553
# AutoNAS Change Log
554

            
555
## [v3.0.0] - 2025-08-13 🚀
556

            
557
### 🎉 **REVOLUTIONARY BACKGROUND IMPORT ARCHITECTURE**
558

            
559
#### 🔄 Service-Based Import System
560
- **Background Import Services**: Complete separation of mount/import through systemd services
561
  - **Attach Service**: Handles camera mount and launches background import service
562
  - **Background Import Service**: `autonas-camera-import@UUID.service` for unlimited duration imports
563
  - **Auto-Cleanup Service**: Automatic unmount after import completion
564
- **Unlimited Import Duration**: No more systemd timeout constraints (tested with 300+ files)
565
- **Production Scalability**: Architecture tested and validated in production environment
566

            
567
#### 📊 **Production Test Results**
568
- **✅ 302 files imported** successfully in single session (36 minutes)
569
- **✅ 100% success rate** with zero errors
570
- **✅ Perfect UTC conversion** for all QuickTime/EXIF timestamps
571
- **✅ Complete workflow** mount → background import → auto unmount
572
- **✅ Robust error handling** and disconnect detection
573

            
574
#### 🛠️ **Enhanced Camera Import Features**
575
- **UTC to Local Time Conversion**: Perfect timestamp conversion for QuickTime files
576
- **Systemd-Escaped UUID Support**: Proper handling of service parameter escaping
577
- **External Configuration File**: `/etc/autonas/disks.conf` for production deployments
578
- **Background Import Script**: `autonas-background-import.sh` for service integration
579
- **Enhanced Config Management**: `get-config` function with UUID unescaping support
580

            
581
#### 🔧 **Technical Architecture Improvements**
582
- **Service Template**: `autonas-camera-import@.service` for parameterized background imports
583
- **Config File Migration**: From embedded config to external `/etc/autonas/disks.conf`
584
- **Manager Script Updates**: Integration with background service launching
585
- **Robust Mount Detection**: Enhanced mount point validation and timeout protection
586
- **Logging Integration**: Separate log channels for background imports (`autonas-bg-import`)
587

            
588
#### 🚨 **Breaking Changes**
589
- **Configuration Location**: Camera configurations now require external config file
590
- **Service Architecture**: Import workflow now uses background services instead of direct execution
591
- **Manager Behavior**: Attach operations now launch services instead of blocking imports
592

            
593
#### 📈 **Performance Metrics**
594
- **Scalability**: Tested with 300+ file imports without timeout issues
595
- **Reliability**: 100% success rate in production testing
596
- **Efficiency**: 36-minute import time for 302 MP4 files with EXIF processing
597
- **Robustness**: Complete disconnect detection and error recovery
598

            
599
---
600

            
601
## [v2.5.0] - 2024-08-12
602

            
603
### 🚀 Dual Configuration System
604

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

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

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

            
625
#### Technical Implementation
626
```bash
627
# NFS Configuration (existing)
628
UUID:NAME:IP:INTERFACE:MOUNT_POINT:NFS_OPTIONS
629

            
630
# LOCAL Configuration (new)
631
UUID:NAME:LOCAL:LOCAL:MOUNT_POINT:LOCAL
632
```
633

            
634
#### Manager Function Enhancements
635
- **`activate_ip()`**: Skips IP activation for LOCAL configurations
636
- **`deactivate_ip()`**: Skips IP deactivation for LOCAL configurations
637
- **`add_nfs_export()`**: Skips NFS export for LOCAL configurations
638
- **`remove_nfs_export()`**: Skips NFS export removal for LOCAL configurations
639

            
640
#### Use Cases for LOCAL Configurations
641
- **Simple local storage**: Diskuri pentru backup-uri locale fără acces de rețea
642
- **Scratch space**: Space temporar pentru procesare locală de date
643
- **Development storage**: Storage local pentru cache-uri și fișiere temporare
644
- **Archive storage**: Archive locale care nu necesită export NFS
645
- **Mixed environments**: Combinație de storage local și shares de rețea
646

            
647
#### Configuration Examples
648
```properties
649
# NFS Shares (network access)
650
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)
651

            
652
# LOCAL Mounts (local only)
653
8765-4321:local-backup:LOCAL:LOCAL:/mnt/autonas/local-backup:LOCAL
654
abcd-1234:scratch-space:LOCAL:LOCAL:/mnt/autonas/scratch-space:LOCAL
655
```
656

            
657
#### Backward Compatibility
658
- **Full compatibility**: Existing NFS configurations continue to work unchanged
659
- **No migration required**: Current setups work without any changes
660
- **Enhanced functionality**: New LOCAL options available alongside existing NFS features
661

            
662
## [v2.4.0] - 2025-08-11
663

            
664
### 🌐 Interface Stability Management System
665

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

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

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

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

            
692
#### Debug și Monitoring Integration
693
- **Integrated monitoring**: Built-in status checking în autonas.sh unified script
694
- **Real-time logging**: Monitorizare în timp real prin journalctl
695
- **Configuration validation**: Built-in testing cu `autonas test <uuid>`
696
- **Status analysis**: System status prin `autonas status`
697
- **Network debugging**: Standard tools (ip, journalctl, udevadm) pentru troubleshooting
698

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

            
707
#### Management Commands
708
```bash
709
# Debug interfețe și IP-uri prin unified interface
710
autonas status                    # System status complet
711
autonas show                      # Device discovery și status
712

            
713
# Monitorizare timp real
714
journalctl -t autonas -f          # Live monitoring AutoNAS
715
journalctl -t autonas-interface-handler -f  # Interface events
716

            
717
# Network debugging standard
718
ip addr show                      # Check interface status
719
udevadm monitor --subsystem-match=net       # Monitor udev events
720
```
721

            
722
#### Installation & Service Integration
723
- **Automatic installation**: Toate componentele sunt instalate automat de `deploy.sh`
724
- **Service auto-start**: Serviciul de monitorizare pornește automat la instalare
725
- **Initial restore**: Restaurare automată a IP-urilor la finalul instalării
726
- **Proper dependencies**: Dependențe corecte cu serviciile de rețea și NFS
727

            
728
### 🔧 Îmbunătățiri Core Manager
729

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

            
736
#### Enhanced Error Handling
737
- **Detailed error reporting**: Mesaje de eroare mai descriptive
738
- **Recovery suggestions**: Sugestii pentru rezolvarea problemelor
739
- **Graceful degradation**: Continuă operațiunea chiar dacă unele componente eșuează
740

            
741
### 📚 Documentație Extinsă
742

            
743
#### New Troubleshooting Section
744
- **USB/Thunderbolt specific issues**: Secțiune dedicată pentru problemele interfețelor instabile
745
- **Debug commands**: Liste complete de comenzi pentru diagnosticare
746
- **Step-by-step solutions**: Soluții pas cu pas pentru probleme comune
747
- **Power management tips**: Sugestii pentru managementul power al USB
748

            
749
#### Updated Architecture Documentation
750
- **Interface monitoring flow**: Documentare completă a fluxului de monitorizare
751
- **Service interactions**: Interacțiunile între servicii și dependențele lor
752
- **Debug methodology**: Metodologie pentru diagnosticarea problemelor
753

            
754
### 🎯 Use Cases Noi
755

            
756
#### Unstable Interface Environments
757
- **USB docking stations**: Stații de andocare USB care se deconectează periodic
758
- **Thunderbolt hubs**: Hub-uri Thunderbolt cu conectivitate intermitentă
759
- **USB-C multiport adapters**: Adaptoare multiport cu stabilitate variabilă
760
- **Laptop docking scenarios**: Scenarii de laptop care se conectează/deconectează des
761

            
762
#### Enterprise Environment
763
- **Multiple identical setups**: Deploy pe multiple servere cu aceleași probleme interfețe
764
- **Centralized monitoring**: Monitorizare centralizată a stabilității interfețelor
765
- **Automated recovery**: Recuperare automată fără intervenție manuală
766

            
767
## [v2.3.0] - 2025-07-22
768

            
769
### 🚀 Boot Recovery System
770

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

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

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

            
790
#### Main Service Integration
791
- **autonas.service**: New main AutoNAS service for centralized system management
792
- **Enhanced reload functionality**: Comprehensive reload of udev rules, NFS exports, and systemd daemon
793
- **Service orchestration**: Proper dependencies and integration with boot-scan service
794
- **Centralized control**: Single point of management for the entire AutoNAS system
795

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

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

            
809
## [v2.2.0] - 2025-07-22
810

            
811
### 🚀 Remote Deployment System
812

            
813
#### Deploy Script Added
814
- **Remote deployment support**: New `deploy.sh` script for automated installation on multiple targets
815
- **Multi-target management**: Support for servers 192.168.2.91, 192.168.2.92, 192.168.2.93
816
- **SSH-based automation**: Uses SSH keys for seamless remote operations
817
- **Intelligent connectivity checks**: Host availability verification before operations
818

            
819
#### Enhanced Reliability
820
- **Host status verification**: Ping test before attempting SSH connections
821
- **Graceful failure handling**: Skip unavailable hosts with clear warnings
822
- **Connection testing**: SSH connectivity validation before deployment
823
- **Error reporting**: Clear status messages for each operation step
824

            
825
#### Deployment Features
826
- **Complete installation**: Automated install, configure, and start services
827
- **Service management**: Start, restart, stop remote AutoNAS services
828
- **Status monitoring**: Remote status checking and health validation
829
- **Cleanup operations**: Temporary file cleanup on target systems
830

            
831
#### Command Operations
832
- **install**: Complete AutoNAS installation and configuration
833
- **start/restart/stop**: Service lifecycle management
834
- **status**: Health check and configuration validation
835
- **cleanup**: Temporary file removal
836
- **help**: Comprehensive usage documentation
837

            
838
#### Documentation Consolidation
839
- **Merged TECHNICAL.md into README.md**: Complete technical documentation in single file
840
- **Enhanced architecture section**: Detailed component descriptions and workflows
841
- **Comprehensive troubleshooting**: Technical debugging and extensibility guides
842
- **Unified documentation**: Single source of truth for all AutoNAS information
843

            
844
## [v2.1.0] - 2024-12-02
845

            
846
### 🚀 udev Context Improvements
847

            
848
#### Simplified Execution Strategy
849
- **Direct systemd execution**: Removed unreliable direct execution in udev context
850
- **Guaranteed privilege handling**: All mount operations now run through systemd service
851
- **Improved reliability**: Eliminates "permission denied" issues in restricted udev context
852
- **Consistent behavior**: Same execution path for all environments
853

            
854
#### Enhanced Logging
855
- **Streamlined logging**: Clear indication of systemd service usage
856
- **Better debugging**: Simplified troubleshooting without fallback complexity
857

            
858
## [v2.0.0] - 2024-12-02
859

            
860
### 🚀 Major Features Added
861

            
862
#### Intelligent Device Detection
863
- **Multiple device type support**: USB storage, SCSI removable, USB-to-SATA bridges
864
- **UUID-based identification**: Precise device matching via filesystem UUID
865
- **Smart udev rules**: Comprehensive detection for various hardware configurations
866

            
867
#### Enhanced User Experience
868
- **Interactive configuration helper**: `autonas-config.sh` with guided setup
869
- **UUID parameter support**: Pre-populate UUIDs in `add` and `test` commands
870
- **Automatic mounting post-configuration**: Immediate disk availability after setup
871
- **Standardized NFS configuration**: Optimized settings applied automatically
872

            
873
#### Advanced System Integration
874
- **udev wrapper**: Prevents timeout issues with asynchronous execution
875
- **Intelligent IP management**: Shared IP handling across multiple disks
876
- **Comprehensive logging**: Structured logging with proper syslog tags
877
- **Error handling and recovery**: Robust failure handling with detailed reporting
878

            
879
### 🛡️ Data Protection & Safety
880

            
881
#### Installation Safety
882
- **Configuration preservation**: Existing `disks.conf` files are never overwritten
883
- **User data detection**: Automatically detects and preserves user configurations
884
- **Template system**: New installs get templates, upgrades preserve data
885

            
886
#### Uninstallation Safety
887
- **Data-preserving uninstall**: User configurations and mount points preserved
888
- **Selective cleanup**: Only removes AutoNAS components, keeps user data
889
- **Manual cleanup guidance**: Clear instructions for complete removal if desired
890

            
891
### 🔧 Configuration Management
892

            
893
#### Simplified Configuration Process
894
```bash
895
# Old method (manual editing)
896
sudo nano /etc/pve/autonas/disks.conf
897

            
898
# New method (guided interactive)
899
sudo autonas-config.sh add <UUID>
900
```
901

            
902
#### Smart Validation
903
- **UUID format validation**: Proper 8-4-4-4-12 hex format checking
904
- **Disk name validation**: Character restrictions and reserved name checking
905
- **Network interface validation**: Real-time interface existence checking
906
- **IP address validation**: Format and availability checking
907

            
908
#### Enhanced Commands
909
- **`autonas-config.sh add [UUID]`**: Interactive configuration with optional UUID
910
- **`autonas-config.sh test [UUID]`**: Configuration testing with optional UUID
911
- **`autonas-config.sh list`**: Formatted display of all configurations
912
- **`autonas-config.sh remove`**: Interactive configuration removal
913

            
914
### 🌐 Network & NFS Improvements
915

            
916
#### Standardized NFS Configuration
917
```
918
*(rw,all_squash,insecure,async,no_subtree_check,anonuid=0,anongid=0)
919
```
920
- **Optimized for performance**: Async writes with no_subtree_check
921
- **Security balanced**: all_squash with root mapping for compatibility
922
- **Wide compatibility**: insecure flag for broader client support
923

            
924
#### Intelligent IP Management
925
- **Shared IP support**: Multiple disks can use the same IP address
926
- **Smart cleanup**: IPs only removed when no longer in use
927
- **Automatic configuration**: IP setup integrated with disk mounting
928

            
929
### 🔍 Monitoring & Debugging
930

            
931
#### Enhanced Logging System
932
- **Structured logging**: Separate tags for different components
933
  - `autonas`: Main manager operations
934
  - `autonas-wrapper`: udev wrapper operations
935
  - `autonas-config`: Configuration helper operations
936
- **Informative messages**: Clear indication of actions and results
937
- **Debugging support**: Detailed error reporting with context
938

            
939
#### Monitoring Commands
940
```bash
941
# Live monitoring all AutoNAS components
942
journalctl -t autonas -t autonas-wrapper -t autonas-config -f
943

            
944
# Component-specific monitoring
945
journalctl -t autonas --since "10 minutes ago"
946

            
947
# udev debugging
948
udevadm monitor --subsystem-match=block
949
```
950

            
951
### 📁 Project Structure Improvements
952

            
953
#### Organized Component Structure
954
```
955
autoNAS/
956
├── README.md                   # User documentation
957
├── DEVELOPMENT.md             # Technical documentation
958
├── CHANGELOG.md               # This file
959
├── config/
960
│   ├── disks.conf              # Configuration template
961
│   ├── 99-autonas-disk.rules   # udev detection rules
962
│   └── autonas-attach@.service # systemd fallback service
963
└── scripts/
964
    ├── autonas-manager.sh      # Main disk management
965
    ├── autonas-udev-wrapper.sh # udev timeout prevention
966
    ├── autonas-config.sh       # Interactive configuration
967
    └── uninstall.sh            # Safe uninstallation
968
```
969

            
970
#### Documentation Overhaul
971
- **Complete README**: Comprehensive user guide with examples
972
- **Technical documentation**: Developer-focused implementation details
973
- **Inline comments**: Extensive code documentation for maintainability
974

            
975
### ⚡ Performance Optimizations
976

            
977
#### udev Integration
978
- **Timeout prevention**: Asynchronous wrapper prevents udev blocking
979
- **Background processing**: Non-blocking device handling
980
- **Immediate feedback**: Quick udev response with background operations
981

            
982
#### File System Operations
983
- **UUID-based mounting**: Consistent device identification
984
- **Optimized mount points**: Organized `/mnt/autonas/` structure
985
- **Efficient configuration parsing**: Fast config file processing
986

            
987
### 🔒 Security Enhancements
988

            
989
#### File Permissions
990
- **Proper ownership**: All scripts owned by root:root
991
- **Secure permissions**: 755 for scripts, 644 for configs
992
- **Protected configuration**: Config files not world-writable
993

            
994
#### NFS Security
995
- **User mapping**: all_squash prevents privilege escalation
996
- **Anonymous mapping**: anonuid=0,anongid=0 for consistent access
997
- **Performance vs security**: Balanced configuration for practical use
998

            
999
### 🧪 Testing & Validation
1000

            
1001
#### Configuration Testing
1002
- **Real-time validation**: Test configurations against current system state
1003
- **Device detection**: Check if UUIDs correspond to actual devices
1004
- **Network validation**: Verify interface existence and IP availability
1005

            
1006
#### Integration Testing
1007
- **Manual testing support**: Commands for manual mount/unmount testing
1008
- **Status verification**: Built-in checks for successful operations
1009
- **Rollback capability**: Automatic cleanup on operation failures
1010

            
1011
### 🚨 Error Handling Improvements
1012

            
1013
#### Graceful Failure Handling
1014
- **Descriptive error messages**: Clear indication of what went wrong
1015
- **Suggested remedies**: Specific commands to fix common issues
1016
- **Logging preservation**: All errors logged for later analysis
1017

            
1018
#### Recovery Mechanisms
1019
- **Automatic rollback**: Failed operations clean up after themselves
1020
- **State consistency**: System left in known good state after failures
1021
- **Manual recovery**: Clear instructions for manual intervention when needed
1022

            
1023
### 📖 Breaking Changes
1024

            
1025
#### Configuration Format
1026
- **No breaking changes**: Existing configurations continue to work
1027
- **Enhanced format**: New configurations use optimized NFS settings
1028
- **Backwards compatibility**: Old configurations preserved during upgrades
1029

            
1030
#### Command Interface
1031
- **Extended syntax**: Commands now accept optional parameters
1032
- **Backwards compatibility**: Old syntax continues to work
1033
- **Enhanced features**: New parameters provide additional functionality
1034

            
1035
### 🔄 Migration Guide
1036

            
1037
#### From Manual Configuration
1038
If you've been manually editing configuration files:
1039
1. **Backup existing configs**: `sudo cp /etc/pve/autonas/disks.conf ~/backup.conf`
1040
2. **Deploy via cluster system**: `./deploy.sh install` (preserves existing configs)
1041
3. **Use new tools**: `autonas list` to see current configurations
1042

            
1043
#### From Previous AutoNAS Version
1044
1. **Safe upgrade**: `./deploy.sh install` automatically preserves data
1045
2. **New features**: Start using `autonas add <UUID>` for new disks
1046
3. **Enhanced monitoring**: Use new logging commands for better visibility
1047

            
1048
### 🎯 Future Roadmap
1049

            
1050
#### Planned Features
1051
- **Web interface**: GUI for configuration management
1052
- **Notification system**: Email/webhook notifications for disk events
1053
- **Health monitoring**: SMART data integration and disk health reporting
1054
- **Cloud integration**: Automatic cloud backup triggers
1055

            
1056
#### Performance Improvements
1057
- **Parallel processing**: Concurrent handling of multiple disk operations
1058
- **Caching**: Configuration caching for faster operations
1059
- **Optimization**: Further NFS and mount option tuning
1060

            
1061
#### Security Enhancements
1062
- **TLS support**: Encrypted NFS where supported
1063
- **Access control**: Per-disk user/group restrictions
1064
- **Audit logging**: Enhanced security logging for compliance
1065

            
1066
---
1067

            
1068
### 📝 Notes
1069

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