标签归档:s3

常见 S3 存储服务多维度横评(附1TB存储传输成本)

之前看到猫猫大佬的 对象存储服务商价格对比:1TB存储与1TB流量基准分析 这篇文章很有启发。正好最近在探索物美价廉、稳定可靠的 S3 数据存储方案,将自己熟悉的、网上常见的一些提供 S3 的厂商服务做个整理,按照 1TB 数据存储和传输成本为指标做一个横评表格。希望给选购 S3 服务需求的人们有一些启发。

本文默认忽略了几大云厂商,如 AWS/Azure/GCP/Aliyun/Tencent,一方面几大巨头的成本较高,常人难以承受,故暂时排除。国内几大云厂商的 S3 计费规则相对复杂,出站流量普遍偏高,故暂时排除。

除了使用现成的 S3 服务,找一些稳定的 NVMe VPS 自建 Minio 也是不错的选择,可以做到超低价,但风险相对较高,大家自行探索,不在本文探讨范围内。

下面首先分标题整理各大厂商的存储和传输成本计费规则,最后整理一份汇总表格供大家参考。

各大厂商价格政策

Cloudflare R2

价格:

Standard storage Infrequent Access storage Free
Storage  存储 $0.015 / GB-month $0.01 / GB-month 10 GB-month / month
Class A Operations $4.50 / million requests $9.00 / million requests 1 million requests / month
Class B Operations $0.36 / million requests $0.90 / million requests 10 million requests / month
Data Retrieval (processing) None $0.01 / GB
Egress (data transfer to Internet) Free 1 Free 1 Free 1

区域:

Hint Hint description
wnam Western North America
enam Eastern North America
weur Western Europe
eeur Eastern Europe
apac Asia-Pacific
oc Oceania

References: https://developers.cloudflare.com/r2/pricing/ https://developers.cloudflare.com/r2/reference/data-location/

Cloudflare R2 不愧赛博大善人,提供 10GB 的免费存储空间,出站流量免费。区域主要有美国、欧洲和亚洲。

Backblaze B2

计费方式有两种:

  • 按量计费云存储(Pay-As-You-Go Cloud Storage):$6/TB/month 起。
  • B2 保留容量捆绑包(B2 Reserve Capacity Bundles):$1,560/20TB/year 起。 流量费用: 每月提供 3 倍的平均每月存储数据量免费传输,额外流出数据按每 GB 0.01 美元。

区域方面:

Backblaze currently has data centers in Sacramento, California; Stockton, California; Phoenix, Arizona; Reston, Virginia; Amsterdam, Netherlands; and Toronto, Ontario.

创建账号时就需要选择存储区域,可选 US East region, the US West region, the EU Central region, or the Canada East region

References: https://www.backblaze.com/cloud-storage/pricing https://www.backblaze.com/docs/cloud-storage-data-regions

根据官网价格工具计算,每存储 1TB 数据,每年需耗费 72 usd(6usd/m),提供 3TB 免费数据传输。若存储 2TB 数据,每年需耗费 144 usd,以此类推。

Wasabi

计费方式同样有两种:

  • 按量计费(Pay-As-You-Go):$6.99/TB/month 起。
  • 预留容量存储(Reserved Capacity Storage):针对超大规模存储,暂时忽略。
North America EMEA APAC
Wasabi Object Storage $6.99 TB/mo
($.0068 GB/mo)
Ingress Data Transfer = Free
Egress Data Transfer = Free

API Requests = Free*
$6.99 TB/mo
($.0068 GB/mo)
Ingress Data Transfer = Free
Egress Data Transfer = Free

API Requests = Free*
$6.99 TB/mo
($.0068 GB/mo)
Ingress Data Transfer = Free
Egress Data Transfer = Free

API Requests = Free*
Wasabi Cloud NAS $8.99 TB/mo
($.0088 GB/mo)
Ingress Data Transfer = Free
Egress Data Transfer = Free

API Requests = Free*
$8.99 TB/mo
($.0088 GB/mo)
Ingress Data Transfer = Free
Egress Data Transfer = Free

API Requests = Free*
$8.99 TB/mo
($.0088 GB/mo)
Ingress Data Transfer = Free
Egress Data Transfer = Free

API Requests = Free*

可知 Wasbi 在 North America, EMEA, APAC 几个区域提供服务,上下行流量免费,存储费用按量计费。即存储 1TB 数据每月需耗费 6.99USD,但是按照官网计算器,每年的费用是 83 USD。

