Joined: 04 Feb 2007 Posts: 426 Location: Fountain of Youth
Posted: Thu Oct 13, 2011 16:21 Post subject: Optware, flush EXT3 journal. EXT3 to EXT2 conversion
I would like to disasble EXT3 journaling, but to do so I think I need to flush the journal by having it write to the card and setting the flags to permit disabling journaling (tune2fs).
Code:
tune2fs -O ^has_journal /dev/xdy
Attempts were met with:
"The needs_recovery flag is set. Please run e2fsck before clearing has_journal flag"
root@sysresccd /root % e2fsck -y -v -f /dev/sdb1
e2fsck 1.41.14 (22-Dec-2010)
/dev/sdb1: recovering journal
Adding dirhash hint to filesystem.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdb1: ***** FILE SYSTEM WAS MODIFIED *****
12264 inodes used (9.92%)
55 non-contiguous files (0.4%)
14 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 600/1/0
65283 blocks used (26.43%)
0 bad blocks
1 large file
Ok, but if your only concerned about writes then just mount the partition as an ext2 filesystem and then the journal won't be used. Don't try using it as an ext3 filesystem at a later date.
The two filesystems are the same except ext3 has a journal. You can mount an ext3 filesystem as ext2 but the journal won't be used or updated with writes to the filesystem.
Joined: 04 Feb 2007 Posts: 426 Location: Fountain of Youth
Posted: Thu Oct 13, 2011 20:08 Post subject:
I had to perform a 30-30-30 reset and reconfigure the settings. This leads me to wonder if there are any router settings that need to be performed by the optware_prep script.
I used another linux box to verify that the data was still on the SD card.
Joined: 04 Feb 2007 Posts: 426 Location: Fountain of Youth
Posted: Thu Oct 20, 2011 5:52 Post subject: Procedure to Remount newly EXT3 => EXT2 SD Card
Ok, so after some tinkering, I found a working process. The trick is to have the USB support webpage up and running, ready to post to the router to enable the USB support:
You can then insert the newly minted EXT2 card and push the apply settings button. Before doing this there are a few other details.
THESE STEPS MUST BE PERFORMED FIRST
===================================
After creating the web page shown above, I opened another brower tab and switched off the router's USB support. Here is what it looks like with USB support off:
After creating these two tabs in the browser, I took the SD card out of the router (powered on). Make sure that you can get into the router's web pages. You may need to go through port 88 instead of 80:
Now you may remove the SD card and put it into another linux box (I used a virtual machine with sysrescuecd) to
Code:
echo find the partion
cat /proc/partitons
echo flush the JFFS journal
e2fsck -y -v -f /dev/sdb1
echo List the partition's data before disable journaling
tune2fs -l /dev/sdb1 | grep features
echo Disable journaling on EXT3 Device
tune2fs -O ^has_journal /dev/sdb1
echo List the partition's data after disable journaling
tune2fs -l /dev/sdb1 | grep features
The code above provide before and after details of the has_journal flag (should not be present in EXT2).
Return the SD card to the USB port and push the apply settings button shown in the first screen shot.
If you are succesfully it will show the partion is EXT2: