Object & Block Storage
Lineserve provides scalable, secure, and high-performance storage solutions for all your data needs. Choose from Object Storage for unstructured data and Block Storage for high-performance applications.
Storage Typesโ
๐๏ธ Object Storageโ
S3-compatible object storage for websites, backups, media files, and data archiving.
๐พ Block Storageโ
High-performance SSD block storage that can be attached to VPS instances for additional capacity.
Object Storageโ
Overviewโ
Lineserve Object Storage is fully compatible with Amazon S3 API, making it easy to migrate existing applications and use familiar tools.
Key Featuresโ
- S3 Compatible: Use existing S3 tools and SDKs
- Scalable: Store unlimited amounts of data
- Durable: 99.999999999% (11 9's) durability
- Global CDN: Built-in content delivery network
- Versioning: Keep multiple versions of objects
- Lifecycle Policies: Automatic data management
Use Casesโ
- Static Website Hosting: Host static websites and SPAs
- Media Storage: Store images, videos, and documents
- Backup & Archive: Long-term data retention
- Data Lakes: Big data analytics and processing
- Content Distribution: Global content delivery
Getting Started with Object Storageโ
Creating a Bucketโ
# Using Lineserve CLI
lineserve storage create-bucket my-website-assets --region us-east-1
# Using AWS CLI (S3 compatible)
aws s3 mb s3://my-website-assets --endpoint-url https://storage.lineserve.com
Uploading Filesโ
# Upload a single file
lineserve storage upload ./index.html s3://my-website-assets/
# Upload entire directory
lineserve storage sync ./dist/ s3://my-website-assets/ --delete
Setting Permissionsโ
# Make bucket public for website hosting
lineserve storage set-bucket-policy my-website-assets --public-read
# Set CORS for web applications
lineserve storage set-cors my-website-assets --allow-origin "*"
Object Storage Pricingโ
Storage Class | Price per GB/month | Use Case |
---|---|---|
Standard | $0.023 | Frequently accessed data |
Infrequent Access | $0.015 | Monthly access |
Archive | $0.004 | Long-term backup |
Deep Archive | $0.002 | Compliance & archival |
Additional Costs:
- Requests: $0.0004 per 1,000 requests
- Data Transfer: $0.09 per GB (first 1TB free)
- CDN: $0.08 per GB delivered
Block Storageโ
Overviewโ
High-performance SSD block storage that can be attached to VPS instances for additional storage capacity.
Key Featuresโ
- High Performance: Up to 40,000 IOPS per volume
- Scalable: 1GB to 16TB per volume
- Snapshots: Point-in-time backups
- Encryption: AES-256 encryption at rest
- Multi-Attach: Share volumes between instances
- Live Resize: Expand volumes without downtime
Storage Typesโ
- General Purpose SSD: Balanced price and performance
- High Performance SSD: Maximum IOPS for databases
- Cold Storage: Cost-effective for infrequent access
Getting Started with Block Storageโ
Creating a Volumeโ
# Create a 100GB general purpose volume
lineserve compute create-volume \
--name "database-storage" \
--size 100 \
--type gp3 \
--region us-east-1
Attaching to VPSโ
# Attach volume to VPS instance
lineserve compute attach-volume \
--volume-id vol-12345678 \
--instance-id vps-87654321 \
--device /dev/sdb
Formatting and Mountingโ
# Format the volume (on VPS)
sudo mkfs.ext4 /dev/sdb
# Create mount point
sudo mkdir /mnt/data
# Mount the volume
sudo mount /dev/sdb /mnt/data
# Add to fstab for persistent mounting
echo '/dev/sdb /mnt/data ext4 defaults 0 0' | sudo tee -a /etc/fstab
Block Storage Pricingโ
Type | Price per GB/month | IOPS | Use Case |
---|---|---|---|
General Purpose | $0.10 | 3,000 | Web servers, development |
High Performance | $0.25 | 40,000 | Databases, analytics |
Cold Storage | $0.045 | 500 | Backups, archives |
Additional Costs:
- Snapshots: $0.05 per GB/month
- Data Transfer: Free within same region
Storage Managementโ
Snapshots & Backupsโ
Creating Snapshotsโ
# Create snapshot of block volume
lineserve compute create-snapshot \
--volume-id vol-12345678 \
--name "database-backup-2024-01-15"
# Schedule automatic snapshots
lineserve compute schedule-snapshots \
--volume-id vol-12345678 \
--frequency daily \
--retention 7
Object Storage Versioningโ
# Enable versioning on bucket
lineserve storage enable-versioning my-bucket
# List object versions
lineserve storage list-versions s3://my-bucket/important-file.txt
Lifecycle Managementโ
Object Storage Lifecycleโ
{
"Rules": [
{
"Id": "ArchiveOldFiles",
"Status": "Enabled",
"Transitions": [
{
"Days": 30,
"StorageClass": "INFREQUENT_ACCESS"
},
{
"Days": 90,
"StorageClass": "ARCHIVE"
}
]
}
]
}
Block Storage Cleanupโ
# Delete old snapshots
lineserve compute delete-snapshots \
--older-than 30d \
--volume-id vol-12345678
Integration Examplesโ
Static Website Hostingโ
# Configure bucket for website hosting
lineserve storage configure-website my-website \
--index-document index.html \
--error-document error.html
# Deploy React/Vue app
npm run build
lineserve storage sync ./build/ s3://my-website/ --delete
Database Storageโ
# Create high-performance volume for database
lineserve compute create-volume \
--name "postgres-data" \
--size 500 \
--type hp-ssd \
--encrypted
# Attach and configure
lineserve compute attach-volume --volume-id vol-db123 --instance-id vps-db001
Backup Strategyโ
# Automated backup script
#!/bin/bash
DATE=$(date +%Y%m%d)
# Create database dump
pg_dump myapp > /tmp/backup-$DATE.sql
# Upload to object storage
lineserve storage upload /tmp/backup-$DATE.sql s3://backups/database/
# Create block storage snapshot
lineserve compute create-snapshot --volume-id vol-12345678 --name "backup-$DATE"
Performance Optimizationโ
Object Storageโ
- Use multipart uploads for large files
- Enable CDN for global distribution
- Implement proper caching headers
- Use appropriate storage classes
Block Storageโ
- Choose right volume type for workload
- Enable encryption for security
- Monitor IOPS usage
- Use snapshots for backup strategy
Security & Access Controlโ
Object Storage Securityโ
# Set bucket policy for specific access
lineserve storage set-bucket-policy my-bucket --policy '{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {"AWS": "arn:lineserve:iam::account:user/webapp"},
"Action": "s3:GetObject",
"Resource": "arn:lineserve:s3:::my-bucket/*"
}
]
}'
Block Storage Securityโ
- Enable encryption at rest
- Use IAM policies for access control
- Regular security audits
- Secure snapshot management
Monitoring & Alertsโ
Storage Metricsโ
- Storage usage and growth
- Request rates and errors
- Performance metrics (IOPS, throughput)
- Cost tracking and optimization
Setting Up Alertsโ
# Alert when storage usage exceeds threshold
lineserve monitoring create-alert \
--metric storage.usage \
--threshold 80% \
--notification email:admin@company.com
Troubleshootingโ
Common Issuesโ
Slow Upload/Download Speeds
- Check network connectivity
- Use multipart uploads for large files
- Consider CDN for global access
Permission Denied Errors
- Verify IAM policies
- Check bucket/volume permissions
- Ensure correct API credentials
Volume Mount Issues
- Verify volume is attached
- Check filesystem format
- Review mount permissions
API Referenceโ
Object Storage APIโ
Compatible with Amazon S3 API v4. Use existing S3 SDKs and tools.
Endpoint: https://storage.lineserve.com
Block Storage APIโ
Create Volumeโ
POST /v1/volumes
{
"name": "my-volume",
"size": 100,
"type": "gp3",
"encrypted": true
}
Attach Volumeโ
POST /v1/volumes/{volume-id}/attach
{
"instance_id": "vps-12345678",
"device": "/dev/sdb"
}