Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

dysk

> 编程语言
Open source

Attach Azure disks in < 1 second. Attach as many as you want. Attach them where ever you want. dysk mounts Azure disks as Linux block devices directly on VMs wi

182 stars0 likes0 views
WebsiteGitHub

About

Attach Azure disks in < 1 second. Attach as many as you want. Attach them where ever you want. dysk mounts Azure disks as Linux block devices directly on VMs wi

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 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

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