* Detach the ubi device of rootfs
@ 2017-10-09 11:11 Rock Lee
2017-10-09 12:05 ` Richard Weinberger
0 siblings, 1 reply; 5+ messages in thread
From: Rock Lee @ 2017-10-09 11:11 UTC (permalink / raw)
To: linux-mtd
Hi,
I am studying the process of reboot in linux, but did find any script
in /etc to detach ubi device for rootfs. If I reboot the system when
ubi device of rootfs is scrubing, is it a risk for flash ?
--
Cheers,
Rock
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Detach the ubi device of rootfs
2017-10-09 11:11 Detach the ubi device of rootfs Rock Lee
@ 2017-10-09 12:05 ` Richard Weinberger
2017-10-10 2:02 ` Rock Lee
0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2017-10-09 12:05 UTC (permalink / raw)
To: Rock Lee; +Cc: linux-mtd@lists.infradead.org
Rock,
On Mon, Oct 9, 2017 at 1:11 PM, Rock Lee <rockdotlee@gmail.com> wrote:
> Hi,
> I am studying the process of reboot in linux, but did find any script
> in /etc to detach ubi device for rootfs. If I reboot the system when
> ubi device of rootfs is scrubing, is it a risk for flash ?
Why do you think you need to detach upon reboot?
UBI and UBIFS are designed to face power-cuts at any time.
Although, sane setups with initramfs/systemd unmount also the rootfs
upon reboot.
--
Thanks,
//richard
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Detach the ubi device of rootfs
2017-10-09 12:05 ` Richard Weinberger
@ 2017-10-10 2:02 ` Rock Lee
2017-10-10 7:33 ` Richard Weinberger
0 siblings, 1 reply; 5+ messages in thread
From: Rock Lee @ 2017-10-10 2:02 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-mtd
> Why do you think you need to detach upon reboot?
> UBI and UBIFS are designed to face power-cuts at any time.
> Although, sane setups with initramfs/systemd unmount also the rootfs
> upon reboot.
>
When reboot, UBIFS will be remount as read-only, from the filesystem
part, it is safe, because there is no data write to it. I see ubi
background thread will exit when ubi detach, and there would no
scrubing anymore, I am sure reboot after detach is safe enough in UBI
layer. I am just curious what will happen when reboot the system while
ubi is scrubing. Will it damage the flash if this situation happens a
lot?
Thanks
--
Cheers,
Rock
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Detach the ubi device of rootfs
2017-10-10 2:02 ` Rock Lee
@ 2017-10-10 7:33 ` Richard Weinberger
2017-10-11 1:52 ` Rock Lee
0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2017-10-10 7:33 UTC (permalink / raw)
To: Rock Lee; +Cc: Richard Weinberger, linux-mtd
Am Dienstag, 10. Oktober 2017, 04:02:09 CEST schrieb Rock Lee:
> > Why do you think you need to detach upon reboot?
> > UBI and UBIFS are designed to face power-cuts at any time.
> > Although, sane setups with initramfs/systemd unmount also the rootfs
> > upon reboot.
>
> When reboot, UBIFS will be remount as read-only, from the filesystem
> part, it is safe, because there is no data write to it. I see ubi
> background thread will exit when ubi detach, and there would no
> scrubing anymore, I am sure reboot after detach is safe enough in UBI
> layer. I am just curious what will happen when reboot the system while
> ubi is scrubing. Will it damage the flash if this situation happens a
> lot?
Scrubbing is an atomic operation, just like copying a LEB.
What problem do you have in mind?
Thanks,
//richard
--
sigma star gmbh - Eduard-Bodem-Gasse 6 - 6020 Innsbruck - Austria
ATU66964118 - FN 374287y
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Detach the ubi device of rootfs
2017-10-10 7:33 ` Richard Weinberger
@ 2017-10-11 1:52 ` Rock Lee
0 siblings, 0 replies; 5+ messages in thread
From: Rock Lee @ 2017-10-11 1:52 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-mtd
> Scrubbing is an atomic operation, just like copying a LEB.
> What problem do you have in mind?
>
Since scrubbing is an atomic operation, I have nothing to worry about :-)
Thanks
--
Cheers,
Rock
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-10-11 1:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09 11:11 Detach the ubi device of rootfs Rock Lee
2017-10-09 12:05 ` Richard Weinberger
2017-10-10 2:02 ` Rock Lee
2017-10-10 7:33 ` Richard Weinberger
2017-10-11 1:52 ` Rock Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).