Debian Developers - run debian off usb flash drive

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > April 2004 > run debian off usb flash drive





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author run debian off usb flash drive
Jeff Johnston

2004-03-06, 10:33 pm

With 512 MB and 1 GB USB flash drives becoming cheaper and cheaper I'm
thinking that it would be a fantastic way to have a boot drive with no
moving parts that could (almost) never die of old age. I was hoping the
install process would be as simple as loading usb-storage on the new d-i
cd (which is fantastic btw) but sadly that doesn't seem to work. There
are a few distributions that boot off the flash drive but set up a ramdisk
to run out of. Is any of that actually necessary? Has anyone here tried
this before or think it's worthwhile? Is there a way for me to copy over
the kernel and basic debian programs from an existing installation and
then reboot off my new debian flash drive?

Jeff


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Marc Singer

2004-03-06, 10:33 pm

On Sun, Mar 07, 2004 at 03:06:37AM +0100, Steinar H. Gunderson wrote:
> On Sat, Mar 06, 2004 at 08:25:50PM -0500, Jeff Johnston wrote:
>
> Just a side note: They'll probably die a lot quicker than your hard drive,
> given that you're not mounting them read-only. Those things have a more or
> less fixed number of writes before they start to break.


Doesn't it matter how the system is used?

Most of the flash parts are rated for 100K erase cycles per 128KiB
block (StrataFlash). Cheap hard drives are usualy waranteed for only
one year. Assuming the best case for flash, and worst case for a hard
drive, the flash device can take about 250 block erase cycles/day in a
year of continuous use. The wear-leveling flash filesystems will
substantially extend the lifespan of the flash device. If the system
is setup to reduce unnecessary writes to the flash device, it seems
possible to get many years of use before the flash device fails.

In other words, it seems reasonable to use flash as a hard-drive
replacement as long as one is clever.

Cheers.


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Steinar H. Gunderson

2004-03-06, 10:33 pm

On Sat, Mar 06, 2004 at 08:25:50PM -0500, Jeff Johnston wrote:
> With 512 MB and 1 GB USB flash drives becoming cheaper and cheaper I'm
> thinking that it would be a fantastic way to have a boot drive with no
> moving parts that could (almost) never die of old age.


Just a side note: They'll probably die a lot quicker than your hard drive,
given that you're not mounting them read-only. Those things have a more or
less fixed number of writes before they start to break.

/* Steinar */
--
Homepage: http://www.sesse.net/


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Oliver Kurth

2004-03-06, 11:33 pm

On Sat, 2004-03-06 at 18:30, Marc Singer wrote:
> On Sun, Mar 07, 2004 at 03:06:37AM +0100, Steinar H. Gunderson wrote:


>
> Doesn't it matter how the system is used?
>
> Most of the flash parts are rated for 100K erase cycles per 128KiB
> block (StrataFlash). Cheap hard drives are usualy waranteed for only
> one year. Assuming the best case for flash, and worst case for a hard
> drive, the flash device can take about 250 block erase cycles/day in a
> year of continuous use. The wear-leveling flash filesystems will
> substantially extend the lifespan of the flash device. If the system
> is setup to reduce unnecessary writes to the flash device, it seems
> possible to get many years of use before the flash device fails.
>
> In other words, it seems reasonable to use flash as a hard-drive
> replacement as long as one is clever.


I have set up something like this on a small PowerPC box, with a 64MB
flash card. I have put lots of stuff into ram disk (/tmp,
/var/{log,lock,run}, /var/{lib,cache}/apt), using bind mounts. It is
running for about half a year now, usually always on (so few reboots). I
am still a little bit worried about /etc/mtab and /etc/network/ifstate
(the latter can be put on ram disk as well).

Of course, on reboot I loose all my log files. And I need to call
apt-get update again, but that's not a problem.

I have built a small Debian package for the ram disk setup, tell me if
you are interested.

Greetings,
Oliver




Russell Coker

2004-03-06, 11:33 pm

On Sun, 7 Mar 2004 13:30, Marc Singer <elf@buici.com> wrote:
> Most of the flash parts are rated for 100K erase cycles per 128KiB
> block (StrataFlash). Cheap hard drives are usualy waranteed for only
> one year. Assuming the best case for flash, and worst case for a hard
> drive, the flash device can take about 250 block erase cycles/day in a
> year of continuous use. The wear-leveling flash filesystems will


250 erases per day on a single is not a likely amount of load for a laptop
provided that there is plenty of spare space.

Also running a utility every few months to move everything around might be
helpful. Otherwise the part of the storage containing /bin/bash might be
almost unused while ~/Mail starts dieing.

Last time I checked it seemed that JFFS2 (the wear-levelling file system) only
worked on flash memory not on flash devices with ATA or USB interfaces. The
flash devices with ATA or USB interfaces are SUPPOSED to do wear levelling
internally, but rumor has it that they often don't.

If you can't get JFFS2 then you have a choice of ReiserFS, Ext2/3, etc. The
problems with these file systems is that they have Inode tables, journals,
and other data structures that are accessed a lot in fixed locations. This
should be OK if the hardware does wear levelling, but will be a killer if
not.

--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Marc Singer

2004-03-07, 12:33 am

On Sun, Mar 07, 2004 at 03:25:08PM +1100, Russell Coker wrote:
> On Sun, 7 Mar 2004 13:30, Marc Singer <elf@buici.com> wrote:
>
> 250 erases per day on a single is not a likely amount of load for a laptop
> provided that there is plenty of spare space.
>


Single...what? I suppose I wasn't clear in that this is 250 block
erases for a given block. If the erase block is 128 KiB and you have
only one free block (heaven forbid) that would require writing 32 MiB
of data every day for a year before that block was unable to accept
another write.

Even if there is no wear-leveling, this could be OK as long as you
didn't plan to keep the flash device more than a year.

Cheers.


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Russell Coker

2004-03-07, 12:33 am

On Sun, 7 Mar 2004 15:19, Oliver Kurth <okurth@gmx.net> wrote:
> running for about half a year now, usually always on (so few reboots). I
> am still a little bit worried about /etc/mtab and /etc/network/ifstate
> (the latter can be put on ram disk as well).


/etc/mtab should work as a symlink to /proc/mounts.

> I have built a small Debian package for the ram disk setup, tell me if
> you are interested.


Sounds good. Is it suitable for including in Debian or does it have to hack
things around too much?

--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Joey Hess

2004-03-07, 12:33 am

Oliver Kurth wrote:
> I have set up something like this on a small PowerPC box, with a 64MB
> flash card. I have put lots of stuff into ram disk (/tmp,
> /var/{log,lock,run}, /var/{lib,cache}/apt), using bind mounts. It is
> running for about half a year now, usually always on (so few reboots). I
> am still a little bit worried about /etc/mtab and /etc/network/ifstate
> (the latter can be put on ram disk as well).
>
> Of course, on reboot I loose all my log files. And I need to call
> apt-get update again, but that's not a problem.
>
> I have built a small Debian package for the ram disk setup, tell me if
> you are interested.


There's the flashybrid package (in unstable and testing) that can
automate this kind of thing, including saving your log files back to
flash on shutdown. I've used it for years, on flash systems ranging from
32 mb ro 256 mb in size.

--
see shy jo

Russell Coker

2004-03-07, 12:33 am

On Sun, 7 Mar 2004 15:42, Marc Singer <elf@buici.com> wrote:
>
> Single...what? I suppose I wasn't clear in that this is 250 block


Single block.

> erases for a given block. If the erase block is 128 KiB and you have
> only one free block (heaven forbid) that would require writing 32 MiB
> of data every day for a year before that block was unable to accept
> another write.