根据官网可知, Wasbi 为用户免费提供为期 30天的 1 TB 存储空间,无需绑定信用卡。

References: https://wasabi.com/pricing https://wasabi.com/pricing/faq https://docs.wasabi.com/v1/docs/signing-up-for-wasabi

DigitalOcean Spaces

简单且可扩展的与 S3 兼容的对象存储,内置内容分发网络(CDN),用于存储、分发、备份和归档任意数量的网页内容、图片、媒体和静态文件,以支持您的 web 应用。

DigitalOcean 提供的 Spaces S3 服务,计费从 $5 每月开始,包含 250 GiB 存储,1 TiB 出站流量,额外的空间按照 $0.02/GiB 收取,额外的出站则按照 $0.01/GiB 收取。

因此,以 1TiB 的存储容量为例,每个月用户需要额外购买(1024 GiB – 250 GiB)= 774 GiB 的存储空间。这部分额外存储的费用为 774 GiB * $0.02/GiB = $15.48 每月 ,存储 1TiB 数据的总开销为 $5.00 + $15.48 = $20.48 每月。

在区域方面,根据官网信息,可提供 NYC3 AMS3 SFO2 SFO3 SGP1 LON1 FRA1 TOR1 BLR1 SYD1 这些区域的 Space S3 存储服务。

References: https://www.digitalocean.com/pricing/spaces-object-storage https://docs.digitalocean.com/products/spaces/details/availability/

Hetzner

直接提供 $5.99/monthly 的基础价格,包含 1TB 的数据存储和 1TB 的数据传输,额外的数据传输按照 $ 1.20 /TB 收取。额外的数据存储方面,似乎都是整数倍的递增。如存储 2TB 的数据则需收取 $11.98/monthly

区域方面,在 Falkenstein, DE (FSN1), Helsinki, FI (HEL1), and Nuremberg, DE (NBG1) 这些区域可用。

References: https://www.hetzner.com/storage/object-storage/

Scaleway Object Storage

Type of consumption Price Approx. per month
Multi-AZ Standard Object Storage €0.00002/GB /hour ~€0.0146/GB/month
One Zone – IA Object Storage €0,0000165/GB/hour ~€0.012/GB/month
Requests Included
Ingress Included
Bucket websites feature Free
Egress fees* – inter regional or to Internet 75 GB free every month,
then €0.01/GB
Archiving objects: Object Storage (Standard) → Cold Storage (Glacier) Free

根据官方的这份计费表格,可以看出,Scaleway 采用弹性计费,提供多区域和单区域两种。分别计算存储并出站 1TB 数据的费用为:

Type 1 TB 存储费用 1TB 传输费用
多区域 1000 * 0.0146 = €14.6/TB/M (1000-75) * 0.01 = €9.25/TB/M
单区域 1000 * 0.012 = €12/TB/M

注:GB 默认按照 1000 进制,GiB 默认按照 1024 进制,若无明确标出则默认按 GB 计算。

区域方面,支持这些:

  • Amsterdam, The Netherlands:
    • Region: nl-ams
  • Paris, France:
    • Region: fr-par
  • Warsaw, Poland:
    • Region: pl-waw

References: https://www.scaleway.com/en/pricing/storage/ https://www.scaleway.com/en/docs/object-storage/quickstart/

Vultr

提供四种对象存储规格:Standard、Premium、Performance 和 Accelerated,存储价格各不相同。整理表格如下:

Standard Premium Performance Accelerated
1TB Prices $18.00/month $36.00/month $50.00/month $100.00/month
additional $0.018/GB $0.036/GB $0.05/GB $0.1/GB

传输费用方面,套餐默认带有 1TB,额外的费用为 $10 per additional TB transferred

区域方面,登录后台查看,可以选择这些区域:US New York, US Chicago, US Los Angeles, NL Amsterdam, AU Sydney,GB London,SG Singapore, JP Tokyo, IN Bangalore

References: https://www.vultr.com/pricing/#object-storage

Linode Object Storage

Storage $/Mo Outbound Transfer Objects / Cluster*
250 GB $5 1 TB 1 Billion
500 GB $10 1 TB 1 Billion
1 TB $20 1 TB 1 Billion
5 TB $100 1 TB 1 Billion
10 TB $200 1 TB 1 Billion
50 TB $1,000 1 TB 1 Billion
100 TB $2,000 1 TB 1 Billion
500 TB $10,000 1 TB 1 Billion
1 PB $20,000 1 TB 1 Billion

