Skip to main content
Version: 7.25

disk


disk​

Conditions: !smips
Type: Directory

FlagNameDescription
XdisabledThe device is disabled and is not used.
Aacquiredacquired
EemptyThe slot is empty, with no disk present. After eject, the slot stays empty until the disk is rescanned with scan or replugged.
Bblock-deviceThe device is a block device, that is, it can be used as storage: formatted or used in a RAID array. Devices without this flag only describe the disk layout.
MmountedThe device is mounted and its files appear in /file.
FformattingThe device is currently being formatted.
Sswap-enabledSwap is enabled on the device (swap=yes); the device is used as swap space, for example by containers.
fraid-member-failedA member of the RAID array is in failed state.
rraid-memberThe device is a member of a RAID array.
cencryptedThe device is encrypted, for example with type=crypted (dm-crypt).
gguid-partition-tableThe device has a GUID partition table (GPT).
ppartitionThe device is a partition of a disk.
tnvme-tcp-exportThe device is exported as an NVMe-over-TCP target.
iiscsi-exportThe device is exported as an iSCSI target.
ssmb-sharingThe device is shared through the built-in SMB server.
nnfs-sharingThe device is shared with the NFS server.
mmedia-sharingThe device is shared through the DLNA media server.
Lself-encrypted-and-lockedself-encrypted-and-locked
Oself-encryption-enabledTCG-Opal self-encryption is active on the drive.
oself-encryption-supportedThe drive supports TCG-Opal self-encryption, but it is not enabled.
ArgumentTypeDescription
type ( mandatory )enum (raid | nvme-tcp | iscsi | nfs | smb | partition | tmpfs | ramdisk | crypted | sshfs | file | hardware)

Type of the item:

  • hardware - a physical disk attached to the router, for example in a USB, SATA or NVMe slot.
  • partition - a partition on a hardware disk (see parent).
  • file - a file mounted as a block device (loop), for example a swap file or a mounted .iso / .squashfs image.
  • tmpfs - a folder in RAM, see Tmpfs.
  • ramdisk - part of RAM used as a block device, see Ramdisk (storage package).
  • raid - a RAID array built from several disks, see RAID (storage package).
  • crypted - a dm-crypt encrypted block device, see Encrypted storage (storage package).
  • nvme-tcp - a disk mounted over NVMe over TCP, see NVMe over TCP (storage package).
  • iscsi - an iSCSI target mounted as a disk, see iSCSI (storage package).
  • nfs - an NFS share mounted as a disk, see NFS (storage package).
  • smb - an SMB share mounted as a disk, see SMB (storage package).
  • sshfs - a remote folder mounted over SSH.
slotstringName of the disk item, normally based on where the device is physically connected, for example nvme1 or usb1. The name is assigned automatically and can be set manually. Other commands and parent refer to the disk by this name.
parentenum ()Parent device of the item. On a type=partition item it selects the hardware disk the partition is created on, for example add type=partition parent=nvme9 ...; on type=crypted it is the drive or partition that is encrypted.
mount-point-templatestring

Template of the mount point, the folder under which the file system appears in /file. The following variables are replaced:

  • [slot] (default) - the slot name.
  • [model] - the device model.
  • [serial] - the device serial number.
  • [fw-version] - the device firmware version.
  • [fs-label] - the file system label.
  • [fs-uuid] - the file system UUID.
  • [fs] - the file system type. Variables can be combined, for example [model]-[fs]. An empty template is rejected, and unset mount-point-template restores the default [slot]. The default for newly added disks is set by default-mount-point-template in settings. See Disks.
mount-filesystemboolWhether the device's file system is mounted, so its files are available in /file. mount-filesystem=no unmounts the file system, which is required before /disk check or /disk repair. Default: yes.
mount-read-onlyboolWhether the mounted file system is read-only. Default: no.
compressboolWhether the device's file system is mounted with compression. Only supported on btrfs file systems; RouterOS reports compression only available for btrfs when it is set on other file systems. Default: no.
partition-numbernumNumber of the partition on the parent disk, for example partition-number=1 for the first partition.
partition-offsetnumStart offset of the partition on the disk, in bytes. Use it to adjust where the partition begins.
partition-sizenumSize of the partition in bytes. When it is not set, the partition takes the remaining space on the disk. See Disks.
raid-type (syscap=storage)enum (0 | 1 | 4 | 5 | 6 | linear) { 0:0, 1:1, 4:4, 5:5, 6:6 }

