Quantcast

uSD ReadOnly File System.

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

uSD ReadOnly File System.

Juan Osuna
I have a sensor monitoring application using the VERDEX XL6P.    Basically, sensors are sampled every second and the data string is written to the uSD memory.

We have experienced that when the VERDEX suddenly turns off by electricity blackouts, the uSD memory turns to the read-only state after restarting the VERDEX and in some cases the memory gets damaged and become unusable.

We have managed to repair the memory by first, unmounting and remounting the uSD, and second, by removing the last lines of the last file.
For our final application, this is not practical since due to installation at remote sites, the entire operation should be automatic.

- Has anyone had any similar problem?
- Any recommendations for automatically repairing the memory after a read-only state?

Thank you in advance for your help.
Best regards!!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: uSD ReadOnly File System.

Greg Kogut
This is not a complete solution, but a good practice would be to create a separate partition on the uSD for the sole purpose of storing your data, and to use one of the journalling filesystem types on that partition, e.g. ext3 or 4. 

The automated way of repairing the partition would be to create a script initiated by the init system which runs fsck on that parition and responds appropriately given the output of fsck.   This script could cull the last line of your data file as a last step.

This won't fix problems regarding cases where the actual OS filesystem partition gets corrupted, but it should minimize risk. 

There are other practices for going to extreme reliability, but I haven't seen them used much on Yocto/Angstrom type setups.

Regards,
Greg





From: Juan Osuna <[hidden email]>
To: [hidden email]
Sent: Monday, March 18, 2013 12:18 PM
Subject: [Gumstix-users] uSD ReadOnly File System.

I have a sensor monitoring application using the VERDEX XL6P.    Basically,
sensors are sampled every second and the data string is written to the uSD
memory.

We have experienced that when the VERDEX suddenly turns off by electricity
blackouts, the uSD memory turns to the read-only state after restarting the
VERDEX and in some cases the memory gets damaged and become unusable.

We have managed to repair the memory by first, unmounting and remounting the
uSD, and second, by removing the last lines of the last file.
For our final application, this is not practical since due to installation
at remote sites, the entire operation should be automatic.

- Has anyone had any similar problem?
- Any recommendations for automatically repairing the memory after a
read-only state?

Thank you in advance for your help.
Best regards!!




--
View this message in context: http://gumstix.8.n6.nabble.com/uSD-ReadOnly-File-System-tp4967010.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: uSD ReadOnly File System.

Juan Osuna
In reply to this post by Juan Osuna
Hi Greg.
Thank you for your recommendations.

It will be then a good idea, to start partitioning the uSD memory and using a Journalling Filesystem.

Do you know if it is more reliable to use solid state uSD memory in this cases?

Best Regards!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: uSD ReadOnly File System.

Greg Kogut
I don't understand the last question:  uSD is, by definition, solid-state.

Greg



From: Juan Osuna <[hidden email]>
To: [hidden email]
Sent: Monday, March 18, 2013 2:15 PM
Subject: Re: [Gumstix-users] uSD ReadOnly File System.

Hi Greg.
Thank you for your recommendations.

It will be then a good idea, to start partitioning the uSD memory and using
a Journalling Filesystem.

Do you know if it is more reliable to use solid state uSD memory in this
cases?

Best Regards!



--
View this message in context: http://gumstix.8.n6.nabble.com/uSD-ReadOnly-File-System-tp4967010p4967012.html
Sent from the Gumstix mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users



------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: uSD ReadOnly File System.

James Linder
In reply to this post by Juan Osuna

On 19/03/2013, at 5:15 AM, [hidden email] wrote:

> I have a sensor monitoring application using the VERDEX XL6P.? ? Basically,
> sensors are sampled every second and the data string is written to the uSD
> memory.
>
> We have experienced that when the VERDEX suddenly turns off by electricity
> blackouts, the uSD memory turns to the read-only state after restarting the
> VERDEX and in some cases the memory gets damaged and become unusable.
>
> We have managed to repair the memory by first, unmounting and remounting the
> uSD, and second, by removing the last lines of the last file.
> For our final application, this is not practical since due to installation
> at remote sites, the entire operation should be automatic.
>
> - Has anyone had any similar problem?
> - Any recommendations for automatically repairing the memory after a
> read-only state?


The way (some / many / all ?) distros handle a live CD is to have a readonly filesystem overlaid by a ram fs. The basic file system is immutable, the changes temporary.

I unpacked (at init stage) the whole fs into a ram fs (There are many ways of doing this, I don't see why not (and I did without any woes) stay with my initrd for ever). A benefit of ram root is that the system is FAST.

These may be of some interest:
http://www.livedistro.org/resources/documentation/howtos/booting-ubuntu-to-ram

https://help.ubuntu.com/community/LiveCDCustomizationFromScratch

I would LOG to a ram fs then flush to flip-flop buffers so that worst case is you lose data since the last flush only

James
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: uSD ReadOnly File System.

zoso1234
In reply to this post by Juan Osuna
SD cards can be painful..I have had multiple sd cards that would become corrupt and switch to read only when I wasn't even doing anything and on what should be a steady power supply

I have been recommended before to use nilfs2 before although I have not tried it yet. I know of some UAV groups that do this and would probably expect other robotic applications too. The drawback to nilfs is huge boot time because it has to create the inode table each time. There are better ones. Your sdcard will last longer be faster and you'll have less file corruption if you don't a steady power supply.

http://www.nilfs.org/en/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: uSD ReadOnly File System.

Andrew Kirch
Wow, here's one of my favorite gripes, and an issue I spend a LOT of
time working on.  I've come up with a couple solutions, and a couple of
solutions that DONT WORK:
first, journaling FS read/write to media a bit more than a
non-journaling file system.  This is awesome until your first power
problem, don't buy into the temptation of using ext2.
second, not all SD cards are created equal, most aren't even close. I've
had very good luck with 4/8gb sandisk ultra uSD's.
third, if you can, use an 8-16 meg ramdisk and load commonly red/written
files there,
https://github.com/trelane/aquaponics/blob/master/rc.local is an example
of a ramdisk.  There's a shell script on the backend that sync's the
ramdisk to media every so often.


On 3/29/2013 4:30 PM, zoso1234 wrote:

> SD cards can be painful..I have had multiple sd cards that would become
> corrupt and switch to read only when I wasn't even doing anything and on
> what should be a steady power supply
>
> I have been recommended before to use nilfs2 before although I have not
> tried it yet. I know of some UAV groups that do this and would probably
> expect other robotic applications too. The drawback to nilfs is huge boot
> time because it has to create the inode table each time. There are better
> ones. Your sdcard will last longer be faster and you'll have less file
> corruption if you don't a steady power supply.
>
> http://www.nilfs.org/en/
>
>
>
>
>
> --
> View this message in context: http://gumstix.8.n6.nabble.com/uSD-ReadOnly-File-System-tp4967010p4967088.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Own the Future-Intel(R) Level Up Game Demo Contest 2013
> Rise to greatness in Intel's independent game demo contest. Compete
> for recognition, cash, and the chance to get your game on Steam.
> $5K grand prize plus 10 genre and skill prizes. Submit your demo
> by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>


------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete
for recognition, cash, and the chance to get your game on Steam.
$5K grand prize plus 10 genre and skill prizes. Submit your demo
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: uSD ReadOnly File System.

Juan Osuna
In reply to this post by Juan Osuna

 Thank you everyone for your suggestions.

I am testing the  ext2 format on my whole uSD and everything is working fine until now but it seems, taking account of the last post, that I need to think at least on ext3 format.

  Best regards!,
 Juan
Loading...