$0.02 / GB Additional Storage,  $0.005 / GB Additional Outbound Transferred

官网提供了以上这份表格,可以看出存储并传输 1Tb 数据对应套餐为 $20/M.

区域方面,登录后在开通界面可以看到,North America, Europe Asia, South America, Oceania 这些区域均提供。

References: https://www.linode.com/products/object-storage/ https://www.linode.com/pricing/#object-storage

OVH Object Storage

OVH 在 12 个 US 区域提供 S3 存储,价格区别主要在 Local Zone 还是其他区域,两种类型分别以一个机房为例摘取官网价格:

United States (Vint Hill)

Name Price
Data storage $0.00001111 /GB/hour
Incoming internal traffic Included
Incoming public traffic Included
Outgoing internal traffic Included
Outgoing public traffic $0.011 /GB

Outgoing public traffic is offered free until February 28, 2025, in all our Local Zones.

United States (Los Angeles) Local Zone

Name Price
Data storage $0.00003042 /GB/hour
Outgoing public traffic $0.0122 /GB

Outgoing public traffic is offered free until February 28, 2025, in all our Local Zones.
出站公共流量在所有本地区域将免费提供至 2025 年 2 月 28 日。

针对单区域和多区域存储和传输 1TB 数据价格整理如下(仅供参考):

类型 1TB 存储价格 1TB 传输价格
Other Zone 0.00001111 * 1000 * 24 * 31 = $8.27/TB/M 0.011 * 1000 = $11.0/TB
Local Zone 0.00003042 * 1000 * 24 * 31 = $22.63/TB/M 0.0122 * 1000 = $12.2/TB

References: https://us.ovhcloud.com/public-cloud/object-storage/ https://us.ovhcloud.com/public-cloud/prices/

汇总表格

厂商 免费额度 区域 存储费用政策 流量费用政策 1TB 存储成本 1TB 流量成本 1TB 合计费用
Cloudflare R2 10GB 存储/月
100万 Class A 操作/月
1000万 Class B 操作/月
北美东西部
欧洲东西部
亚太
大洋洲
Standard: $0.015/GB/月
IA: $0.01/GB/月
出站流量免费 约 $15/月 $0 约 $15/月
Backblaze B2 美国东西部
欧洲中部
加拿大东部
$6/TB/月
($0.006/GB/月)
提供3倍存储量的免费流量
超出部分 $0.01/GB
$6/月 $0
(3TB免费额度足够)
$6/月
($72/年)
Wasabi 30天1TB试用
(不需信用卡)
北美
欧洲中东非洲
亚太
$6.99/TB/月
($0.0068/GB/月)
入站和出站免费 $6.99/月 $0 $6.99/月
($83/年)
DigitalOcean Spaces 250GB存储
1TB出站流量
(基础套餐内)
美国(NYC3,SFO2,SFO3)
欧洲(AMS3,LON1,FRA1)
亚太(SGP1,BLR1,SYD1)
加拿大(TOR1)
基础套餐$5/月
额外存储$0.02/GB
基础套餐包含1TB流量
额外流量$0.01/GB
$20.48/月 已包含在基础套餐中 $20.48/月
Hetzner 德国(Falkenstein,Nuremberg)
芬兰(Helsinki)
$5.99/TB/月 包含1TB流量
额外流量$1.20/TB
$5.99/月 已包含在基本套餐中 $5.99/月
Scaleway 75GB出站流量/月 荷兰(Amsterdam)
法国(Paris)
波兰(Warsaw)
多区域:€0.0146/GB/月
单区域:€0.012/GB/月
75GB/月免费
额外€0.01/GB
多区域:€14.6/月
单区域:€12/月
€9.25/月
(除了免费的75GB)
多区域:约€23.85/月
单区域:约€21.25/月
Vultr 美国(纽约,芝加哥,洛杉矶)
荷兰(阿姆斯特丹)
澳大利亚(悉尼)
英国(伦敦)
新加坡
日本(东京)
印度(班加罗尔)
Standard:$18/TB/月
Premium:$36/TB/月
Performance:$50/TB/月
Accelerated:$100/TB/月
包含1TB流量
额外$10/TB
Standard:$18/月 已包含在基本套餐中 Standard:$18/月
Linode Object Storage 北美
欧洲
亚洲
南美
大洋洲
$20/TB/月
额外存储$0.02/GB
包含1TB流量
额外流量$0.005/GB
$20/月 已包含在基本套餐中 $20/月
OVH Object Storage
(2025年2月28日前出站公共流量免费)
美国(多区域) 普通区域:约$8/TB/月
($0.00001111/GB/小时)
本地区域:约$22/TB/月
($0.00003042/GB/小时)
普通区域:$0.011/GB
本地区域:$0.0122/GB
(目前均免费到2025年2月)
普通区域:约$8/月
本地区域:约$22/月
$0
(限时免费)
普通区域:约$8/月
本地区域:约$22/月
(限时优惠中)