RAID level of the array:

  • 0 - striping: data is spread evenly over all disks, no fault tolerance, best performance.
  • 1 - mirroring: the same data is written to all disks, best fault tolerance.
  • 4 - block-level striping with parity stored on a dedicated disk.
  • 5 - block-level striping with distributed parity, survives one disk failure.
  • 6 - block-level striping with double parity, survives two disk failures.
  • linear - the disks are joined into one large disk without redundancy. See RAID.
raid-device-count (syscap=storage)numNumber of devices (disks) in the RAID array, set when the array is created.
raid-max-component-size (syscap=storage)numMaximum size of an individual device in the RAID array.
raid-chunk-size (syscap=storage)enum (64K | 128K | 256K | 512K | 1M | 2M | 4M) { 64K:64, 128K:128, 256K:256, 512K:512, 1M:1024, 2M:2048, 4M:4096 }Size of the chunks (stripes) written across the disks of the array, for example 1M.
raid-master (syscap=storage)enum (none)RAID block device a disk belongs to. Set it together with raid-role on the member disks to add them to an array created with add type=raid .... On the RAID item itself it is none.
raid-role (syscap=storage)numPosition of the disk within the RAID array, set with raid-master, starting from 0, or spare to mark the disk as a hot spare.
raid-member-failed (syscap=storage)boolMarks a drive as failed in the RAID array. Used when a non-failed drive needs to be replaced.
nvme-tcp-export (syscap=storage)boolWhether the device is exported as an NVMe-over-TCP target, so other devices can mount it. Default: no. See NVMe over TCP.
nvme-tcp-server-port (syscap=storage)numPort on which the NVMe-over-TCP server accepts connections from initiators. See NVMe over TCP.
nvme-tcp-server-nqn (syscap=storage)stringNVMe Qualified Name (NQN) of the exported device, used by initiators to connect. See NVMe over TCP.
nvme-tcp-server-allow-host-name (syscap=storage)stringHostnames allowed to connect to the NVMe-over-TCP server, for host-based access control. See NVMe over TCP.
nvme-tcp-server-password (syscap=storage)stringPassword the NVMe-over-TCP server requires from initiators. See NVMe over TCP.
nvme-tcp-address (syscap=storage)ipAddrIP address of the NVMe-over-TCP target (host) to mount, on the nvme-tcp client. See NVMe over TCP.
nvme-tcp-nqn (syscap=storage)stringNVMe Qualified Name (NQN) of the target on the server to mount, on the nvme-tcp client. See NVMe over TCP.
nvme-tcp-host-name (syscap=storage)stringHostname the nvme-tcp initiator (client) identifies itself with; used for identification and authentication on the server. See NVMe over TCP.
nvme-tcp-password (syscap=storage)stringPassword used to authenticate the NVMe-over-TCP connection to the server. See NVMe over TCP.
nvme-tcp-port (syscap=storage)numPort the NVMe-over-TCP target listens on for connections from initiators. Default: 4420. See NVMe over TCP.
iscsi-export (syscap=storage)boolWhether the device is exported as an iSCSI target. Default: no. See iSCSI.
iscsi-server-port (syscap=storage)numPort the iSCSI server listens on. See iSCSI.
iscsi-server-iqn (syscap=storage)stringiSCSI Qualified Name (IQN) of the iSCSI server, by default iqn.2000-02.com.mikrotik:<slot>. See iSCSI.
iscsi-port (syscap=storage)numPort the iSCSI target listens on for connections from initiators. Default: 3260. See iSCSI.
iscsi-address (syscap=storage)ipAddrIP address of the iSCSI target (host) to mount, on the iscsi client. See iSCSI.
iscsi-iqn (syscap=storage)stringiSCSI Qualified Name (IQN) of the target to mount, on the iscsi client. See iSCSI.
nfs-sharing (syscap=storage)boolWhether the device is shared with NFS, so network clients can mount it. Default: no. See NFS.
nfs-address (syscap=storage)ipAddrIP address of the NFS server to mount, on the nfs client. See NFS.
nfs-share (syscap=storage)stringFolder to mount on the NFS server, on the nfs client. See NFS.
smb-sharingboolWhether the device is shared through the built-in SMB server (/ip/smb) when it is mounted. With auto-smb-sharing=yes in settings it is enabled automatically. Default: no.
smb-server-userenum ()SMB user of the auto-created share of this disk; the default for new disks is taken from auto-smb-user in settings.
smb-server-passwordstringPassword of the SMB user of the auto-created share.
smb-server-encryptionboolWhether connections to the SMB share of this disk must be encrypted.
smb-addressipAddrIP address of the SMB server to mount, on the smb client. See SMB.
smb-sharestringName of the share to mount on the server, on the smb client. See SMB.
smb-userstringSMB user to authenticate with, on the smb client. See SMB.
smb-passwordstringPassword of the SMB user, on the smb client.
smb-encryptionboolWhether the connection to the remote SMB share is encrypted, on the smb client.
media-sharingboolWhether the device is shared through the DLNA media server (/ip/media) when it is mounted. With auto-media-sharing=yes in settings it is enabled automatically. Default: no.
media-interfaceiface_enum { none }Interface the DLNA media server uses for the share of this disk, set together with media-sharing=yes.
tmpfs-max-sizenumMaximum size of a tmpfs folder, in decimal units (100M is 100 000 000 bytes). The folder uses RAM only for the files stored in it. When the size is not set (it reads 0), the folder can grow to about half of the RAM. RouterOS adds up the maximum sizes of all tmpfs folders, counting a folder without tmpfs-max-size as half of the RAM, and refuses a new size when the total is more than the router can provide (too much memory requested for tmpfs/ramdisk). The size in print is rounded up to whole 4 KiB memory pages. A new value applies at once, also to a mounted folder. The contents of a tmpfs are lost on reboot or power loss. See Tmpfs. Default: not set.
ramdisk-size (syscap=storage)numSize of the RAM block device created with type=ramdisk, rounded up to a multiple of 16 KiB. The RAM is not reserved when the ramdisk is added. A reboot or power loss clears it: the ramdisk stays, but empty and without a file system, so format it again. Needs the rose-storage package. See Ramdisk.
crypted-backend (syscap=storage)enum (none)The drive or partition to encrypt with type=crypted. See Encrypted storage.
encryption-key (syscap=storage)stringThe key used to decrypt the crypted device. See Encrypted storage.
self-encryption-password (syscap=storage)stringPassword that enables TCG-Opal self-encryption on a supported (SED) drive; unsetting it disables self-encryption. See Self-encrypting drives.
sshfs-addressstringAddress (IP address or hostname) of the SSH server to mount, for type=sshfs. See SSHFS.
sshfs-portnumPort of the SSH server to connect to, for type=sshfs (default: 22). See SSHFS.
sshfs-userstringUser to log in to the remote SSH server with, for type=sshfs. See SSHFS.
sshfs-passwordstringPassword of the remote SSH user, for type=sshfs. See SSHFS.
sshfs-pathstringPath on the remote SSH server to mount, for type=sshfs. See SSHFS.
swapboolUse the device as swap space. Swap is used only by containers, and its usable size is limited to 10 times the device's RAM. It applies to a whole disk or partition, or to a file with type=file. See Disks.
file-pathfilePath and name of the file mounted as a block device with type=file, for example a swap file (swap=yes) or a mounted .iso / .squashfs image. Removing the disk item does not delete the file. See Disks.
file-sizenumSize of the file, for example file-size=1G, when creating a type=file device.
file-offsetnumOffset in the file at which the block device starts, for example file-offset=0.
Read-only ArgumentTypeDescription
slot-defaultstringDefault slot name of the device, shown when no custom slot name is set.
fs-labelstringLabel of the file system. Formatting sets it automatically to <slot>-fs, unless a label is given to /disk format.
fs-uuidstringUUID of the file system, for example 58470fe2-....
fsenum (fat32 | ext4 | btrfs | xfs | nfs | smb | wipe | wipe-quick | tmpfs | exfat | ntfs | sshfs | squashfs | iso | discard | discard-secure | -)File system of the device: ext4, btrfs, xfs, fat32, exfat and ntfs for local file systems, tmpfs for RAM folders, nfs, smb and sshfs for network mounts, and iso / squashfs for mounted images. - means the device has no recognised file system. The values wipe, wipe-quick, discard and discard-secure correspond to the file systems of /disk format.
modelstringModel name of the device, for example TS1TUTE210T.
serialstringSerial number of the device.
fw-versionstringFirmware version of the device.
sizenumTotal size of the device in bytes.
freenumFree space on the mounted file system in bytes.
total-inodesnumTotal number of inodes of the file system.
free-inodesnumNumber of free inodes of the file system.
usenumUsed space of the file system in percent, for example 4%.
mount-pointstringMount point of the file system, the folder under which it appears in /file, driven by mount-point-template.
sector-sizenumSector size of the device, for example 512 bytes.
interfacestringInterface the device is connected to, for example PCIe 2x8 GT/s or USB 2.00 480Mbps.
interface-speednumSpeed of the interface the device is connected to, for example 15.7Gbps.
raid-member-state (syscap=storage)stringState of the disk as a member of its RAID array, for example 0:in_sync; when the disk is not part of an assembled array, the details of the RAID superblock found on it are shown instead.
statestringState of a RAID array, for example clean.
last-seenstringModel and serial number of the disk that last occupied this slot, shown after the disk was ejected or removed, for example TS1TUTE210T J398770033.
raid-uuid (syscap=storage)stringUUID of the RAID array.
nvme-tcp-server-secret (syscap=storage)stringSecret the NVMe-over-TCP server uses to authenticate connections from initiators.
nvme-tcp-secret (syscap=storage)stringSecret used to authenticate the connection to the NVMe-over-TCP server.
sshfs-local-userstringLocal RouterOS user the SSHFS mount runs under, for example admin. Read-only.
io-opsnumTotal number of I/O operations on the device, as shown by monitor-traffic.
io-errorsnumTotal number of I/O errors on the device.
read-opsnumTotal number of read operations.
read-ops-per-secondnumNumber of read operations per second.
read-bytesnumTotal number of bytes read.
read-ratenumRate of reads, for example in bytes per second.
read-mergesnumNumber of adjacent read operations merged.
read-timetimeTime spent on read operations.
write-opsnumTotal number of write operations.
write-ops-per-secondnumNumber of write operations per second.
write-bytesnumTotal number of bytes written.
write-ratenumRate of writes, for example in bytes per second.
write-mergesnumNumber of adjacent write operations merged.
write-timetimeTime spent on write operations.
in-flight-opsnumNumber of I/O operations currently in flight.
active-timetimeTime the device was busy handling requests.
wait-timetimeTime requests spent waiting in the queue.
discard-opsnumTotal number of discard (trim) operations.
discard-bytesnumTotal number of bytes discarded.
discard-mergesnumNumber of adjacent discard operations merged.
discard-timetimeTime spent on discard operations.
flush-opsnumTotal number of flush operations.
flush-timetimeTime spent on flush operations.
temperaturenumTemperature of the drive in Celsius, reported by S.M.A.R.T. (storage package). See the S.M.A.R.T. info guide and smart-info.
temperaturesmulti { array-id, slot: num }Temperatures of the drive's sensors in Celsius, one entry per sensor slot.
critical-warningubit (spare-space, temperature, reliability-degraded, read-only, volatile-backup-failed)Bitmask of critical warnings the drive reports: spare-space (available spare is below available-spare-threshold), temperature (temperature out of range), reliability-degraded, read-only (the device entered read-only mode) and volatile-backup-failed.
available-sparenumRemaining spare blocks of the drive in percent, for example 100%. Below available-spare-threshold the drive reports a warning.
available-spare-thresholdnumThreshold in percent below which the available spare space of the drive is reported as a warning.
percentage-usednumEstimated percentage of the drive's life used, based on how many spare blocks have been consumed.
host-read-bytesnumTotal number of bytes read by the host from the drive.
host-write-bytesnumTotal number of bytes written by the host to the drive.
host-read-cmdsnumTotal number of read commands the host sent to the drive.
host-write-cmdsnumTotal number of write commands the host sent to the drive.
controller-busy-timetimeTotal time the drive controller was busy with commands.
power-cyclesnumNumber of power cycles of the drive.
power-on-timetimeTotal time the drive was powered on.
unsafe-shutdownsnumNumber of unsafe (unexpected) shutdowns of the drive.
unrecovered-integrity-errorsnumNumber of unrecovered media and data integrity errors of the drive.
warning-temperaturenumTemperature in Celsius at which the drive starts reporting a warning.
warning-temperature-timetimeTime the drive spent above warning-temperature.
critical-temperaturenumTemperature in Celsius at which the drive reports a critical condition.
critical-temperature-timetimeTime the drive spent above critical-temperature.