From: Tanya Brokhman <tlinder@codeaurora.org>
To: Matt Hevern <matt.hevern@gmail.com>, linux-mtd@lists.infradead.org
Subject: Re: UBIFS becomes read-only when written, then fails to mount
Date: Wed, 18 Jun 2014 12:48:22 +0300 [thread overview]
Message-ID: <53A16066.4040805@codeaurora.org> (raw)
In-Reply-To: <20140618044434.GA9331@gmail.com>
On 6/18/2014 7:44 AM, Matt Hevern wrote:
> Hi All,
>
>
> I am running UBIFS on freescale i.MX28, kernel 2.6.35.3, based on
> freescale's IMX tree:
> http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/?h=imx_2.6.35_maintain
> The flash is NAND, Micron 256MiB (MT29F2G08)
>
> The main mtd partition has 5 UBI volumes on it, one of which is around
> 20MB UBIFS. This is used as the writeable backing store for a unionfs
> filesystem which is mounted over various areas of the readonly root squashfs area.
>
> I noticed on one device which I was testing, that on bootup the whole
> UBIFS volume had gone read-only, and I'm trying to figure out why, and if
> there is anything that can be done to recover.
> I built a kernel with UBIFS debuging and have attached various logs to this email,
> I don't currently have access to a console on this device.
>
> What I have seen is that when I mount it, it mounts successfully,
> but when I attempt to write a file to it, then it will fail to write
> and then remount read-only. This happened on a number of successive ocasions
> while i was recording log files, and then later it failed to mount at all.
> I don't know what exactly led to this occuring, at the time there was
> logging to the UBIFS occuring every 5 seconds, and the device will hard
> power down when the battery level drops, which happens regularly.
>
> Does anyone have an idea what is happening here, or any options to
> prevent this from happening ?
>
> Thanks in advance,
>
> Matt
>
> ------dmesg
> UBI: attaching mtd1 to ubi0
> UBI: physical eraseblock size: 131072 bytes (128 KiB)
> UBI: logical eraseblock size: 126976 bytes
> UBI: smallest flash I/O unit: 2048
> UBI: VID header offset: 2048 (aligned 2048)
> UBI: data offset: 4096
> UBI: attached mtd1 to ubi0
> UBI: MTD device name: "system"
> UBI: MTD device size: 248 MiB
> UBI: number of good PEBs: 1982
> UBI: number of bad PEBs: 2
> UBI: max. allowed volumes: 128
> UBI: wear-leveling threshold: 4096
> UBI: number of internal volumes: 1
> UBI: number of user volumes: 5
> UBI: available PEBs: 0
> UBI: total number of reserved PEBs: 1982
> UBI: number of PEBs reserved for bad PEB handling: 19
> UBI: max/mean erase counter: 80/60
> UBI: image sequence number: 1793180392
> UBI: background thread "ubi_bgt0d" started, PID 492
> ubiblka: unknown partition table
> ubiblkb: unknown partition table
> ubiblkc: unknown partition table
> ubiblkd: unknown partition table
> ubiblke: unknown partition table
> ....
How did you create your ubifs and ubi images?
> ....
> UBIFS: mounted UBI device 0, volume 5, name "config"
> UBIFS: file system size: 20697088 bytes (20212 KiB, 19 MiB, 163 LEBs)
> UBIFS: journal size: 4444160 bytes (4340 KiB, 4 MiB, 35 LEBs)
> UBIFS: media format: w4/r0 (latest is w4/r0)
> UBIFS: default compressor: none
> UBIFS: reserved for root: 0 bytes (0 KiB)
> UBIFS error (pid 616): ubifs_leb_unmap: unmap LEB -1 failed, error -22
> UBIFS warning (pid 616): ubifs_ro_mode: switched to read-only mode, error -22
> UBIFS error (pid 616): make_reservation: cannot reserve 160 bytes in jhead 1, error -22
> UBIFS error (pid 616): ubifs_write_inode: can't write inode 69, error -22
>
> ----
>
>
>
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
--
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
next prev parent reply other threads:[~2014-06-18 9:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 4:44 UBIFS becomes read-only when written, then fails to mount Matt Hevern
2014-06-18 9:48 ` Tanya Brokhman [this message]
2014-06-18 11:02 ` Matt Hevern
2014-06-18 11:14 ` Tanya Brokhman
2014-06-18 11:45 ` Matt Hevern
2014-06-18 12:32 ` Tanya Brokhman
2014-06-18 13:12 ` Matt Hevern
2014-07-01 13:55 ` Artem Bityutskiy
2014-07-03 1:20 ` Matt Hevern
2014-07-03 5:16 ` Matt Hevern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53A16066.4040805@codeaurora.org \
--to=tlinder@codeaurora.org \
--cc=linux-mtd@lists.infradead.org \
--cc=matt.hevern@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.