2009-03-06 13:50:34

by Thanasis

[permalink] [raw]
Subject: jffs2 and kernel config for SDHC Memory Cards

I want to use two of these Transcend?s Class 6 SDHC (SD High-Capacity)
Memory Cards,
http://www.transcendusa.com/Products/ModDetail.asp?ModNo=147&LangNo=0&Func1No=1&Func2No=13
as part of the filesystem in a netbook (Acer A110L), will mount /home on
one, and /tmp and /var on the other.

Q1: Should I format them as jffs2?

Q2: What modules/configuration options should I enable in the kernel
(2.6.28) ?

# uname -a
Linux atom 2.6.28-gentoo-r2 #1 SMP PREEMPT Fri Mar 6 00:00:27 EET 2009
i686 Intel(R) Atom(TM) CPU N270 @ 1.60GHz GenuineIntel GNU/Linux
:-)


2009-03-06 13:56:33

by Thanasis

[permalink] [raw]
Subject: Re: jffs2 and kernel config for SDHC Memory Cards

on 03/06/2009 03:39 PM Thanasis wrote the following:
> I want to use two of these Transcend?s Class 6 SDHC (SD High-Capacity)
> Memory Cards,
> http://www.transcendusa.com/Products/ModDetail.asp?ModNo=147&LangNo=0&Func1No=1&Func2No=13
> as part of the filesystem in a netbook (Acer A110L), will mount /home on
> one, and /tmp and /var on the other.
>
> Q1: Should I format them as jffs2?
>
> Q2: What modules/configuration options should I enable in the kernel
> (2.6.28) ?
>
> # uname -a
> Linux atom 2.6.28-gentoo-r2 #1 SMP PREEMPT Fri Mar 6 00:00:27 EET 2009
> i686 Intel(R) Atom(TM) CPU N270 @ 1.60GHz GenuineIntel GNU/Linux
> :-)
>

Let me rephrase my questions in order to be clearer:
Q1: In order to achieve wear leveling should I format them as jffs2?
Q2: In order to achieve wear leveling, any specific options I should
enable in kernel (2.6.28) configuration?
;-)

2009-03-06 18:24:42

by Sitsofe Wheeler

[permalink] [raw]
Subject: Re: jffs2 and kernel config for SDHC Memory Cards

On Fri, Mar 06, 2009 at 03:56:01PM +0200, Thanasis wrote:
> on 03/06/2009 03:39 PM Thanasis wrote the following:
> > I want to use two of these Transcend’s Class 6 SDHC (SD High-Capacity)
> > Memory Cards,
> > http://www.transcendusa.com/Products/ModDetail.asp?ModNo=147&LangNo=0&Func1No=1&Func2No=13
> > as part of the filesystem in a netbook (Acer A110L), will mount /home on
> > one, and /tmp and /var on the other.

> Let me rephrase my questions in order to be clearer:
> Q1: In order to achieve wear leveling should I format them as jffs2?

This probably won't be very effective as you are already past the
anecdotal size recommended for jffs2 partitions (I've heard rumours that
it is best suited to filesystems that are less than 64Mbytes and another
that says less than 1Gbyte). Additionally you are not providing direct
access to the raw flash (see
http://linux-mtd.infradead.org/faq/jffs2.html#L_stick_jffs2 ).
Performance is probably not gong to be very good.

> Q2: In order to achieve wear leveling, any specific options I should
> enable in kernel (2.6.28) configuration?

You will be wear levelled by the hardware anyway as the hardware only
provides a block device interface and you don't have access to the raw
flash.

ccing Dave Woodhouse as he is the JFFS2 creator.

--
Sitsofe | http://sucs.org/~sits/

2009-03-06 20:24:40

by Thanasis

[permalink] [raw]
Subject: Re: jffs2 and kernel config for SDHC Memory Cards

on 03/06/2009 08:24 PM Sitsofe Wheeler wrote the following:
> On Fri, Mar 06, 2009 at 03:56:01PM +0200, Thanasis wrote:
>> on 03/06/2009 03:39 PM Thanasis wrote the following:
>>> I want to use two of these Transcend?s Class 6 SDHC (SD High-Capacity)
>>> Memory Cards,
>>> http://www.transcendusa.com/Products/ModDetail.asp?ModNo=147&LangNo=0&Func1No=1&Func2No=13
>>> as part of the filesystem in a netbook (Acer A110L), will mount /home on
>>> one, and /tmp and /var on the other.
>
>> Let me rephrase my questions in order to be clearer:
>> Q1: In order to achieve wear leveling should I format them as jffs2?
>
> This probably won't be very effective as you are already past the
> anecdotal size recommended for jffs2 partitions (I've heard rumours that
> it is best suited to filesystems that are less than 64Mbytes and another
> that says less than 1Gbyte). Additionally you are not providing direct
> access to the raw flash (see
> http://linux-mtd.infradead.org/faq/jffs2.html#L_stick_jffs2 ).
> Performance is probably not gong to be very good.
>
>> Q2: In order to achieve wear leveling, any specific options I should
>> enable in kernel (2.6.28) configuration?
>
> You will be wear levelled by the hardware anyway as the hardware only
> provides a block device interface and you don't have access to the raw
> flash.
>
> ccing Dave Woodhouse as he is the JFFS2 creator.
>
OK. I believe I should stick to ext2, right?
Thanks ;-)

2009-03-06 22:57:58

by Sitsofe Wheeler

[permalink] [raw]
Subject: Re: jffs2 and kernel config for SDHC Memory Cards

On Fri, Mar 06, 2009 at 10:24:25PM +0200, Thanasis wrote:
> on 03/06/2009 08:24 PM Sitsofe Wheeler wrote the following:
> > On Fri, Mar 06, 2009 at 03:56:01PM +0200, Thanasis wrote:
> >> on 03/06/2009 03:39 PM Thanasis wrote the following:
> >>> I want to use two of these Transcend’s Class 6 SDHC (SD High-Capacity)
> >>> Memory Cards,
> >>> http://www.transcendusa.com/Products/ModDetail.asp?ModNo=147&LangNo=0&Func1No=1&Func2No=13
> >>> as part of the filesystem in a netbook (Acer A110L), will mount /home on
> >>> one, and /tmp and /var on the other.
> >
> >> Let me rephrase my questions in order to be clearer:
> >> Q1: In order to achieve wear leveling should I format them as jffs2?
> >
> > This probably won't be very effective as you are already past the

> OK. I believe I should stick to ext2, right?

If you mean compared to jffs2 then probably yes, better to stick with
ext2. If you mean is ext2 the best choice over anything else... well
that's an open question (or so I'm told). You would need to ask a
filesystem expert really but it apparently depends on the workload, the
characteristics of the "disks" and whether you need journaling.

--
Sitsofe | http://sucs.org/~sits/

2009-03-07 16:59:42

by Thanasis

[permalink] [raw]
Subject: Re: jffs2 and kernel config for SDHC Memory Cards

on 03/07/2009 12:57 AM Sitsofe Wheeler wrote the following:
> On Fri, Mar 06, 2009 at 10:24:25PM +0200, Thanasis wrote:
>> on 03/06/2009 08:24 PM Sitsofe Wheeler wrote the following:
>>> On Fri, Mar 06, 2009 at 03:56:01PM +0200, Thanasis wrote:
>>>> on 03/06/2009 03:39 PM Thanasis wrote the following:
>>>>> I want to use two of these Transcend?s Class 6 SDHC (SD High-Capacity)
>>>>> Memory Cards,
>>>>> http://www.transcendusa.com/Products/ModDetail.asp?ModNo=147&LangNo=0&Func1No=1&Func2No=13
>>>>> as part of the filesystem in a netbook (Acer A110L), will mount /home on
>>>>> one, and /tmp and /var on the other.
>>>
>>>> Let me rephrase my questions in order to be clearer:
>>>> Q1: In order to achieve wear leveling should I format them as jffs2?
>>> This probably won't be very effective as you are already past the
>
>> OK. I believe I should stick to ext2, right?
>
> If you mean compared to jffs2 then probably yes, better to stick with
> ext2.
Right, that is what I meant.

