We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

Badblocks test

asked 2017-06-29 21:02:36 +0200

4dmonster gravatar image

My Jolla C has broken some regions of flash memory that is 'mmcblk0p28' . How can i test and mark bad blocks as there is no 'badblocks' program build in ?

edit retag flag offensive close delete

Comments

@4dmonster, you can use recovery mode for checking memory (option 4).

Info: for booting Jolla C into Recovery shutdown the phone, press&hold volume up key, turn on the phone and see "bla-bla-bla 10.42.66.66". Now connect the phone to USB-port of notebook (or computer) with Linux (it's the simplest way), open Terminal and type "telnet 10.42.66.66", press Enter.

Asmir ( 2017-06-29 22:50:57 +0200 )edit

that checking doesn't help. It totally fails if bad blocks were used by files or do nothing useful as there is no errors unless bad blocks touched.

4dmonster ( 2017-06-29 22:56:28 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-06-29 21:38:02 +0200

Maus gravatar image

updated 2017-06-30 20:12:30 +0200

On JP1301 /dev/mmcblk0p28 ist formatted with btrfs, on Jolla C probably ext4. Both filesystems aren't designed specifically for use on flash storage. Bad blocks management is nowadays a matter of the medium itself (hard disks re-map bad blocks without user interaction, flash storage does wear leveling in its firmware). While the badblocks program (that usually comes with Ted T'so's extXfs) made sense a couple of decades ago, and would theoretically be usable on a Jolla C, it is no longer advisable to use it in these days.

If you encounter read/write errors on modern media, replace them. In case of a phone's flash memory this unfortunately means you've got to replace the phone (unless you're really good at soldering or have too much money left). Those errors mean that internal mechanisms that cope with read/write errors don't work any more because there are just too many of those errors on the device.

edit flag offensive delete publish link more

Comments

On JollaC /dev/mmcblk0p28 is not ext4 or btrfs. It is lvm2. My phone has damaged internal flash memory. And some regions work fine. i wish Jolla to avoid using problem block.

4dmonster ( 2017-06-29 21:52:07 +0200 )edit

If only a single partition is exhibiting such behavior it might be possible to free up some space in the LVM volume group (by shrinking the EXT4 filesystems and then the logical volumes) and then removing the physical volume residing on the problematic partition.

MartinK ( 2017-06-30 00:02:42 +0200 )edit

You are right. My first problem is to locate bad areas. And i want to find something more useful than just create dummy files and wait when device fails into recovery.

4dmonster ( 2017-06-30 08:33:21 +0200 )edit

@4dmonster If storage on your Jolla C does not do flash cell wear leveling, you may have a chance with a badblocks-like method. With automatic wear leveling, there are no good blocks left for re-mapping and problems will get worse over time. One way or other, your device will be unreliable and you should backup your data and replace the phone.

There's a chance that your Jolla C firmware has lvm-tools installed. With tools like lvs, pvs and vgs you can look up on which LV /dev/mmcblk0p28 is used, and find out whether a badblocks-like strategy may work there. Good luck.

Maus ( 2017-06-30 10:22:44 +0200 )edit

@Maus, Jolla C firmware has installed lvm-tools. The good example of using this tools you can find HERE. It really works.

Asmir ( 2017-06-30 21:48:16 +0200 )edit
Login/Signup to Answer

Question tools

Follow
1 follower

Stats

Asked: 2017-06-29 21:02:36 +0200

Seen: 405 times

Last updated: Jun 30 '17