Check man mke2fs. Pay close attention to the -J / location section and the -E / packed_meta_blocks section.
You said you were using a USB stick. I'm assuming it can be formatted without consequence. Did you backup your data?
- Format the disk with a default command and get data on how the USB stick is put together.
- Format the disk with a altered command and get data on how the USB stick looks with the location moved.
- Moving the journal on an in-use disk.
You did backup you data?
Part 1. Default journal for reference
- Insert USB stick.
- In a terminal window, use
sudo or su and supply the password.
- Use
blkid " to find your " /dev/sdXX label.
- Command
mke2fs -t ext4 /dev/sdXX for a default format.
- Now to pull out data about the drive.
- Command
tune2fs -l /dev/sdXX. Find the line "Journal inode". Write this number down. It is usually 8.
Command debugfs /dev/sdXX
Command stat <8>. The "8" comes from the "Journal inode" line. The command needs to be entered exactly with the <,>.
What do you see? The third line lists the size of the journal. Write this down. My machine came in at 33554432 (~32Mb).
The 13th line lists the extents used for the journal. Write this down. My machine came in at 196608 - 204799. 196608 time 4k per page equals 786M.
- Command
q then quit.
- Remove USB stick
Part 2. Moving the journal
- Same as above.
- Same as above.
- Same as above.
- command
mke2fs -J location=600M /dev/sdXX. This should move the default journal to a point starting at the 600M mark.
- As above.
- As above.
- As above.
- The journal size should be the same. The first journal extent has moved to 153600 on my machine. 153600 times 4k per page equals ~614M.
- As above.
- As above.
Part 3. Moving the journal on an in-use disk
- Backup your data?
- Unmount the partition.
umount /dev/sdXX.
- Remove old journal.
tune2fs -O ^has_journal /dev/sdXX.
- Install new journal.
tune2fs -J location=XX[M,G] /dev/sdXX. Specify units. The journal can be moved to a mega, giga location.
e2fsck -fv /dev/sdXX just to be safe.
- Reboot the machine. You did backup didn't you?
You can change the journal size and location with mke2fs -J size=XX,location=YY[M,G,P,T] /dev/sdXX. The size notation is always in MB.
Where did this come from? "Trial and Error" course from the School of Hard Knocks.