On my laptop 310M of data have been written over the last 15 hours (since the
last boot). I have not done any compiles, none of the big cron jobs have
been run, and I have not done my daily update to unstable.

At my current level of use if I had 20 free blocks I could expect an error
after a year.

--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Marc Singer

2004-03-07, 12:33 am

On Sun, Mar 07, 2004 at 03:54:00PM +1100, Russell Coker wrote:
> On Sun, 7 Mar 2004 15:42, Marc Singer <elf@buici.com> wrote:
>
> Single block.
>
>
> On my laptop 310M of data have been written over the last 15 hours (since the
> last boot). I have not done any compiles, none of the big cron jobs have
> been run, and I have not done my daily update to unstable.
>
> At my current level of use if I had 20 free blocks I could expect an error
> after a year.


If you eliminate /var, /tmp, and email, do you still get 310MiB in 15
hours?

On a system that is receiving mail, I imagine that a USB fs isn't a
great idea. However, I use a laptop as a diagnostic tool and for
attaching to the Internet through my client's networks. In that case,
I don't do a lot of permanent writing to the local fs.


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Marc Singer

2004-03-07, 12:33 am

On Sat, Mar 06, 2004 at 07:51:34PM -0900, Joey Hess wrote:
> Oliver Kurth wrote:
>
> There's the flashybrid package (in unstable and testing) that can
> automate this kind of thing, including saving your log files back to
> flash on shutdown. I've used it for years, on flash systems ranging from
> 32 mb ro 256 mb in size.


Had any flash device errors yet?


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Oliver Kurth

2004-03-07, 12:33 am

On Sat, 2004-03-06 at 20:54, Russell Coker wrote:

> On my laptop 310M of data have been written over the last 15 hours (sincethe
> last boot). I have not done any compiles, none of the big cron jobs have
> been run, and I have not done my daily update to unstable.


By risking to appear stupid: how do you find that out?

Greetings,
Oliver

> --
> http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
> http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
> http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
> http://www.coker.com.au/~russell/ My home page
>


Marc Singer

2004-03-07, 12:33 am

On Sat, Mar 06, 2004 at 09:04:02PM -0800, Oliver Kurth wrote:
> On Sat, 2004-03-06 at 20:54, Russell Coker wrote:
>
>
> By risking to appear stupid: how do you find that out?


> apt-cache show sysstat



--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Russell Coker

2004-03-07, 12:33 am

On Sun, 7 Mar 2004 16:01, Marc Singer <elf@buici.com> wrote:
>
> If you eliminate /var, /tmp, and email, do you still get 310MiB in 15
> hours?


The root file system (including /tmp) only had 14M of data written to it.

/var had 93M written, swap had nothing written (I've got 384M of RAM and the
system has to run for a while before enough memory is leaked to give some
swap use). /home had 183M written which includes email.

> On a system that is receiving mail, I imagine that a USB fs isn't a
> great idea. However, I use a laptop as a diagnostic tool and for
> attaching to the Internet through my client's networks. In that case,
> I don't do a lot of permanent writing to the local fs.


I use my laptop for doing all work. I think that flash storage is almost
suitable for use in my laptop provided that I got enough of it. It would
cost more than hard disks, but would produce less noise and heat, and should
be more reliable overall provided that the wear was distributed enough.

--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Russell Coker

2004-03-07, 12:33 am

On Sun, 7 Mar 2004 16:04, Oliver Kurth <okurth@gmx.net> wrote:
> On Sat, 2004-03-06 at 20:54, Russell Coker wrote:
>
> By risking to appear stupid: how do you find that out?


Run iostat when running a 2.6.x or 2.4.x kernel.

--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Marc Singer

2004-03-07, 12:33 am

On Sun, Mar 07, 2004 at 04:21:25PM +1100, Russell Coker wrote:
> On Sun, 7 Mar 2004 16:01, Marc Singer <elf@buici.com> wrote:
>
> The root file system (including /tmp) only had 14M of data written to it.
>
> /var had 93M written, swap had nothing written (I've got 384M of RAM and the
> system has to run for a while before enough memory is leaked to give some
> swap use). /home had 183M written which includes email.


....and if only I get get it to *not* write spam to disk.

>
> I use my laptop for doing all work. I think that flash storage is almost
> suitable for use in my laptop provided that I got enough of it. It would
> cost more than hard disks, but would produce less noise and heat, and should
> be more reliable overall provided that the wear was distributed enough.


Your optimism is impressive.


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Oliver Kurth

2004-03-07, 1:33 am

On Sat, 2004-03-06 at 20:45, Russell Coker wrote:
> On Sun, 7 Mar 2004 15:19, Oliver Kurth <okurth@gmx.net> wrote:
>
> /etc/mtab should work as a symlink to /proc/mounts.


Yes... but there may be problems with loop mounts.

>
> Sounds good. Is it suitable for including in Debian or does it have to hack
> things around too much?


Well, it is really very simple, no rocket science. It just consists of
an init script that creates the directories, see here:
http://people.debian.org/~oku/rdsetup/
My plans were to make it more configurable, but I haven't done that yet.

But I will look at flashybrid, seems that is more advanced.

Greetings,
Oliver



Martin Albert

2004-03-07, 11:34 am

> > I use my laptop for doing all work. I think that flash storage is[color=darkred]

Hey, yo, big guys!
i'd never ask here, but while you're talking about it, please:

I'm in a somewhat urgent need to have

- something *smaller* and taking less power than a 3,5" drive
- with SCSI interface!

_Anybody_ knows _anything_?

(Admittedly i will not store debian on it, just some samples -
http://www.carthago-music.de/ensoniq/epsasr.htm,
it's gotta fit in the case of EPS16+

Thanks for your answer in advance,
have a nice day,
martin

--
http://iif.eu.tt


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Joey Hess

2004-03-07, 12:34 pm

Marc Singer wrote:
> Had any flash device errors yet?


No, but then my systems only mount their flash drives rw at boot, reboot,
and for system administration. I expect they'd last for 10 or 15 years
without wear leveling.

--
see shy jo

Matthias Urlichs

2004-03-07, 2:34 pm

Hi, Joey Hess wrote:

> Marc Singer wrote:
>
> No, but then my systems only mount their flash drives rw at boot, reboot,
> and for system administration. I expect they'd last for 10 or 15 years
> without wear leveling.


I've got a keychain USB dongle here which I've used not at all that
often, or long. It died after half a year, bad/unwriteable blocks.

Conclusion: *Never* use these without an adequate backup strategy.
(I had one. ;-)

--
Matthias Urlichs


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Joey Hess

2004-03-07, 3:33 pm

Matthias Urlichs wrote:
> I've got a keychain USB dongle here which I've used not at all that
> often, or long. It died after half a year, bad/unwriteable blocks.
>
> Conclusion: *Never* use these without an adequate backup strategy.
> (I had one. ;-)


I never use *any* drive without backups, but thanks for the advice.

--
see shy jo

Joe Drew

2004-03-08, 9:34 pm

Russell Coker wrote:
> The
> flash devices with ATA or USB interfaces are SUPPOSED to do wear levelling
> internally, but rumor has it that they often don't.


Most don't because they are cheap, and the patents which cover
implementing wear levelling in hardware are expensive.


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Jim Gettys

2004-03-08, 9:34 pm

Note that jffs2 does very nice wear leveling
algorithms that are clear of those patents.

Doing this on top of the IDE interface is possible (IIRC);
David Woodhouse would know for sure. Setting up the mount
is a bit complicated, but doable.
- Jim

On Mon, 2004-03-08 at 20:27, Joe Drew wrote:
> Russell Coker wrote:
>
> Most don't because they are cheap, and the patents which cover
> implementing wear levelling in hardware are expensive.

--
Jim Gettys <Jim.Gettys@hp.com>
HP Labs, Cambridge Research Laboratory


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Oliver Kurth

2004-03-08, 9:34 pm

On Mon, 2004-03-08 at 17:27, Joe Drew wrote:
> Russell Coker wrote:
>
> Most don't because they are cheap, and the patents which cover
> implementing wear levelling in hardware are expensive.


Well, the bad news is that there is a patent... sigh.

Good news is that at least SanDisk uses wear leveling:
http://www.sandisk.com/pdf/oem/WPaperWearLevelv1.0.pdf

Found with
http://www.google.com/search?q=flas...veling%20patent
first hit.

Greetings,
Oliver


Russell Coker

2004-03-09, 12:33 am

On Tue, 9 Mar 2004 12:34, Jim Gettys <Jim.Gettys@hp.com> wrote:
> Note that jffs2 does very nice wear leveling
> algorithms that are clear of those patents.


JFFS2 is a nice file system. Unfortunately it doesn't have XATTR support yet,
so it can't be used for the new SE Linux.

> Doing this on top of the IDE interface is possible (IIRC);
> David Woodhouse would know for sure. Setting up the mount
> is a bit complicated, but doable.


Interesting.

It's a pity that they couldn't just make JFFS2 have an option to work like
every other file system. There are lots of cases where you want a JFFS2 file
system on something other than a flash device. For example when trying to
recover files from a corrupted PDA, you can get the file system to a file on
a desktop, but then can't do anything with it!

--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Oliver Kurth

2004-03-09, 12:33 am

On Mon, 2004-03-08 at 20:44, Russell Coker wrote:
> On Tue, 9 Mar 2004 12:34, Jim Gettys <Jim.Gettys@hp.com> wrote:
>
> JFFS2 is a nice file system. Unfortunately it doesn't have XATTR supportyet,
> so it can't be used for the new SE Linux.
>
>
> Interesting.
>
> It's a pity that they couldn't just make JFFS2 have an option to work like
> every other file system. There are lots of cases where you want a JFFS2 file
> system on something other than a flash device. For example when trying to
> recover files from a corrupted PDA, you can get the file system to a fileon
> a desktop, but then can't do anything with it!


I also had some experiences with jffs2 on a PDA a few years ago (iPaq
with familiar linux), but no good ones. It was slow, and regularly got
corrupted beyond repair. I think it has improved in the mean time, but
of what I have heard so far, it is still slow. Probably too slow for my
48MHz PowerPC. I haven't tested it yet myself, though.

Greetings,
Oliver


Matthias Urlichs

2004-03-09, 11:34 am

Hi, Joey Hess wrote:

> Matthias Urlichs wrote:
>
> I never use *any* drive without backups, but thanks for the advice.


I wasn't targeting you in particular (sorry if I came across as doing so).

It's a fact, though, that having a "hard disk" with no moving parts tends
to inflate peoples' belief in the reliability of these things.

--
Matthias Urlichs


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Matt Zimmerman

2004-03-09, 8:34 pm

On Sun, Mar 07, 2004 at 03:54:00PM +1100, Russell Coker wrote:

> On my laptop 310M of data have been written over the last 15 hours (since the
> last boot). I have not done any compiles, none of the big cron jobs have
> been run, and I have not done my daily update to unstable.
>
> At my current level of use if I had 20 free blocks I could expect an error
> after a year.


As another data point, I have a router which runs Debian from a jffs2
filesystem on a flash device, with various configuration changes to minimize
writes, and it has written about 33M since boot (47 days), or about
732kb/day. During this time, I performed various administration tasks,
including installing a package or two with dpkg. At this rate, even with
only one free block (which would be erased 6 times per day), I could expect
the device to be obsolete long before its flash media gives out. In
reality, there are several hundred free blocks, and so I am not worried.

--
- mdz


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Matt Zimmerman

2004-03-09, 8:34 pm

On Sat, Mar 06, 2004 at 09:04:02PM -0800, Oliver Kurth wrote:

> On Sat, 2004-03-06 at 20:54, Russell Coker wrote:
>
>
> By risking to appear stupid: how do you find that out?


/proc/partitions on a system with CONFIG_BLK_STATS (stock Debian kernels
have it).

--
- mdz


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Matt Zimmerman

2004-03-09, 8:34 pm

On Tue, Mar 09, 2004 at 03:44:07PM +1100, Russell Coker wrote:

> On Tue, 9 Mar 2004 12:34, Jim Gettys <Jim.Gettys@hp.com> wrote:
>
> JFFS2 is a nice file system. Unfortunately it doesn't have XATTR support yet,
> so it can't be used for the new SE Linux.
>
>
> Interesting.
>
> It's a pity that they couldn't just make JFFS2 have an option to work like
> every other file system.


There is one, namely the blkmtd driver.

--
- mdz


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Matt Zimmerman

2004-03-09, 8:34 pm

On Mon, Mar 08, 2004 at 08:59:32PM -0800, Oliver Kurth wrote:

> I also had some experiences with jffs2 on a PDA a few years ago (iPaq
> with familiar linux), but no good ones. It was slow, and regularly got
> corrupted beyond repair. I think it has improved in the mean time, but
> of what I have heard so far, it is still slow. Probably too slow for my
> 48MHz PowerPC. I haven't tested it yet myself, though.


I don't find it to be slow under normal conditions; I've used it on a Zaurus
and a 100MHz i486. It is very slow to boot due to the consistency check
done when it is mounted; I've heard that this is now much faster in 2.6.

--
- mdz


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Neil Kelly

2004-03-17, 9:43 am

I'm playing around with this (starting with the
non-debian flashpuppy PuppyLinux). This claim that the
usb flash memory "breaks" - is this a technical
observation or a cynical one? I noticed that the
supplier of my card (www.kingston.com) offers a "Life
Time Warranty" on it. resellers on ebay are offering
five year warranty, I expect the technology to be
superceded before then!
cheers, Neil Kelly





________________________________________
___________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
David B Harris

2004-03-17, 4:40 pm

On Wed, 17 Mar 2004 14:18:52 +0000 (GMT)
Neil Kelly <nkelly999@yahoo.co.uk> wrote:
> I'm playing around with this (starting with the
> non-debian flashpuppy PuppyLinux). This claim that the
> usb flash memory "breaks" - is this a technical
> observation or a cynical one? I noticed that the
> supplier of my card (www.kingston.com) offers a "Life
> Time Warranty" on it. resellers on ebay are offering
> five year warranty, I expect the technology to be
> superceded before then!


Well, that's the rub. The manufacturers expect people to have bought new
devices well before the flash memory burns out. And yes, it does
actually "burn out" after a given number of erases/writes. It's not as
relevant on something like an mp3 player, which has a relatively small
number of writes in regular usage. Even a standard USB keychain flash
device has far fewer writes than the stuff that's been discussed in this
thread.

When you're talking about running a full modern OS off the flash device,
it does become a real issue.

--
Arguing with an engineer is like wrestling with a pig in mud.
After a while, you realise the pig is enjoying it.


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Goswin von Brederlow

2004-03-27, 10:34 pm

Marc Singer <elf@buici.com> writes:

> On Sun, Mar 07, 2004 at 03:06:37AM +0100, Steinar H. Gunderson wrote:
>
> Doesn't it matter how the system is used?
>
> Most of the flash parts are rated for 100K erase cycles per 128KiB
> block (StrataFlash). Cheap hard drives are usualy waranteed for only
> one year. Assuming the best case for flash, and worst case for a hard


2 years from the seller required by law in germany, usually 3 to 5
years manufacturer warantee on disks. 5 year warantee on sticks/flash
cards too (which doesn't mean they won't fail a lot sooner).

> drive, the flash device can take about 250 block erase cycles/day in a


And you get one every 3 seconds on some blocks. Thats 28800 a day.
Thats atime updates for you. One should be carefull setting that up.

> year of continuous use. The wear-leveling flash filesystems will
> substantially extend the lifespan of the flash device. If the system
> is setup to reduce unnecessary writes to the flash device, it seems
> possible to get many years of use before the flash device fails.
>
> In other words, it seems reasonable to use flash as a hard-drive
> replacement as long as one is clever.


I would setup a ramdisk system or a lvm snapshot (flash stick R/O +
ramdisk as copy-on-write storgae). Better not write to the stick if
not neccessary.

With lvm you can just hit reboot to get the original setup or move the
changed blocks onto the stick to change the stick itself. Having the
stick R/O also means no fsck or journal (oh yeah, journaling on
sticks, instant death commits and no filesystem corruption
possible.

Instead of a stick you could also use a CDr(w) or DVDr(w). Nice for a
router. If you think it got compromised, hit reboot.

MfG
Goswin

PS: D-I supports being put on an usb stick, boot that and install
debian from it. Installing too it should be easy to add too.


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Goswin von Brederlow

2004-03-27, 11:33 pm

Oliver Kurth <okurth@gmx.net> writes:

> On Sat, 2004-03-06 at 20:45, Russell Coker wrote:
>
> Yes... but there may be problems with loop mounts.


With one of the 6 patches from BTS you can also link /etc/mtab to
somewhere writeable and have it work like its now.

>
> Well, it is really very simple, no rocket science. It just consists of
> an init script that creates the directories, see here:
> http://people.debian.org/~oku/rdsetup/
> My plans were to make it more configurable, but I haven't done that yet.
>
> But I will look at flashybrid, seems that is more advanced.
>
> Greetings,
> Oliver


MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Goswin von Brederlow

2004-03-27, 11:33 pm

Marc Singer <elf@buici.com> writes:

> On Sun, Mar 07, 2004 at 03:25:08PM +1100, Russell Coker wrote:
>
> Single...what? I suppose I wasn't clear in that this is 250 block
> erases for a given block. If the erase block is 128 KiB and you have
> only one free block (heaven forbid) that would require writing 32 MiB
> of data every day for a year before that block was unable to accept
> another write.


Writeing one single byte of that block is enough. Thats 250 bytes.

> Even if there is no wear-leveling, this could be OK as long as you
> didn't plan to keep the flash device more than a year.


MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Russell Coker

2004-03-28, 2:34 am

On Sun, 28 Mar 2004 13:32, Goswin von Brederlow=20
<brederlo@informatik.uni-tuebingen.de> wrote:
>
> Writeing one single byte of that block is enough. Thats 250 bytes.


Are you sure? From a brief skim read of the JFFS2 documentation I didn't g=
et=20
the impression that it worked like that. JFFS2 blocks are smaller than fil=
e=20
system blocks, so 250 one-byte writes would need 250 JFFS2 blocks to be=20
written.

Of course that just changes the problem to having only one JFFS2 block free.

But you are right that things get worse as free space decreases. The more=
=20
space you can keep free on JFFS2 the better.

Also one thing that's noteworthy is that in what I consider to be fairly=20
typical use of an iPaQ type device, the machine is periodically refreshed t=
o=20
the latest distribution. This means that many files which almost never get=
=20
changed get put at the first blocks of the flash. This is a minor impedime=
nt=20
to flash life.

=2D-=20
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page
Russell Coker

2004-03-28, 8:35 am

On Sun, 28 Mar 2004 13:28, Goswin von Brederlow
<brederlo@informatik.uni-tuebingen.de> wrote:
>
> And you get one every 3 seconds on some blocks. Thats 28800 a day.
> Thats atime updates for you. One should be carefull setting that up.


If you use ext2, ext3, or some similar block and Inode based file system on a
flash device with no wear-levelling layer in between then you are doing
everything wrong.

Some (most?) of the flash hardware that looks like an ATA disk or similar has
it's own wear levelling, so although ext2/ext3 writes the same Inode block
repeatedly it's really going to different parts of the storage. Even so
mounting noatime is the best thing to do.

--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Goswin von Brederlow

2004-03-28, 12:34 pm

Russell Coker <russell@coker.com.au> writes:

> On Sun, 28 Mar 2004 13:32, Goswin von Brederlow
> <brederlo@informatik.uni-tuebingen.de> wrote:
>
> Are you sure? From a brief skim read of the JFFS2 documentation I didn't get
> the impression that it worked like that. JFFS2 blocks are smaller than file
> system blocks, so 250 one-byte writes would need 250 JFFS2 blocks to be
> written.


Hopefully the abstraction layers above the hardware gather, combine
and scatter writes so you won't get 250 one byte writes to the same
block when you write single bytes.

Point is that a one byte write still needs a 128K erase. Unless some
higher level ensures against one byte writes 250 bytes could mean 250
erases.

> Of course that just changes the problem to having only one JFFS2 block free.
>
> But you are right that things get worse as free space decreases. The more
> space you can keep free on JFFS2 the better.
>
> Also one thing that's noteworthy is that in what I consider to be fairly
> typical use of an iPaQ type device, the machine is periodically refreshed to
> the latest distribution. This means that many files which almost never get
> changed get put at the first blocks of the flash. This is a minor impediment
> to flash life.


MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Joey Hess

2004-03-28, 1:34 pm

Goswin von Brederlow wrote:
> PS: D-I supports being put on an usb stick, boot that and install
> debian from it. Installing too it should be easy to add too.


It also supports installing to it (I've booted from one stick and
installed to another). I've not had any success booting a USB stick with
grub though.

--
see shy jo

Goswin von Brederlow

2004-03-28, 1:34 pm

Joey Hess <joeyh@debian.org> writes:

> Goswin von Brederlow wrote:
>
> It also supports installing to it (I've booted from one stick and
> installed to another). I've not had any success booting a USB stick with
> grub though.
>
> --
> see shy jo


Does that work when booting of cdrom or net too?

MfG
Goswin


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Joey Hess

2004-03-28, 2:34 pm

Goswin von Brederlow wrote:
> Does that work when booting of cdrom or net too?


I would assume so, though I've never tried it.

--
see shy jo

Russell Coker

2004-03-29, 1:35 am

On Mon, 29 Mar 2004 03:20, Goswin von Brederlow
<brederlo@informatik.uni-tuebingen.de> wrote:
> Point is that a one byte write still needs a 128K erase. Unless some
> higher level ensures against one byte writes 250 bytes could mean 250
> erases.


The way flash works is that you can flip bits one way without any cost, but
flipping them the other way requires an erase cycle (which wears it out).

So if you want to erase a file-system block without erasing the flash block
(flash block being significantly larger than the FS block) then you just
change a bit in the FS block header to indicate that it is obsolete. The
JFFS2 docs describe this.

--
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/ Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/ My home page


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Pedro M. (Morphix User)

2004-04-04, 8:34 am

Goswin von Brederlow escribió:

>Joey Hess <joeyh@debian.org> writes:
>
>
>
>
>Does that work when booting of cdrom or net too?
>
>MfG
> Goswin
>
>
>
>

Try http://www.morphix.org ( USB version).

Regards.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Will Klein

2004-04-11, 3:13 pm

Here's a guide on booting Debian by USB key:

http://d-i.pascal.at/

I am testing this w/ a VIA EPIA M10000 and a Memorex
256MB TravelDrive/ThumbDrive USB 2.0. I would like to
know what USB devices have been tested to boot successfully.

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway
http://promotions.yahoo.com/design_giveaway/


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com