4 Contact: Artem Bityutskiy <dedekind@infradead.org>
6 The ubi/ class sub-directory belongs to the UBI subsystem and
7 provides general UBI information, per-UBI device information
8 and per-UBI volume information.
10 What: /sys/class/ubi/version
13 Contact: Artem Bityutskiy <dedekind@infradead.org>
15 This file contains version of the latest supported UBI on-media
16 format. Currently it is 1, and there is no plan to change this.
17 However, if in the future UBI needs on-flash format changes
18 which cannot be done in a compatible manner, a new format
19 version will be added. So this is a mechanism for possible
20 future backward-compatible (but forward-incompatible)
23 What: /sys/class/ubiX/
26 Contact: Artem Bityutskiy <dedekind@infradead.org>
28 The /sys/class/ubi0, /sys/class/ubi1, etc directories describe
29 UBI devices (UBI device 0, 1, etc). They contain general UBI
30 device information and per UBI volume information (each UBI
31 device may have many UBI volumes)
33 What: /sys/class/ubi/ubiX/avail_eraseblocks
36 Contact: Artem Bityutskiy <dedekind@infradead.org>
38 Amount of available logical eraseblock. For example, one may
39 create a new UBI volume which has this amount of logical
42 What: /sys/class/ubi/ubiX/bad_peb_count
45 Contact: Artem Bityutskiy <dedekind@infradead.org>
47 Count of bad physical eraseblocks on the underlying MTD device.
49 What: /sys/class/ubi/ubiX/bgt_enabled
52 Contact: Artem Bityutskiy <dedekind@infradead.org>
54 Contains ASCII "0\n" if the UBI background thread is disabled,
55 and ASCII "1\n" if it is enabled.
57 What: /sys/class/ubi/ubiX/dev
60 Contact: Artem Bityutskiy <dedekind@infradead.org>
62 Major and minor numbers of the character device corresponding
63 to this UBI device (in <major>:<minor> format).
65 What: /sys/class/ubi/ubiX/eraseblock_size
68 Contact: Artem Bityutskiy <dedekind@infradead.org>
70 Maximum logical eraseblock size this UBI device may provide. UBI
71 volumes may have smaller logical eraseblock size because of their
74 What: /sys/class/ubi/ubiX/max_ec
77 Contact: Artem Bityutskiy <dedekind@infradead.org>
79 Maximum physical eraseblock erase counter value.
81 What: /sys/class/ubi/ubiX/max_vol_count
84 Contact: Artem Bityutskiy <dedekind@infradead.org>
86 Maximum number of volumes which this UBI device may have.
88 What: /sys/class/ubi/ubiX/min_io_size
91 Contact: Artem Bityutskiy <dedekind@infradead.org>
93 Minimum input/output unit size. All the I/O may only be done
94 in fractions of the contained number.
96 What: /sys/class/ubi/ubiX/mtd_num
99 Contact: Artem Bityutskiy <dedekind@infradead.org>
101 Number of the underlying MTD device.
103 What: /sys/class/ubi/ubiX/reserved_for_bad
105 KernelVersion: 2.6.22
106 Contact: Artem Bityutskiy <dedekind@infradead.org>
108 Number of physical eraseblocks reserved for bad block handling.
110 What: /sys/class/ubi/ubiX/ro_mode
113 Contact: linux-mtd@lists.infradead.org
115 Contains ASCII "1\n" if the read-only flag is set on this
116 device, and "0\n" if it is cleared. UBI devices mark themselves
117 as read-only when they detect an unrecoverable error.
119 What: /sys/class/ubi/ubiX/total_eraseblocks
121 KernelVersion: 2.6.22
122 Contact: Artem Bityutskiy <dedekind@infradead.org>
124 Total number of good (not marked as bad) physical eraseblocks on
125 the underlying MTD device.
127 What: /sys/class/ubi/ubiX/volumes_count
129 KernelVersion: 2.6.22
130 Contact: Artem Bityutskiy <dedekind@infradead.org>
132 Count of volumes on this UBI device.
134 What: /sys/class/ubi/ubiX/ubiX_Y/
136 KernelVersion: 2.6.22
137 Contact: Artem Bityutskiy <dedekind@infradead.org>
139 The /sys/class/ubi/ubiX/ubiX_0/, /sys/class/ubi/ubiX/ubiX_1/,
140 etc directories describe UBI volumes on UBI device X (volumes
143 What: /sys/class/ubi/ubiX/ubiX_Y/alignment
145 KernelVersion: 2.6.22
146 Contact: Artem Bityutskiy <dedekind@infradead.org>
148 Volume alignment - the value the logical eraseblock size of
149 this volume has to be aligned on. For example, 2048 means that
150 logical eraseblock size is multiple of 2048. In other words,
151 volume logical eraseblock size is UBI device logical eraseblock
152 size aligned to the alignment value.
154 What: /sys/class/ubi/ubiX/ubiX_Y/corrupted
156 KernelVersion: 2.6.22
157 Contact: Artem Bityutskiy <dedekind@infradead.org>
159 Contains ASCII "0\n" if the UBI volume is OK, and ASCII "1\n"
160 if it is corrupted (e.g., due to an interrupted volume update).
162 What: /sys/class/ubi/ubiX/ubiX_Y/data_bytes
164 KernelVersion: 2.6.22
165 Contact: Artem Bityutskiy <dedekind@infradead.org>
167 The amount of data this volume contains. This value makes sense
168 only for static volumes, and for dynamic volume it equivalent
169 to the total volume size in bytes.
171 What: /sys/class/ubi/ubiX/ubiX_Y/dev
173 KernelVersion: 2.6.22
174 Contact: Artem Bityutskiy <dedekind@infradead.org>
176 Major and minor numbers of the character device corresponding
177 to this UBI volume (in <major>:<minor> format).
179 What: /sys/class/ubi/ubiX/ubiX_Y/name
181 KernelVersion: 2.6.22
182 Contact: Artem Bityutskiy <dedekind@infradead.org>
186 What: /sys/class/ubi/ubiX/ubiX_Y/reserved_ebs
188 KernelVersion: 2.6.22
189 Contact: Artem Bityutskiy <dedekind@infradead.org>
191 Count of physical eraseblock reserved for this volume.
192 Equivalent to the volume size in logical eraseblocks.
194 What: /sys/class/ubi/ubiX/ubiX_Y/type
196 KernelVersion: 2.6.22
197 Contact: Artem Bityutskiy <dedekind@infradead.org>
199 Volume type. Contains ASCII "dynamic\n" for dynamic volumes and
200 "static\n" for static volumes.
202 What: /sys/class/ubi/ubiX/ubiX_Y/upd_marker
204 KernelVersion: 2.6.22
205 Contact: Artem Bityutskiy <dedekind@infradead.org>
207 Contains ASCII "0\n" if the update marker is not set for this
208 volume, and "1\n" if it is set. The update marker is set when
209 volume update starts, and cleaned when it ends. So the presence
210 of the update marker indicates that the volume is being updated
211 at the moment of the update was interrupted. The later may be
212 checked using the "corrupted" sysfs file.
214 What: /sys/class/ubi/ubiX/ubiX_Y/usable_eb_size
216 KernelVersion: 2.6.22
217 Contact: Artem Bityutskiy <dedekind@infradead.org>
219 Logical eraseblock size of this volume. Equivalent to logical
220 eraseblock size of the device aligned on the volume alignment