Configuring Singdata Lakehouse Volume as a File Storage Service in Dify
📋 Overview
Singdata Lakehouse Volume storage provides Dify with an enterprise-grade file storage backend, supporting three Volume types:
- Table Volume - Knowledge base file management (not currently recommended)
- User Volume - Knowledge base file storage (recommended)
- External Volume - Enterprise data lake integration
🚀 Quick Start
Environment Requirements
- Singdata Lakehouse instance
- Dify 1.7.2+
Basic Configuration
Configure in the Dify .env file:
📂 Volume Type Detailed Configuration
Volume Type Selection
Singdata Lakehouse Volume supports three types, each suitable for different scenarios:
| Type | Use Case | Config Complexity | Permission Control |
|---|---|---|---|
| user | Knowledge base mgmt | Simple | User-level |
| table | Enterprise multi-tenant | Medium | Table-level + User-level |
| external | Data lake integration | Complex | Volume-level + Storage-level |
1. Table Volume Configuration
Features:
- ✅ Permission inheritance from table, high security
- ✅ Tightly coupled with knowledge base data
- ✅ Supports multi-tenant isolation
- ✅ Automatic table name mapping
Use Cases:
- Knowledge base document storage
- Vector database associated files
- Multi-tenant file isolation
2. User Volume Configuration (Recommended for Knowledge Base)
Features:
- ✅ User-level isolation
- ✅ Automatic directory prefix, isolated from other applications
- ✅ All permissions granted by default
- ✅ Simple configuration
- ✅ Suitable for personal files
Use Cases:
- User personal file storage
- Temporary file processing
- User configuration files
- Small team file sharing
3. External Volume Configuration
Features:
- ✅ Enterprise data lake integration
- ✅ Supports S3/OSS/COS
- ✅ Large capacity storage
- ✅ Cross-platform access
Use Cases:
- Enterprise data lake integration
- Large file storage
- Cross-cloud platform data sharing
Permission Management: External Volume requires special permission configuration since it connects to external storage systems. Permission management includes:
- CREATE Permission: Creating External Volume requires administrator privileges
- USAGE Permission: Using External Volume requires explicit USAGE privilege
- File Operation Permissions: Controlled through the access policies of the underlying storage system (S3/OSS, etc.)
Permission Check Flow:
- Verify the user's USAGE permission on the External Volume
- Check if the file path is within the allowed Volume scope
- Verify access permissions through the underlying storage connection
- Perform final permission confirmation based on the operation type (read/write)
🚨 Troubleshooting
Common Issues
1. Connection Failed
Solution:
- Check username and password
- Confirm instance and service address
- Verify network connectivity
2. Insufficient Permissions
Table Volume Permission Error:
Solution:
- Check table permissions:
SHOW GRANTS ON TABLE dataset_xxx - Grant appropriate permissions:
GRANT INSERT,UPDATE,DELETE ON TABLE dataset_xxx TO user - Clear permission cache
User Volume Permission Error:
Solution:
- Check schema permissions:
SHOW GRANTS ON SCHEMA dify TO current_user - Grant schema permissions:
GRANT USAGE,CREATE ON SCHEMA dify TO user - Verify workspace permissions
External Volume Permission Error:
Solution:
- Check External Volume permissions:
SHOW GRANTS ON EXTERNAL VOLUME enterprise_data - Grant USAGE permission:
GRANT USAGE ON EXTERNAL VOLUME enterprise_data TO user - Verify underlying storage connection permissions
3. Volume Not Found
Solution:
- Confirm volume existence:
SHOW VOLUMES - Check table name prefix configuration
- Verify schema and workspace configuration
4. File Operation Failed
Solution:
- Check file path format
- Verify permission settings
- Confirm Volume type configuration
Updated Date: 2025-09-03 Applicable Version: Dify 1.7.2+