其他流行的S3兼容存储服务

By Claude 3.7 sonnet

除了提到的这些服务商外,还有以下几家值得考虑的S3兼容存储提供商:

  1. Amazon S3 – 作为对象存储的鼻祖,仍然是最流行的选择之一

    • 存储费用: 标准存储约$0.023/GB/月(美国区域)
    • 流量费用: 入站免费,出站第一个1GB免费,之后按阶梯定价
    • 免费额度: 免费套餐提供5GB存储和20,000个GET请求
  2. Google Cloud Storage – 谷歌的对象存储解决方案

    • 存储费用: 标准存储约$0.02/GB/月
    • 流量费用: 入站免费,站内免费,出站按区域定价
    • 免费额度: 5GB存储和5GB出站流量
  3. Microsoft Azure Blob Storage – 微软的对象存储服务

    • 存储费用: 标准存储约$0.018/GB/月(热访问层)
    • 流量费用: 入站免费,站内免费,出站按区域定价
    • 免费额度: 5GB存储和免费入站数据传输
  4. Alibaba Cloud OSS (Object Storage Service) – 阿里云的对象存储服务

    • 存储费用: 标准存储约$0.018/GB/月
    • 流量费用: 入站免费,出站按区域计费
    • 全球多区域覆盖,包括中国大陆
  5. IBM Cloud Object Storage

    • 存储费用: 标准存储约$0.02/GB/月
    • 流量费用: 入站免费,出站按区域定价
    • 全球多区域覆盖
  6. OVH Object Storage

    • 存储费用: €0.01/GB/月起
    • 流量费用: 入站免费,出站按区域定价
    • 区域: 欧洲,北美,亚太

这些服务在性能、价格和地区覆盖方面各有优势,适合不同的使用场景。选择时应考虑存储需求、访问模式、地理位置和预算等因素。

总结

按需选择,也可考虑自建方案,实际费用以出账站单为准。

References

s3cmd 常见用法

常见用法

  • 列举所有 Buckets
    $ s3cmd ls
  • 创建 bucket,且 bucket 名称是唯一的,不能重复。
    s3cmd mb s3://my-bucket-name
  • 删除空 bucket
    s3cmd rb s3://my-bucket-name
  • 列举 Bucket 中的内容
    s3cmd ls s3://my-bucket-name
  • 上传 file.txt 到某个 bucket,
    s3cmd put file.txt s3://my-bucket-name/file.txt
  • 上传并将权限设置为所有人可读
    s3cmd put --acl-public file.txt s3://my-bucket-name/file.txt
  • 批量上传文件
    s3cmd put ./* s3://my-bucket-name/
  • 下载文件
    s3cmd get s3://my-bucket-name/file.txt file.txt
  • 批量下载
    s3cmd get s3://my-bucket-name/* ./
  • 删除文件
    s3cmd del s3://my-bucket-name/file.txt
  • 来获得对应的bucket所占用的空间大小
    s3cmd du -H s3://my-bucket-name
  • 设置S3 bucket的Public权限
    s3cmd setacl s3://myexamplebucket.calvium.com/ --acl-public --recursive

临时链接

s3cmd signurl s3://example-bucket/image.jpg 1657457538
  • example-bucket — the name of the bucket that hosts the file,
  • image.jpg — the file you want to share,
  • 1657457538 — link expiry time in the Timestamp format, use the converter to convert time formats.

References

Juice FS 初探 | 一种为 VPS 提供无限磁盘空间的解决方案

JuiceFS 是一款面向云原生设计的高性能分布式文件系统,在 Apache 2.0 开源协议下发布。提供完备的 POSIX 兼容性,可将几乎所有对象存储接入本地作为海量本地磁盘使用,亦可同时在跨平台、跨地区的不同主机上挂载读写。

使用 JunicsFS 将云厂商的 S3 对象存储挂载到本地,就得到一个几乎无限容量的 VPS 空间了。目前 Juice 支持大部份主流厂商提供的 s3 服务,具体请查阅官方文档。

本文以 腾讯云 COS + 腾讯云轻量服务器,演示一下基本使用。

挂载 COS 到本地

使用以下命令即可创建一个基于 COS 的文件系统,下面演示基于 sqlite 和 redis 的创建、挂载、卸载命令。

# Jfs With Redis
juicefs format \
    --storage cos \
    --bucket jfs-redis-******** \
    --access-key ******** \
    --secret-key ******** \
    "redis://127.0.0.1:6379/1" \
    jfs-redis
# 挂载
juicefs mount -d "redis://127.0.0.1:6379/1" /mnt/jfs-redis/
# 卸载
juicefs umount /mnt/jfs-redis/

# Jfs With sqlite
juicefs format \
    --storage cos \
    --bucket jfs-******** \
    --access-key ******** \
    --secret-key ******** \
    "sqlite3:///opt/jfs/jfs.db" \
    jfs
# 挂载
juicefs mount -d "sqlite3:///opt/jfs/jfs.db" /mnt/jfs/
# 卸载
juicefs umount /mnt/jfs/

自动挂载

具体使用时,可以配置一下自动挂载,方法如下。

首先创建一个从 /sbin/mount.juicefsjuicefs 可执行文件的软链接,操作系统解析 fstab 时会调用 /sbin/mount.juicefs 命令。

$ which juicefs
/usr/local/bin/juicefs
$ ln -s /usr/local/bin/juicefs /sbin/mount.juicefs

新增以下内容到 /etc/fstab 使得开机自动挂载,这里以上文 sqlite 为例:

sqlite3:///opt/jfs/jfs.db    /mnt/jfs       juicefs     _netdev,max-uploads=50,writeback,cache-size=204800     0  0

使用 mount -a 使配置生效

限制容量和文件数

没有限制的行为可想而知,JuicsFS 的默认限制较高,可以手动限制一下文件系统的容量和文件数量。

# 限制文件系统容量 (GiB)
$ juicefs config "sqlite3:///opt/jfs/jfs.db" --capacity 102400
# 限制文件数量 (inode 数)
$ juicefs config "sqlite3:///opt/jfs/jfs.db" --inodes 100000

限制容量举例,可以看到设定前后可以看到挂载点容量的变化:

# 示例
$ df -h | grep jfs
Filesystem      Size  Used Avail Use% Mounted on
JuiceFS:jfs     1.0P  8.0K  1.0P   1% /mnt/jfs

# 设定容量上限为 128 GiB
$ juicefs config "sqlite3:///opt/jfs/jfs.db" --capacity 128
2022/11/20 21:07:08.832094 juicefs[2253158] 
<INFO>: Meta address: sqlite3:///opt/jfs/jfs.db [interface.go:402]
  capacity: 0 GiB -> 128 GiB

# 再次查看发现大小为 128GiB
$ df -h | grep jfs
JuiceFS:jfs     128G  8.0K  128G   1% /mnt/jfs

限制文件 inodes 数量举例,可以看到设定前后可以看到挂载点容量的变化:

# 示例
$ df -i
Filesystem       Inodes  IUsed    IFree IUse% Mounted on
/dev/vda2       3901440 367127  3534313   10% /
JuiceFS:jfs    10485762      2 10485760    1% /mnt/jfs

$ juicefs config "sqlite3:///opt/jfs/jfs.db" --inodes 3901440
2022/11/20 21:13:30.977616 juicefs[2255902] 
<INFO>: Meta address: sqlite3:///opt/jfs/jfs.db [interface.go:402]
    inodes: 0 -> 3901440
$ df -i
Filesystem       Inodes  IUsed    IFree IUse% Mounted on
/dev/vda2       3901440 367128  3534312   10% /
JuiceFS:jfs     3901440      2  3901438    1% /mnt/jfs

性能测试

文件系统怎么能没有性能测试呢,下面分别使用 dd 和自带 bench 演示性能。

dd 简单读写测试

# 本地文件系统 io 性能
$ sync; dd if=/dev/zero of=/tmp/tempfile-12138 bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 5.563 s, 193 MB/s

# JuicfFS sqlite 元数据驱动性能
$ sync; dd if=/dev/zero of=/mnt/jfs/tmpfile bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 6.97672 s, 154 MB/s

# JuicfFS redis 元数据驱动性能
$ sync; dd if=/dev/zero of=/mnt/jfs-redis/tmpfile-12138 bs=1M count=1024; sync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 5.59675 s, 192 MB/s

juicefs bench 测试

本地文件系统成绩

# juicefs bench -p 4 /tmp/
  Write big blocks count: 4096 / 4096 [==============================================================]  done
   Read big blocks count: 4096 / 4096 [==============================================================]  done
Write small blocks count: 400 / 400 [==============================================================]  done
 Read small blocks count: 400 / 400 [==============================================================]  done
  Stat small files count: 400 / 400 [==============================================================]  done
Benchmark finished!
BlockSize: 1 MiB, BigFileSize: 1024 MiB, SmallFileSize: 128 KiB, SmallFileCount: 100, NumThreads: 4
+------------------+------------------+--------------+
|       ITEM       |       VALUE      |     COST     |
+------------------+------------------+--------------+
|   Write big file |     153.98 MiB/s | 26.60 s/file |
|    Read big file |     148.60 MiB/s | 27.56 s/file |
| Write small file |   2064.9 files/s | 1.94 ms/file |
|  Read small file |   3150.8 files/s | 1.27 ms/file |
|        Stat file | 111847.4 files/s | 0.04 ms/file |
+------------------+------------------+--------------+

juicefs + sqlite 成绩

$ juicefs bench -p 4 /mnt/jfs
  Write big blocks count: 4096 / 4096 [==============================================================]  done
   Read big blocks count: 4096 / 4096 [==============================================================]  done
Write small blocks count: 400 / 400 [==============================================================]  done
 Read small blocks count: 400 / 400 [==============================================================]  done
  Stat small files count: 400 / 400 [==============================================================]  done
Benchmark finished!
BlockSize: 1 MiB, BigFileSize: 1024 MiB, SmallFileSize: 128 KiB, SmallFileCount: 100, NumThreads: 4
Time used: 72.0 s, CPU: 35.5%, Memory: 704.1 MiB
+------------------+------------------+---------------+
|       ITEM       |       VALUE      |      COST     |
+------------------+------------------+---------------+
|   Write big file |     148.25 MiB/s |  27.63 s/file |
|    Read big file |     144.29 MiB/s |  28.39 s/file |
| Write small file |     40.5 files/s | 98.83 ms/file |
|  Read small file |    715.9 files/s |  5.59 ms/file |
|        Stat file |   3759.0 files/s |  1.06 ms/file |
|   FUSE operation | 71735 operations |    2.99 ms/op |
|      Update meta |  4773 operations |   27.18 ms/op |
|       Put object |  1424 operations |  443.33 ms/op |
|       Get object |     0 operations |    0.00 ms/op |
|    Delete object |     0 operations |    0.00 ms/op |
| Write into cache |  1424 operations |  281.82 ms/op |
|  Read from cache |  1428 operations |  556.68 ms/op |
+------------------+------------------+---------------+

juicefs + redis 成绩

试着跑了一次,结果跑崩了,想玩的自己跑一跑吧。

由于 redis 是内存数据库,跑这种没有上限的测试一定要谨慎。在实际使用中,也要根据自己的需要选择,否则机器很容易 gg。

垃圾清理

juicefs 默认有回收站机制,删除文件默认在回收站保留一天。

可以去挂载目录下执行这条命令彻底删除:

$ find .trash -name '*.tmp' | xargs rm -f

总结

本文介绍了 JuiceFS 的基本用法,为“大盘鸡”需求提供一种新的思路,展示了使用对象存储挂载到机器作为文件系统的基本效果。

目前看来是解决系统盘过小问题的好方案,但具体是不是采纳这种方案,等我明天看看账单再做决定。

第二天看了下账单,跑了大概 10 轮测试,账单 0.02¥ ,初步看还能接受:

至于元数据引擎的选择,在单节点服务器的需求上我还是偏向 sqlite 或 mysql 集群的方案,redis 虽然性能强劲,但实在有点吃不消。

最后,这一定是一个很棒的项目,在对接 docker、k8s 之类的容器设施非常方便,提供了插件,可以像操作默认存储卷一样使用,还可以直接使用挂载在本地的路径,总之,在一些方面 JuiceFS 做的已经很好了,下面就是等待时间的检验了。

参考文献