百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

dysk

> 编程语言
开源

在 1 秒内安装 Azure 磁盘。可以安装多个磁盘。可以将它们安装在任何位置。dysk 将 Azure 磁盘作为 Linux 块设备直接安装在 VM 上。

182 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

在 1 秒内安装 Azure 磁盘。可以安装多个磁盘。可以将它们安装在任何位置。dysk 将 Azure 磁盘作为 Linux 块设备直接安装在 VM 上。

dysk (dīsk)

Attach Azure disks in Check Design for details on how dysk works.

How to use

Dysk works with storage accounts V1 or V2[storage api version:2017-04-17]. Premium SKU is subject to size based throttling. Please install dysk kernel module before running the below commands.

Auto-Create and mount 2 GB Azure Page Blob as a block device

bash
sudo dyskctl mount auto-create -a {STORAGE ACCOUNT NAME} -k {STORAGE ACCOUNT KEY}

## output
Created PageBlob in account:xdysk dysks/dysk6Hjr5R52.vhd(2GiB)
Wrote VHD header for PageBlob in account:xdysk dysks/dysk6Hjr5R52.vhd
Type                            Name                            VHD                             SizeGB                          AccountName                     Path
RW                              dysk6Hjr5R52                    Yes                             2                               xdysk                           /dysks/dysk6Hjr5R52.vhd

When using the auto-create command the client library by default writes the vhd footer for you. This enables you to mount the disk using ARM if needed. You can disable this using the -vhd flag Make sure the storage account supports http (not https)

Mount existing Azure Page Blob (with or without a lease id)

bash
sudo dyskctl mount -a {STORAGE ACCOUNT NAME} -k {STORAGE ACCOUNT KEY} -c {CONTAINER NAME} -d {DISK NAME} -i {LEASE ID}

## output
Type                            Name                            VHD                             SizeGB                          AccountName                     Path
RW                              dysk1cmwC5uU                    Yes                             2                               dyskdemo                        /dysks/dysk1cmwC5uU.vhd

Mount an existing Azure Page Blob (with a SAS):

bash
sudo dyskctl mount -a {STORAGE ACCOUNT NAME} -s {SAS URL} -p dyskHrcjoIj4.vhd -l -b

## SAS URLs are currently using this format:
## "se=2020-04-05T20%3A13%3A24Z&sig=foo%3D&sp=rw&sr=b&sv=2017-04-01"

If you are seeing error storage: service returned error: StatusCode=409, ErrorCode=LeaseAlreadyPresent, ErrorMessage=There is already a lease present., you can set the --break-lease flag to true to break the existing lease.

bash
sudo dyskctl mount -a {STORAGE ACCOUNT NAME} -k {STORAGE ACCOUNT KEY} -c {CONTAINER NAME} -d {DISK NAME} -i {LEASE ID} -b true

## output
lease not valid
acquiring new lease
break lease
Type                            Name                            VHD                             SizeGB                          AccountName                     Path
RW                              dysk1cmwC5uU                    Yes                             2                               dyskdemo                        /dysks/dysk1cmwC5uU.vhd

If you do not provide a --lease-id, you will most likely need to set the --break-lease flag to true to break any existing lease on it. Unless it has been previously released.

Dysks are block devices, so it can be used using common Linux commands

bash
#List block devices
lsblk

# dysks can be formatted as regular disks using mkfs command, example:
sudo mkfs.ext4 /dev/dysk6Hjr5R52 #Device name from the output above.

Dysks can be mounted as read-only (on many nodes) devices using the --read-only flag

You can list dysks using the following command

…

Keys are never stored, they are kept in module's kernel memory.

Unmounting using the following command

bash
sudo dyskctl unmount -d dysk6Hjr5R52 

for further CLI commands execute dyskctl --help

License

The kernel module is licensed as GPLv2 and the rest of the repo is licensed as MIT

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言