Good read about USB Flash

Marvell Orion based
Post Reply
KeyCat
Posts: 70
Joined: Tue Apr 05, 2011 8:07 am

Good read about USB Flash

Post by KeyCat » Sat Oct 08, 2011 3:55 pm

Maybe old news for some but a good read IMO...

How Long Does a Flash Drive Last?

http://www.bress.net/blog/archives/114- ... -Last.html

So how long have you guys had your NSA-220+ running Debian (or FFP) up running on the same USB Flash drive?

/KC

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: Good read about USB Flash

Post by Mijzelf » Wed Oct 12, 2011 11:17 am

My FFP run from a 4GB stick for about half a year. That stick is still alive, and works as new.
My Debian run from 2 8GB sticks in raid0, with all normal logs on, and a swap partition on one of the sticks. That lasted about a year, I think. The sticks are still working, but the write speed has degraded badly. Then I copied the installation to some USB powered harddisk.

KeyCat
Posts: 70
Joined: Tue Apr 05, 2011 8:07 am

Re: Good read about USB Flash

Post by KeyCat » Mon Oct 24, 2011 12:31 pm

I guess the brand of the USB stick also make a difference. A bit strange the test result in the article is that big, 90+ million writes is alot...

/KC

KeyCat
Posts: 70
Joined: Tue Apr 05, 2011 8:07 am

Re: Good read about USB Flash

Post by KeyCat » Thu Oct 27, 2011 11:38 am

Some tips to minimize the wear when running Linux from a USB stick...

http://www.cyrius.com/debian/nslu2/linux-on-flash.html

/KC

KeyCat
Posts: 70
Joined: Tue Apr 05, 2011 8:07 am

Re: Good read about USB Flash

Post by KeyCat » Sun Oct 30, 2011 2:12 pm

After a bit more reading I tried to put /tmp and /var/log in RAM by editing "/etc/default/rcS" with..

RAMRUN=yes
RAMLOCK=yes

but after reboot they still appear on the USB stick, any ideas what I'm missing?

Also are there any simple way to disable the journaling completele on /rootfs or must that be done when partitioning it?

/KC

Mijzelf
Posts: 6251
Joined: Mon Jun 16, 2008 10:45 am

Re: Good read about USB Flash

Post by Mijzelf » Tue Nov 01, 2011 9:28 am

KeyCat wrote:Also are there any simple way to disable the journaling completele on /rootfs or must that be done when partitioning it?
It has nothing to do with partitioning, but with creating the filesystem. You have (I think) an ext3 rootfs, you could convert it to ext2:

Code: Select all

tune2fs -O ^has_journal /dev/sdx2
The partition should not be mounted, so you can't do it from the rootfs itself. You could also change your initramfs to explicitely mount the rootfs as ext2. BTW, it is also possible to put the journal on a different stick, though I never tried that.
KeyCat wrote:After a bit more reading I tried to put /tmp and /var/log in RAM by editing "/etc/default/rcS" with..
RAMRUN=yes
RAMLOCK=yes
but after reboot they still appear on the USB stick, any ideas what I'm missing?
Are you sure? These environment vars should force Debian to mount a tmpfs (ramdisk) on /var/run and /var/lock, but on a running system you won't mention it, if you don't look at the output of 'cat /proc/mounts'.

KeyCat
Posts: 70
Joined: Tue Apr 05, 2011 8:07 am

Re: Good read about USB Flash

Post by KeyCat » Tue Nov 01, 2011 3:42 pm

Mijzelf wrote: You could also change your initramfs to explicitely mount the rootfs as ext2.
Thats probably the best option, will do that!
...if you don't look at the output of 'cat /proc/mounts'.
Your right it did have an effect, just checked and it shows "/var/run" and "/var/lock" on tmpfs...

...
varrun /var/run tmpfs rw,nosuid 0 0
varlock /var/lock tmpfs rw,nosuid,nodev,noexec 0 0
...

Thanks,

/KC

Post Reply