Donnerstag, 14. Juni 2012

Dreambox: Migrate existing Ext3 filesystems to Ext4

After reading several articles about migrating existing Ext3 filesystems to Ext4, I decided to try it with my one drive.

Before You start:

  • make sure You have the latest OE2.0 DMM experimental image!
  • it can take several hours to complete the migration!

Open a telnet connection:

# Stop Enigma2
init 4

# Display mounted disks
/dev/disk/by-uuid/aaaabbbbcccc on /media/hdd type ext3 ( rw,relatime,errors=continue,barrier=1,data=writeback)

# Unmount the disk
umount /media/hdd
# List available devices
fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 1 121601 976760032 83 Linux

# Convert the filesystem # The first step will run fairly fast
tune2fs -O extents,uninit_bg,dir_index /dev/sda1
tune2fs 1.42.1 (17-Feb-2012)

# Repair it
# The second step will take a while, in my case for 1TB about 1 hour
fsck.ext4 -yfD /dev/sda1
e2fsck 1.42.1 (17-Feb-2012)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda1: 1545/953984 files (28.3% non-contiguous), 216730948/244190008 blocks