Disable journaling?? - Optimus One, P500, V General

Is there any way to disable journaling on ext4 file system?I have seen some flashable zips in galaxy ace's thread,but it doesnt seem to work.Anyone please.

You can, I haven't tried it though. Create a script with the following commands. (Got from knzo's tweaks thread)
Code:
tune2fs -o journal_data_writeback /dev/block/mmcblk0p2
tune2fs -O ^has_journal /dev/block/mmcblk0p2
Chuck it in the rom's init.d folder, and give appropriate permissions.

if u use the ext partition i'm assuming that u use something like a2sd or link2sd.
without journaling a bad reboot (eg. due to low battery) may results into not booting phone. A not clean partition cannot be mounted (bad sector) and device can miss some foundamental apps.

chiabre said:
if u use the ext partition i'm assuming that u use something like a2sd or link2sd.
without journaling a bad reboot (eg. due to low battery) may results into not booting phone. A not clean partition cannot be mounted (bad sector) and device can miss some foundamental apps.
Click to expand...
Click to collapse
Afaik,journaling is helpful only for hard drives and not sd cards.Also journaling cause a lot of read/write cycles which slows system slightly and also decreases sd card life.

how to give permission anyway?

So, what is the difference between ext4 without journaling and ext2. :-/

anotherloony said:
So, what is the difference between ext4 without journaling and ext2. :-/
Click to expand...
Click to collapse
Ext4 without journaling is even faster than ext2.

And you think you will have a performance boost on a low end device like Oo? :-B

Related

Understanding Galaxy Partitions? /sdcard & /data

Please could someone help explain a nuance with the SGS3 memory allocation?
I am used to seeing on other devices, 3 main partitions:
/system
/cache
/data
and then
/sdcard
On the SGS3, I am aware that now /sdcard is internal and removable media is mounted as /extsdcard.
Thats fine it itself.
What I don't understand is how /data and /sdcard appear to share the same space allocation. If I look in /data or in /sdcard, they both have the same used and free space.
as the /sdcard is not ext format, that removes the easy explanation of symlinking.
Could anyone help me understand please?
No one knows?
This has been discussed like a million times already.
The S3 uses a shared ext4 Storage partition for both the sdcard an data partition since one otherwise wastes a lot of capacity and is prone to have one of both fill up while the other one is (mostly) empty.
And yes the sdcard is ext4, however Samsung uses fuser (a userspace filesystem provider) trickery to achieve their goal while still providing the necessary protection, security and capacity.
d4fseeker said:
This has been discussed like a million times already.
The S3 uses a shared ext4 Storage partition for both the sdcard an data partition since one otherwise wastes a lot of capacity and is prone to have one of both fill up while the other one is (mostly) empty.
And yes the sdcard is ext4, however Samsung uses fuser (a userspace filesystem provider) trickery to achieve their goal while still providing the necessary protection, security and capacity.
Click to expand...
Click to collapse
Thanks. I hadn't found the other threads.

How to use ext2

