Author Topic: [SOLVED] Convet from ext3 to ext4 question  (Read 629 times)

Offline stealth

  • Hero Member
  • *****
  • Posts: 642
[SOLVED] Convet from ext3 to ext4 question
« on: January 20, 2013, 07:56:43 PM »
Okay so I see the e4rat listed as new in the repo. I read about it decide it could be useful. I run df -T to see what filesystem I am running. My entire root install is on a 50GB partition on a 250GB drive the only part not there is /home and it is on a 1TB drive all by itself. So I look up how to switch to ext4 if it can be done without reformatting. It appears it can be done.

df -T
/dev/sda6     ext4     40G   11G   28G  28% /
tmpfs        tmpfs    4.0G     0  4.0G   0% /dev/shm
/dev/sda1     ext2    996M   47M  899M   5% /boot
/dev/sdb1     ext3    917G  350G  521G  41% /home

Can anyone in development tell me why /dev/sda1 aka /boot is ext2 and /dev/sda6 aka / is ext4?

Edit: I will answer my own question here also. I did that several years ago. It is rough getting old! You forget things.

These two sites have some instruction about switching but they both appear to be giving instruction for the entire system including /boot.

https://ext4.wiki.kernel.org/index.php/Ext4_Howto

http://www.cyberciti.biz/tips/linux-convert-ext3-to-ext4-file-system.html

I want to convert /dev/sdb1 aka /home from ext3 to ext4. Other than backing up my data what else do I need to know?

I am guessing that a fresh install would give me ext4 everywhere except /boot. Is this correct?
« Last Edit: January 21, 2013, 08:10:49 AM by stealth »

Offline stealth

  • Hero Member
  • *****
  • Posts: 642
[SOLVED] Convet from ext3 to ext4 question
« Reply #1 on: January 20, 2013, 10:18:15 PM »
I have the answer to my own question. It is clearly time to do a fresh install. I checked a fresh install and the entire system is using ext4.

Offline gseaman

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 3791
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #2 on: January 20, 2013, 10:32:35 PM »
e4rat is a great tool.  I'm sure you'll like the results.

Galen

Offline craesz

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 978
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #3 on: January 21, 2013, 09:32:00 AM »
Desktop1: AMD64 8450 [3 core]; 8GB; 3.2.18-pclos2.pae.bfs; KDE
Desktop2: AMD64 5400 [8 core]; 16GB; 3.2.16-a64; KDE
Netbook: EeePC 901; Atom N270; 1GB; 2.6.33.7-pclos6.bfs; KDE


Offline stealth

  • Hero Member
  • *****
  • Posts: 642
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #4 on: March 06, 2013, 03:01:09 PM »
e4rat is a great tool.  I'm sure you'll like the results.

Galen


Very pleased with the results from e4rat!

Offline JohnW_57

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 2115
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #5 on: March 06, 2013, 03:09:47 PM »
Only a big warning if you have a SSD drive: http://www.howtogeek.com/69753/how-to-cut-your-linux-pcs-boot-time-in-half-with-e4rat/

Quote
E4rat and Your Linux PC

E4rat is a utility that’s designed to cut your Linux boot time drastically. Essentially you show it what you do when you start your computer normally, and it analyzes the files you access and use. Then, it’ll move them to the beginning of your hard disk so that it takes less time to find them during boot.

E4rat is designed to work with Ext4 partitions only. If you’re using another file system, this isn’t for you. There are reports of it working with LVM but your mileage may vary, so be careful if you have sensitive data.

Furthermore, if you have an SSD, you should stay away from this. Because E4rat moves files for a better seek time, SSD uses won’t see any benefit as their “seek” time is unaffected by this. By moving files and performing extended writes, you may even end up damaging your already-blazing-fast drive.


JohnW



PCLinuxOS 2013 KDE4 (64 bit) on: home build system:  Intel Core 2 Quad (q6700) (2.66ghz), Asus P5K motherboard, 4 gig ddr2 memory, Asus Nvidia Geforce GTS 250 1024 mb gddr3, Crucial M4 128 SSD,  2x Samsung 500 gig HDD (sata), TSSTcorp CDDVDW SH-224BB.

Offline stealth

  • Hero Member
  • *****
  • Posts: 642
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #6 on: March 06, 2013, 03:16:38 PM »
Not using it with SSD is good to know. It is working very nicely for me sense I am using all SATA drives. I have my entire install on ext4.

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10633
  • MLUs Forever!
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #7 on: April 10, 2013, 02:20:12 PM »

I tried to use this tool today and failed unfortunately.

I add the required boot parameter to the kernel line (init=/sbin/e4rat-collect), went for a reboot ........  but afterwards there ws no sign of a startup.log file  in  /var/lib/e4rat/

Anyone got a pointer for me? .......  oh yes I also tried adding 'rw' to the boot parameters but that did not work either.

My HDD does a lot of trashing about during boot up, so I expect this would help a lot .....  if I can get it working.

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline stealth

  • Hero Member
  • *****
  • Posts: 642
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #8 on: April 10, 2013, 02:37:00 PM »
After reading this post maybe I don't e4rat working. I didn't do any manual configuration after installing it. But it certainly appears that the boot process goes much faster than it did before installing e4rat.

Does e4rat require manual configuration after install or not? Enquiring minds want to know.  ;D

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10633
  • MLUs Forever!
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #9 on: April 10, 2013, 02:54:43 PM »
After reading this post maybe I don't e4rat working. I didn't do any manual configuration after installing it. But it certainly appears that the boot process goes much faster than it did before installing e4rat.

