Stop services running. Eg. smb/apache Run:
Code: Select all
unmount /dev/md0
You need to use the tune2fs and fsck tools in the filesystem, and that filesystem needs to be unmounted. Run:
Code: Select all
tune2fs -O extents,uninit_bg,dir_index /dev/md0
After running this command you MUST run fsck. If you don't do it, Ext4 WILL NOT MOUNT your filesystem. This fsck run is needed to return the filesystem to a consistent state. It WILL tell you that it finds checksum errors in the group descriptors - it's expected, and it's exactly what it needs to be rebuilt to be able to mount it as Ext4, so don't get surprised by them. Since each time it finds one of those errors it asks you what to do, always say YES. If you don't want to be asked, add the "-p" parameter to the fsck command, it means "automatic repair":
Code: Select all
fsck -pDf /dev/md0
There's another thing that must be mentioned. All your existing files will continue using the old indirect mapping to map all the blocks of data. The online defrag tool will be able to migrate each one of those files to a extent format (using a ioctl that tells the filesystem to rewrite the file with the extent format; you can use it safely while you're using the filesystem normally)
Code: Select all
mount -t ext4 /dev/md0 /share/MD0_DATA