How do i use ext2 partition on native ap2sd? i used to have link2sd but i heard native is better so i made an ext2 partition anyone know how to set it? minicm7 2.2.1
EXT2 is not supported with this ROM, must create EXT3 or EXT4.
I was tested EXT2 + link2SD but that didnt work. Tested FAT32 + link2sd = same fail.
If you create EXT3/EXT4 it could be auto-mounted, but some bugs could appear...
I recomended to not use EXT, just that SWAP you created. If you use native "move to card", they will be stored on mmc too, but will be visible in some "xxx-secure" folder (not stored in ext part.) - I spent almost whole day to recover all files after testing SWAP and EXT3 (both auto-mounted via minicm) - dont do the same mistake
penthaler said:
EXT2 is not supported with this ROM, must create EXT3 or EXT4.
I was tested EXT2 + link2SD but that didnt work. Tested FAT32 + link2sd = same fail.
If you create EXT3/EXT4 it could be auto-mounted, but some bugs could appear...
I recomended to not use EXT, just that SWAP you created. If you use native "move to card", they will be stored on mmc too, but will be visible in some "xxx-secure" folder (not stored in ext part.) - I spent almost whole day to recover all files after testing SWAP and EXT3 (both auto-mounted via minicm) - dont do the same mistake
Click to expand...
Click to collapse
srry but i didnt realy understand i have a 3gb normal and 300 swap and 300 ext2 what should i change ext2 to?and dunt worry i have backups
LukBoy99 said:
srry but i didnt realy understand i have a 3gb normal and 300 swap and 300 ext2 what should i change ext2 to?and dunt worry i have backups
Click to expand...
Click to collapse
you should change ext2 to ext3 or ext4, but i think he is saying: get rid of the ext-partition and just keep fat for app2sd/link2sd, and keep swap.
You must format the ext2 to ext3 or EXT4. There is a command for this built into minicm and I think it's something like a2sd format in terminal. Or you can use something like gparted from linux
X10man
Sent from my Fender Stratocaster to your face via XDA Premium
x10man said:
You must format the ext2 to ext3 or EXT4. There is a command for this built into minicm and I think it's something like a2sd format in terminal. Or you can use something like gparted from linux
X10man
Sent from my Fender Stratocaster to your face via XDA Premium
Click to expand...
Click to collapse
made ext3 how do i activate it?
EXT3 is automatically mounted by ROM, so you dont have to enable it.
You can just choose if you want to use NONE / A2SD / DC2SD mode in cyanogenmod settings.

Mounting the second partition of SDCARD as internal memory

