Re: ext4 - 52.2% non-contiguous
Daryl Styrk wrote:
I'm trying to understand what is causing fsck to report /dev/sda4 being
highly fragmented. The filesystem is only a couple days old. I created
the it with mke2fs -t ext4.
After initially building the filesystem I ran fsck which showed something
like 0.7% if I remember correctly. I then copied about 60GB from an ext3
via rsync after which the fragmentation showed up.
I'm running Sid, 2.6.30-1-amd64 and have e2fsprogs 1.41.7-1. <snip>
Just an uneducated guess. rsync created the entire structure with
empty files. Then populated the files.
I had to copy files once from one box to another. It creates a
list, then moves the files individually. This is the only way to
maintain permissions from one box to another.
Here is the script that I used:
#! /bin/bash
#
# To copy files to another computer retaining owner / group.
#
# --------- CONFIGURE SECTION ----------
#
# Your User name on the Server. Normally should be
# the same as your Computer User Name.
REMOTEUSERNAME="root"
#
# Remote IP Address.
REMOTEIP="192.168.15.209"
#
# 0 - Test
BACKUPLIST="/home/m* /usr/local/bin"
#
# 1 - home
# BACKUPLIST="/home"
#
# 2 - Samba
# BACKUPLIST="/srv/samba"
#
# 3 - MySQL
# BACKUPLIST="/var/lib/mysql/m* /var/lib/mysql/n* /var/lib/mysql/t*
/var/lib/mysql/w*"
#
# 4 - WWW
# BACKUPLIST="/srv/www"
#
# 5 - /usr/local
# BACKUPLIST="/usr/local/bin /var/local"
#
# Noye, run as root
# --------- NO EDITING BELOW THIS LINE ----------
#
for LIST in $BACKUPLIST
do
echo " "
echo "Starting $LIST"
tar -zcpf - $LIST | ssh $REMOTEUSERNAME@$REMOTEIP "cd /;sudo tar -zxpf -"
echo "finished"
done
Reply to: