0001 What: /sys/class/ubi/
0002 Date: July 2006
0003 KernelVersion: 2.6.22
0004 Contact: Artem Bityutskiy <dedekind@infradead.org>
0005 Description:
0006 The ubi/ class sub-directory belongs to the UBI subsystem and
0007 provides general UBI information, per-UBI device information
0008 and per-UBI volume information.
0009
0010 What: /sys/class/ubi/version
0011 Date: July 2006
0012 KernelVersion: 2.6.22
0013 Contact: Artem Bityutskiy <dedekind@infradead.org>
0014 Description:
0015 This file contains version of the latest supported UBI on-media
0016 format. Currently it is 1, and there is no plan to change this.
0017 However, if in the future UBI needs on-flash format changes
0018 which cannot be done in a compatible manner, a new format
0019 version will be added. So this is a mechanism for possible
0020 future backward-compatible (but forward-incompatible)
0021 improvements.
0022
0023 What: /sys/class/ubiX/
0024 Date: July 2006
0025 KernelVersion: 2.6.22
0026 Contact: Artem Bityutskiy <dedekind@infradead.org>
0027 Description:
0028 The /sys/class/ubi0, /sys/class/ubi1, etc directories describe
0029 UBI devices (UBI device 0, 1, etc). They contain general UBI
0030 device information and per UBI volume information (each UBI
0031 device may have many UBI volumes)
0032
0033 What: /sys/class/ubi/ubiX/avail_eraseblocks
0034 Date: July 2006
0035 KernelVersion: 2.6.22
0036 Contact: Artem Bityutskiy <dedekind@infradead.org>
0037 Description:
0038 Amount of available logical eraseblock. For example, one may
0039 create a new UBI volume which has this amount of logical
0040 eraseblocks.
0041
0042 What: /sys/class/ubi/ubiX/bad_peb_count
0043 Date: July 2006
0044 KernelVersion: 2.6.22
0045 Contact: Artem Bityutskiy <dedekind@infradead.org>
0046 Description:
0047 Count of bad physical eraseblocks on the underlying MTD device.
0048
0049 What: /sys/class/ubi/ubiX/bgt_enabled
0050 Date: July 2006
0051 KernelVersion: 2.6.22
0052 Contact: Artem Bityutskiy <dedekind@infradead.org>
0053 Description:
0054 Contains ASCII "0\n" if the UBI background thread is disabled,
0055 and ASCII "1\n" if it is enabled.
0056
0057 What: /sys/class/ubi/ubiX/dev
0058 Date: July 2006
0059 KernelVersion: 2.6.22
0060 Contact: Artem Bityutskiy <dedekind@infradead.org>
0061 Description:
0062 Major and minor numbers of the character device corresponding
0063 to this UBI device (in <major>:<minor> format).
0064
0065 What: /sys/class/ubi/ubiX/eraseblock_size
0066 Date: July 2006
0067 KernelVersion: 2.6.22
0068 Contact: Artem Bityutskiy <dedekind@infradead.org>
0069 Description:
0070 Maximum logical eraseblock size this UBI device may provide. UBI
0071 volumes may have smaller logical eraseblock size because of their
0072 alignment.
0073
0074 What: /sys/class/ubi/ubiX/max_ec
0075 Date: July 2006
0076 KernelVersion: 2.6.22
0077 Contact: Artem Bityutskiy <dedekind@infradead.org>
0078 Description:
0079 Maximum physical eraseblock erase counter value.
0080
0081 What: /sys/class/ubi/ubiX/max_vol_count
0082 Date: July 2006
0083 KernelVersion: 2.6.22
0084 Contact: Artem Bityutskiy <dedekind@infradead.org>
0085 Description:
0086 Maximum number of volumes which this UBI device may have.
0087
0088 What: /sys/class/ubi/ubiX/min_io_size
0089 Date: July 2006
0090 KernelVersion: 2.6.22
0091 Contact: Artem Bityutskiy <dedekind@infradead.org>
0092 Description:
0093 Minimum input/output unit size. All the I/O may only be done
0094 in fractions of the contained number.
0095
0096 What: /sys/class/ubi/ubiX/mtd_num
0097 Date: January 2008
0098 KernelVersion: 2.6.25
0099 Contact: Artem Bityutskiy <dedekind@infradead.org>
0100 Description:
0101 Number of the underlying MTD device.
0102
0103 What: /sys/class/ubi/ubiX/reserved_for_bad
0104 Date: July 2006
0105 KernelVersion: 2.6.22
0106 Contact: Artem Bityutskiy <dedekind@infradead.org>
0107 Description:
0108 Number of physical eraseblocks reserved for bad block handling.
0109
0110 What: /sys/class/ubi/ubiX/ro_mode
0111 Date: April 2016
0112 KernelVersion: 4.7
0113 Contact: linux-mtd@lists.infradead.org
0114 Description:
0115 Contains ASCII "1\n" if the read-only flag is set on this
0116 device, and "0\n" if it is cleared. UBI devices mark themselves
0117 as read-only when they detect an unrecoverable error.
0118
0119 What: /sys/class/ubi/ubiX/total_eraseblocks
0120 Date: July 2006
0121 KernelVersion: 2.6.22
0122 Contact: Artem Bityutskiy <dedekind@infradead.org>
0123 Description:
0124 Total number of good (not marked as bad) physical eraseblocks on
0125 the underlying MTD device.
0126
0127 What: /sys/class/ubi/ubiX/volumes_count
0128 Date: July 2006
0129 KernelVersion: 2.6.22
0130 Contact: Artem Bityutskiy <dedekind@infradead.org>
0131 Description:
0132 Count of volumes on this UBI device.
0133
0134 What: /sys/class/ubi/ubiX/ubiX_Y/
0135 Date: July 2006
0136 KernelVersion: 2.6.22
0137 Contact: Artem Bityutskiy <dedekind@infradead.org>
0138 Description:
0139 The /sys/class/ubi/ubiX/ubiX_0/, /sys/class/ubi/ubiX/ubiX_1/,
0140 etc directories describe UBI volumes on UBI device X (volumes
0141 0, 1, etc).
0142
0143 What: /sys/class/ubi/ubiX/ubiX_Y/alignment
0144 Date: July 2006
0145 KernelVersion: 2.6.22
0146 Contact: Artem Bityutskiy <dedekind@infradead.org>
0147 Description:
0148 Volume alignment - the value the logical eraseblock size of
0149 this volume has to be aligned on. For example, 2048 means that
0150 logical eraseblock size is multiple of 2048. In other words,
0151 volume logical eraseblock size is UBI device logical eraseblock
0152 size aligned to the alignment value.
0153
0154 What: /sys/class/ubi/ubiX/ubiX_Y/corrupted
0155 Date: July 2006
0156 KernelVersion: 2.6.22
0157 Contact: Artem Bityutskiy <dedekind@infradead.org>
0158 Description:
0159 Contains ASCII "0\n" if the UBI volume is OK, and ASCII "1\n"
0160 if it is corrupted (e.g., due to an interrupted volume update).
0161
0162 What: /sys/class/ubi/ubiX/ubiX_Y/data_bytes
0163 Date: July 2006
0164 KernelVersion: 2.6.22
0165 Contact: Artem Bityutskiy <dedekind@infradead.org>
0166 Description:
0167 The amount of data this volume contains. This value makes sense
0168 only for static volumes, and for dynamic volume it equivalent
0169 to the total volume size in bytes.
0170
0171 What: /sys/class/ubi/ubiX/ubiX_Y/dev
0172 Date: July 2006
0173 KernelVersion: 2.6.22
0174 Contact: Artem Bityutskiy <dedekind@infradead.org>
0175 Description:
0176 Major and minor numbers of the character device corresponding
0177 to this UBI volume (in <major>:<minor> format).
0178
0179 What: /sys/class/ubi/ubiX/ubiX_Y/name
0180 Date: July 2006
0181 KernelVersion: 2.6.22
0182 Contact: Artem Bityutskiy <dedekind@infradead.org>
0183 Description:
0184 Volume name.
0185
0186 What: /sys/class/ubi/ubiX/ubiX_Y/reserved_ebs
0187 Date: July 2006
0188 KernelVersion: 2.6.22
0189 Contact: Artem Bityutskiy <dedekind@infradead.org>
0190 Description:
0191 Count of physical eraseblock reserved for this volume.
0192 Equivalent to the volume size in logical eraseblocks.
0193
0194 What: /sys/class/ubi/ubiX/ubiX_Y/type
0195 Date: July 2006
0196 KernelVersion: 2.6.22
0197 Contact: Artem Bityutskiy <dedekind@infradead.org>
0198 Description:
0199 Volume type. Contains ASCII "dynamic\n" for dynamic volumes and
0200 "static\n" for static volumes.
0201
0202 What: /sys/class/ubi/ubiX/ubiX_Y/upd_marker
0203 Date: July 2006
0204 KernelVersion: 2.6.22
0205 Contact: Artem Bityutskiy <dedekind@infradead.org>
0206 Description:
0207 Contains ASCII "0\n" if the update marker is not set for this
0208 volume, and "1\n" if it is set. The update marker is set when
0209 volume update starts, and cleaned when it ends. So the presence
0210 of the update marker indicates that the volume is being updated
0211 at the moment of the update was interrupted. The later may be
0212 checked using the "corrupted" sysfs file.
0213
0214 What: /sys/class/ubi/ubiX/ubiX_Y/usable_eb_size
0215 Date: July 2006
0216 KernelVersion: 2.6.22
0217 Contact: Artem Bityutskiy <dedekind@infradead.org>
0218 Description:
0219 Logical eraseblock size of this volume. Equivalent to logical
0220 eraseblock size of the device aligned on the volume alignment
0221 value.