Does e4rat require manual configuration after install or not? Enquiring minds want to know.  ;D

Yes ........  it must be run at one boot to monitor what is being loaded in the first 2 minutes; it saves that info to a file called startup.log; then you must run another erat command from an init 1 terminal to allow e4rat to move the files it logged on the HDD so that they are all contiguous.

Doing a fresh install will have a somewhat similar effect I suspect .....  at least there won't be any scattering of files about the disk.
Updates of course can cause files to be placed other than in their original position thus causing thrashing of the HDD as it seeks the files it needs during boot.

That at least is my understanding of what occurs ......

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline stealth

  • Hero Member
  • *****
  • Posts: 642
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #10 on: April 10, 2013, 03:11:32 PM »
After reading this post maybe I don't e4rat working. I didn't do any manual configuration after installing it. But it certainly appears that the boot process goes much faster than it did before installing e4rat.

Does e4rat require manual configuration after install or not? Enquiring minds want to know.  ;D

Yes ........  it must be run at one boot to monitor what is being loaded in the first 2 minutes; it saves that info to a file called startup.log; then you must run another erat command from an init 1 terminal to allow e4rat to move the files it logged on the HDD so that they are all contiguous.

Doing a fresh install will have a somewhat similar effect I suspect .....  at least there won't be any scattering of files about the disk.
Updates of course can cause files to be placed other than in their original position thus causing thrashing of the HDD as it seeks the files it needs during boot.

That at least is my understanding of what occurs ......



Okay, Recently in the last 2 months or so I did a full fresh install and installed e4rat then as well. I haven't done the other steps. So what you are saying is that maybe it is working.

I am Googling e4rat. I found some information there appears to be some man pages but when I try to access them they don't seem to be there.

Documentation
To get help read the README file in the source tree. Furthermore manual pages for e4rat-collect(8), e4rat-realloc(8), e4rat-preload(8) and e4rat-conf(5) are provided.

I also haven't been able to figure what to type at the prompt to access e4rat so I can do those steps mentioned above.

Quote
it must be run at one boot to monitor what is being loaded in the first 2 minutes; it saves that info to a file called startup.log; then you must run another erat command from an init 1 terminal to allow e4rat to move the files it logged on the HDD

Can you expand on what you mean here?

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10633
  • MLUs Forever!
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #11 on: April 10, 2013, 03:19:48 PM »
e4rat-collect is run during the boot up, by appending a kernel parameter, and as its name implies it collects info about the boot process .....  and stores that info in a file ... startup.log.

e4rat-realloc uses the info in that file to re-allocate the files to one part of the disk/partition, so that they will be all available near each other when required by the boot process, thus reducing head seek/settle times and therefore the boot time.

***

I discovered that the system service auditd was apparently interfering with the actions of e4rat ....

Code: [Select]
$ dmesg | grep -i e4rat
Kernel command line: BOOT_IMAGE=3.2.18-pclos2.pae.bfs root=UUID=ac9ffa65-d97b-4a70-b3e9-b292ee5b4eb7 nokmsboot acpi=on resume=UUID=563dab5f-9c73-41d1-a84f-c8af8947318a vmalloc=512M vga=791 init=/sbin/e4rat-collect
[e4rat-collect] Cannot insert rules: Invalid argument
[e4rat-collect] Process auditd [1742] has captured the audit socket.
[e4rat-collect] e4rat-collect is in conflict with auditd. Abort

So I stopped the auditd process and unticked it so it would not start at boot, thinking that all should be well ........  but unfortunately not so .....

Code: [Select]
$ dmesg | grep -i e4rat
Kernel command line: BOOT_IMAGE=3.2.18-pclos2.pae.bfs root=UUID=ac9ffa65-d97b-4a70-b3e9-b292ee5b4eb7 nokmsboot acpi=on resume=UUID=563dab5f-9c73-41d1-a84f-c8af8947318a vmalloc=512M vga=791 init=/sbin/e4rat-collect
[e4rat-collect] Cannot insert rules: Invalid argument

It appears that the syntax of the e4rat parameter is incorrect, so more testing ...... 

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline stealth

  • Hero Member
  • *****
  • Posts: 642
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #12 on: April 10, 2013, 03:25:56 PM »
Yes I did notice that message about the system service auditd. I also found what looks like the best URL for straight up explaining the entire e4rat process.

http://lifehacker.com/5790311/e4rat-cuts-your-linux-pcs-boot-time-in-half-with-a-few-simple-commands

If you figure out how to fix the problem with the system service auditd please post it here. I will see if I can find out how to fix it as well and post it if I figure it out first.

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10633
  • MLUs Forever!
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #13 on: April 10, 2013, 03:30:37 PM »
I have tried a few forms of the e4rat-collect command on the kernel line, but have had no success  :(

MLUs rule the roost!

Linux XPS 3.2.18-pclos2.pae.bfs  32 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline stealth

  • Hero Member
  • *****
  • Posts: 642
Re: [SOLVED] Convet from ext3 to ext4 question
« Reply #14 on: April 10, 2013, 03:50:03 PM »
All the documentation I have read shows init=/sbin/e4rat-collect at the end of the kernel line. There doesn't seem to be a problem on the other systems with the system service auditd. Maybe this problem is unique to PCLOS.

Simply running e4rat-collect at the cli gave me the same error message as you got. So there seems to be a conflict with the system service auditd. It apparently is getting in the way of e4rat-collect.