Alright so here's the deal, my internal SDCARD is corrupted and the /data partition is unusable.
My device is i9003 and it's running on MIUI at the moment. By default MIUI didn't detect my external SD or my internal SD but after editing "vold.fstab" I was able to mount the first partition of my external SDCARD as external memory and everything was good, I could finally use the camera and pretty much do everything else.
But I was still unable to mount the second partition of my external SDCARD as my internal memory which meant none of my messages could be saved and the phone would pretty much go back to factory settings after a reboot, this apparently is because the /data partition (present on the internal memory) stores all the user data such as the time, the theme I'm using, etc and not having a /data partition meant none of these settings were really saved.
Having no internal memory also means I cannot install any apps such as Link2SD.
Moving on, after many hours of googling I found out that it might not be possible to mount the internal memory using "vold.fstab" and the only way to do it could be by mounting the memory manually during init.
So here's what I want again, I want to use the second partition of my external SDCARD as internal memory, this is likely to solve all my problems and make my phone usable again.
Thanks for all the help, appreciate it.
You need to edit /init.rc (or init.vendor.rc). To make the edits here stay, you'll need to create a new boot.img to flash your device with.
Have a look at an extract of mine init.<vendor>.rc:
Code:
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
#mount yaffs2 [email protected] /system
#mount yaffs2 [email protected] /system ro remount
# Use below two lines instead of above to run /system from SDcard instead of internal flash
mount ext3 /dev/block/mmcblk0p3 /system
mount ext3 /dev/block/mmcblk0p3 /system ro remount
#mount yaffs2 [email protected] /data nosuid nodev
mount ext3 /dev/block/mmcblk0p4 /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
Compare the lines I've commented out with the others. Here both /data and /system resides on the SDcard, you only need to care about /data. Also remember your device nodes may not be named "mmcblk0p3" etc.
But you'll need to make those changes in the initramfs in your flashed boot.img to make them stay.
kuisma said:
You need to edit /init.rc (or init.vendor.rc). To make the edits here stay, you'll need to create a new boot.img to flash your device with.
Have a look at an extract of mine init.<vendor>.rc:
Code:
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
#mount yaffs2 [email protected] /system
#mount yaffs2 [email protected] /system ro remount
# Use below two lines instead of above to run /system from SDcard instead of internal flash
mount ext3 /dev/block/mmcblk0p3 /system
mount ext3 /dev/block/mmcblk0p3 /system ro remount
#mount yaffs2 [email protected] /data nosuid nodev
mount ext3 /dev/block/mmcblk0p4 /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
Compare the lines I've commented out with the others. Here both /data and /system resides on the SDcard, you only need to care about /data. Also remember your device nodes may not be named "mmcblk0p3" etc.
But you'll need to make those changes in the initramfs in your flashed boot.img to make them stay.
Click to expand...
Click to collapse
Thanks for the reply man, mind telling me the how I can go about doing this?, I've got the ROM I flashed via CWM here with me, I could send it over to you if that would make things easier for you.
EDIT: would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img? In case it's the latter, I'm going to need help doing it.
PhantomPhreek said:
Thanks for the reply man, mind telling me the how I can go about doing this?, I've got the ROM I flashed via CWM here with me, I could send it over to you if that would make things easier for you.
Click to expand...
Click to collapse
You'll find a good tutorial about how to work with boot images here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
If you already got the ROM in a file, this should be easy! Got ADB and FASTBOOT as well?
kuisma said:
You'll find a good tutorial about how to work with boot images here: http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack,_Edit,_and_Re-Pack_Boot_Images
If you already got the ROM in a file, this should be easy! Got ADB and FASTBOOT as well?
Click to expand...
Click to collapse
I'm not sure I've got FASTBOOT but I've definitely got ADB and I've also got the ROM. Would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img?.
PhantomPhreek said:
I'm not sure I've got FASTBOOT but I've definitely got ADB and I've also got the ROM. Would pulling init.rc via ADB, making the changes and pushing it back do the trick? or do I have to go for the boot.img?.
Click to expand...
Click to collapse
No. You need to reboot the phone for the init.rc script to execute, and once you reboot the phone, the root file system is overwritten by the flashed image ... Catch 22.
You'll NEED to create a new boot.img with a new initramfs containing your changes.
kuisma said:
No. You need to reboot the phone for the init.rc script to execute, and once you reboot the phone, the root file system is overwritten by the flashed image ... Catch 22.
You'll NEED to create a new boot.img with a new initramfs containing your changes.
Click to expand...
Click to collapse
Shucks, this explains why it didn't work. Alright, so I extract boot.img from the rom, follow the tutorial.What is it that I have to edit again? "/init.rc" or "init.<vendor>.rc"?.
Thanks for the help man, appreciate it.
EDIT: Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?
PhantomPhreek said:
Shucks, this explains why it didn't work. Alright, so I extract boot.img from the rom, follow the tutorial.What is it that I have to edit again? "/init.rc" or "init.<vendor>.rc"?.
Thanks for the help man, appreciate it.
Click to expand...
Click to collapse
Of course, MIUI may have some boot hooks you could use to re-mount /data after boot. I know nothing about that ROM. Also keep in mind that each time you update the ROM, you have to remake this edit.
Also, no idea what MIUI calls its init.rc, you'll just have to see for yourself. If you've got the mount commands in init.rc, fine. Else look elsewhere.
A good first step would to make sure you really are able to flash a new boot.img. Download fastboot and verify your device understands it. Else you have to use some proprietary flash program, and I'm not familiar with Samsungs bootloaders at all. Ask in the Samsung forum if so.
kuisma said:
Of course, MIUI may have some boot hooks you could use to re-mount /data after boot. I know nothing about that ROM. Also keep in mind that each time you update the ROM, you have to remake this edit.
Also, no idea what MIUI calls its init.rc, you'll just have to see for yourself. If you've got the mount commands in init.rc, fine. Else look elsewhere.
A good first step would to make sure you really are able to flash a new boot.img. Download fastboot and verify your device understands it. Else you have to use some proprietary flash program, and I'm not familiar with Samsungs bootloaders at all. Ask in the Samsung forum if so.
Click to expand...
Click to collapse
Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?. ADB and I do see the file init.rc and I also see the mount commands as well. I used adb shell to run the command you sent over with a few edits for second partition and it does mount but as you said, it all goes away after reboot.
PhantomPhreek said:
Looks like the tutorial is meant for Linux, I'm currently on Windows. I might be asking for a lot here but is there any chance I could get you to do it for me?. ADB and I do see the file init.rc and I also see the mount commands as well. I used adb shell to run the command you sent over with a few edits for second partition and it does mount but as you said, it all goes away after reboot.
Click to expand...
Click to collapse
Hmm... are you even able to create a second ext3 partition on the SDcard using Windos..?
kuisma said:
Hmm... are you even able to create a second ext3 partition on the SDcard using Windos..?
Click to expand...
Click to collapse
haha, I used CWM to create the partitions initially, but then I used a software called MiniTool, works well. Can I get you to to do it?
PhantomPhreek said:
Alright so here's the deal, my internal SDCARD is corrupted and the /data partition is unusable.
Click to expand...
Click to collapse
The ROM you are using requires an ext4 partition as partition #3 of the SDcard. This is mounted as /data. Repartition your SDcard #1 as FAT, #2 whatever, and #3 as ext4, and everything will work as intended. :victory:
I guess you've missed this in the ROM documentation ...
kuisma said:
The ROM you are using requires an ext4 partition as partition #3 of the SDcard. This is mounted as /data. Repartition your SDcard #1 as FAT, #2 whatever, and #3 as ext4, and everything will work as intended. :victory:
I guess you've missed this in the ROM documentation ...
Click to expand...
Click to collapse
Wah~ really?, I'll try that and get back here with the results. Thanks a lot!.
EDIT: Is it FAT or FAT32?
PhantomPhreek said:
Wah~ really?, I'll try that and get back here with the results. Thanks a lot!.
EDIT: Is it FAT or FAT32?
Click to expand...
Click to collapse
FAT32.
kuisma said:
FAT32.
Click to expand...
Click to collapse
Tried but didn't work out. I made three partitions, all primary - #1 FAT32, #2 FAT32, #3 EXT4. Plugged the SDCARD in and the external memory was detected as usual, but not the internal memory.
I tried changing the time, it was reset back after reboot.
After that I left the SDCARD as is and flashed the ROM again and now, neither the internal nor the external memory are detected. This is probably because the "vold.fstab" which was edited by me, was overwritten on re flashing.
I'm at a dead end, any ideas?
PhantomPhreek said:
Tried but didn't work out. I made three partitions, all primary - #1 FAT32, #2 FAT32, #3 EXT4. Plugged the SDCARD in and the external memory was detected as usual, but not the internal memory.
I tried changing the time, it was reset back after reboot.
After that I left the SDCARD as is and flashed the ROM again and now, neither the internal nor the external memory are detected. This is probably because the "vold.fstab" which was edited by me, was overwritten on re flashing.
I'm at a dead end, any ideas?
Click to expand...
Click to collapse
Attach an output of "df", "mount", the file "/init.latona.rc" and "/etc/vold.fstab" here, and I'll have a look at it. Hmm... include the output of "dmesg" as well, to be on the safe side.
kuisma said:
Attach an output of "df", "mount", the file "/init.latona.rc" and "/etc/vold.fstab" here, and I'll have a look at it. Hmm... include the output of "dmesg" as well, to be on the safe side.
Click to expand...
Click to collapse
What bugs me is the fact that the external SD is not detected, from what little knowledge I have, external SD is unrelated to the internal SD which I currently have problems with, meaning it should be detected without a problem.
Also I have to add, CWM doesn't detect my external SD right away, when I go to recovery and go over to "Choose zip from sdcard" it says "E:Can't mount /sdcard/". The solution I've found coincidentally is to go to "mounts & storage", mount "/emmc", pull the SDCARD out plug it in again and then "mount /sdcard" this works perfectly and I'm able to flash roms from the sdcard.
One problem at a time, please. Attach the files I requsted, so we can determine why /data failes to mount. Looking at your ROM:
Code:
$ grep " /data$" init.latona.rc
mount ext4 /dev/block/mmcblk0p3 /data
I want to know why this fails, and I guess the answer is in the dmesg output. And please before I'll get another whiskey.
kuisma said:
One problem at a time, please. Attach the files I requsted, so we can determine why /data failes to mount. Looking at your ROM:
Code:
$ grep " /data$" init.latona.rc
mount ext4 /dev/block/mmcblk0p3 /data
I want to know why this fails, and I guess the answer is in the dmesg output. And please before I'll get another whiskey.
Click to expand...
Click to collapse
I can't seem to find "/init.latona.rc" everything else you requested I've mailed them over already
EDIT: the dmesg output is AFTER I mounted "/sdcard" manually as explained in my previous post.
PhantomPhreek said:
I can't seem to find "/init.latona.rc" everything else you requested I've mailed them over already
EDIT: the dmesg output is AFTER I mounted "/sdcard" manually as explained in my previous post.
Click to expand...
Click to collapse
The files you mailed me does not correspond to the ROM you refereed.
The /etc/fstab show that /data is mounted as an rfs file system, not ext4. So either format partition #3 on the sdcard as rfs (Samsung proprietary), or edit /etc/fstab and change "rfs" to "ext4". I'd prefer the later, assuming your kernel supports ext4. Else use ext3.
Code:
/dev/block/mmcblk0p3 /data rfs rw
But you can't have flashed the ROM you told me you did. It excepted an ext4 file system ...

[DEV][MOD][WIP][ABANDONED] Format SDCard as ext2 (instead of FAT32)

Idea abandoned. Reason - "The old vold supports vfat/ext2/ext3 filesystem, but the new vold only supports vfat filesystem. This is because Android frameworks does not support sdcard mounted on other filesystems. Even we can forcely mount an ext2/ext3 filesystem as the sdcard, it doesn't work well in some situations. So we decide to stop supporting them unless AOSP changes."
I was bored so I figured out in half an hour how to reformat the SDCard as ext2/3/4 instead of FAT32. From what I know, ext2 is much faster and more reliable than FAT32 but I still need to do some SDCard benchmarks to compare (e.g. in antuntu).
Current issues:
Vold in Turbo UI does not understand non-VFAT partition and won't mount it on startup (nor after UMS disable). Once you've setup the SDCard as ext2, you need to go to shell and run these commands to get SDCard mounted:
Code:
mount /dev/block/mmcblk0p1 /sdcard
vold
The first command mounts SDCard, the second seems to refresh vold and actually make the OS recognize that it's inserted. If you use an init.d script to mount sdcard like that first command, there is no need for vold (until you use UMS). This would not matter for ROM's in MTP mode.
Setting up SDCard as ext2:
Note that I chose ext2 as it is the most compatible/stable in Windows. More below.
(1) Backup the SDCard, obviously.
(2) Boot to recovery, unmount sdcard, go in to ADB shell
(3) Format first SDCard partition as Windows-compatible ext2 like so:
Code:
mke2fs -m 0 -I 128 -T ext2 /dev/block/mmcblk0p1
(4) (Windows users) Install "Ext2 IFS" from http://www.fs-driver.org (Yes, works on x64 Windows too).
- install with all defaults
- Check "assign drive letter automatically" when prompted with the Drive Letters screen
(5) Profit.
What's next?
While researching this, I found that CM9/CM10 Vold code was patched already to support ext4 filesystems. However this is ext2 so I am not sure it works. I would move to ext4, but there is no write-access driver or software for Windows that works reliably with ext4. Ext2 IFS however is widely regarded as very reliable these days.
I'll check it out more when I get some time and my Linux machine is finished (to compile a vold that supports ext2-4 and not just 4). But I'm making his thread now so other hackers can try it out, benchmark, or share ideas.
Cheers.
Grrr.... CM7 had ext fs support in vold and it was merged, but CyanogenMod rejected it in CM9 and CM10. Wtf?
Looks like I will have to edit vold sources and rebuild myself. But since I only do Jellybean work I don't know how to handle this....
...the only other alternative is that ext# SDCard has MTP as a requirement. Then I could have the SDCard mounted manually in kernel and vold would not complain. The SDCard is not unmounted in MTP transfer, so it would be usable - with the one exception of requiring a reboot if the user manually unmounts or removes the SDCard.
R: [DEV][MOD][WIP] Format SDCard as ext2 (instead of FAT32)
so it is possible to have the sdcard partition in ext? I have tried one year ago and if I remember correctly cm7 doesn't support it (or maybe it was a stock based rom, too much time passed ), but for people like me that use Windows veeeery rarely would be great, ext2 or ext3 are better than fat32 (ext4 for what I've seen is less reliable in this case)
Inviato dal mio Nexus 7 con Tapatalk 2
[email protected] said:
so it is possible to have the sdcard partition in ext? I have tried one year ago and if I remember correctly cm7 doesn't support it (or maybe it was a stock based rom, too much time passed ), but for people like me that use Windows veeeery rarely would be great, ext2 or ext3 are better than fat32 (ext4 for what I've seen is less reliable in this case)
Inviato dal mio Nexus 7 con Tapatalk 2
Click to expand...
Click to collapse
Yes, very possible. The instructions here all work well if the ROM has MTP mode. Because Vold cannot remount ext after UMS is enabled. So for Linux users with poor MTP support, that's still painful.....
My main concern right now is that ext2 seems to be more vulnerable to filesystem errors. Unlike FAT32, there is no quick/easy way to check if the filesystem needs repair. Not that I know of anyway.
So, I think I am going to abandon this. It might be why CyanogenMod rejected it.

Few points to make the mount script better for your device!

1. Partition the SD with CWM (easiest method) and you can be sure that the second partition disk type is of ext4 (latest CWM).
2. Rename other scripts in init.d, so that it gets executed only after the mount script has run (prioritize mount script).
3. Ext4 has many advantages over its earlier versions. So update the mount script's disk mount type to be ext4 (mount -t ext4).
4. If you are using low performance SD please update the script to mount the disk without mount options such as noatime.
5. Never add ext4 tweak if you are using mount scripts, it causes data corruption.
6. If you don't want the script to move certain folders in data partition then add the folder name to the moving data to SD ext.
Using a mount script is very easy, these points make it better.
BTW, I suggest you to try INT2EXT for EXT4 (with the above updations) the next time you reset your device.
Sent from my GT-I5500 using xda premium
Ok finally i observed that u disabled noatime, norealtime and zipalign code from the original int2ext4+ script..but i still dont understand what does that code do
Code:
-o nosuid,nodev,noatime,nodiratime,barrier=0,nobh,data=writeback,noauto_da_alloc
BTW thanks nanba for all the help dude..
swat4samp said:
Ok finally i observed that u disabled noatime, norealtime and zipalign code from the original int2ext4+ script..but i still dont understand what does that code do
Code:
-o nosuid,nodev,noatime,nodiratime,barrier=0,nobh,data=writeback,noauto_da_alloc
BTW thanks nanba for all the help dude..
Click to expand...
Click to collapse
Those are the options available while mounting a disk. You can Google for each one, read the Linux pages.
Sent from my GT-I5500 using xda premium
SuganAnbalagan said:
Those are the options available while mounting a disk. You can Google for each one, read the Linux pages.
Sent from my GT-I5500 using xda premium
Click to expand...
Click to collapse
I prefer reverse mount than symlinks and for speed I leave dalvik cache on data partition. You can try that too.
Sent from my GT-I5500 using xda premium
That's a lot of linux related technical stuff..well its too hard to understand..anyways "Ignorance is Bliss"

Categories

Resources