If you mean is ext2 the best choice over anything else... well
> that's an open question (or so I'm told). You would need to ask a
> filesystem expert really but it apparently depends on the workload, the
> characteristics of the "disks" and whether you need journaling.
It is going to be a desktop (netbook) system, so, if it had a HDD, I
would opt for ext4 or xfs, but given the hardware (SDHC), I guess ext2
is the best choice.

2009-03-10 11:24:40

by Pavel Machek

[permalink] [raw]
Subject: Re: jffs2 and kernel config for SDHC Memory Cards

On Sat 2009-03-07 18:59:28, Thanasis wrote:
> on 03/07/2009 12:57 AM Sitsofe Wheeler wrote the following:
> > On Fri, Mar 06, 2009 at 10:24:25PM +0200, Thanasis wrote:
> >> on 03/06/2009 08:24 PM Sitsofe Wheeler wrote the following:
> >>> On Fri, Mar 06, 2009 at 03:56:01PM +0200, Thanasis wrote:
> >>>> on 03/06/2009 03:39 PM Thanasis wrote the following:
> >>>>> I want to use two of these Transcend?s Class 6 SDHC (SD High-Capacity)
> >>>>> Memory Cards,
> >>>>> http://www.transcendusa.com/Products/ModDetail.asp?ModNo=147&LangNo=0&Func1No=1&Func2No=13
> >>>>> as part of the filesystem in a netbook (Acer A110L), will mount /home on
> >>>>> one, and /tmp and /var on the other.
> >>>
> >>>> Let me rephrase my questions in order to be clearer:
> >>>> Q1: In order to achieve wear leveling should I format them as jffs2?
> >>> This probably won't be very effective as you are already past the
> >
> >> OK. I believe I should stick to ext2, right?
> >
> > If you mean compared to jffs2 then probably yes, better to stick with
> > ext2.
> Right, that is what I meant.
>
> If you mean is ext2 the best choice over anything else... well
> > that's an open question (or so I'm told). You would need to ask a
> > filesystem expert really but it apparently depends on the workload, the
> > characteristics of the "disks" and whether you need journaling.
> It is going to be a desktop (netbook) system, so, if it had a HDD, I
> would opt for ext4 or xfs, but given the hardware (SDHC), I guess ext2
> is the best choice.

Well, maybe ext2 is _best_ choice, but it is not good one. It will
loose data on sudden powerdowns...

See

(english) http://www.livejournal.com/~pavelmachek

entry 'evil little cards'.

2009-03-10 22:15:43

by Thanasis

[permalink] [raw]
Subject: Re: jffs2 and kernel config for SDHC Memory Cards

on 03/10/2009 01:23 PM Pavel Machek wrote the following:

> Well, maybe ext2 is _best_ choice, but it is not good one. It will
> loose data on sudden powerdowns...
>
> See
>
> (english) http://www.livejournal.com/~pavelmachek
>
> entry 'evil little cards'.

My problem is not a sudden power failure, which is unlikely, because
it's a netbook with the battery always on, but from accidentally
ejecting the one card that protrudes on the right hand side (the other
on the left side doesn't). I have already done it twice, and was lucky
to recover with fsck...

2009-03-15 21:19:17

by Pavel Machek

[permalink] [raw]
Subject: Re: jffs2 and kernel config for SDHC Memory Cards

On Wed 2009-03-11 00:05:55, Thanasis wrote:
> on 03/10/2009 01:23 PM Pavel Machek wrote the following:
>
> > Well, maybe ext2 is _best_ choice, but it is not good one. It will
> > loose data on sudden powerdowns...
> >
> > See
> >
> > (english) http://www.livejournal.com/~pavelmachek
> >
> > entry 'evil little cards'.
>
> My problem is not a sudden power failure, which is unlikely, because
> it's a netbook with the battery always on, but from accidentally
> ejecting the one card that protrudes on the right hand side (the other
> on the left side doesn't). I have already done it twice, and was lucky
> to recover with fsck...

hp2133? :-). I lost filesystem there, twice... tytso's suggestion was
to use sticky tape to make sure card stays in; and that's
unfortunately the only feasible solution for now.

Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html