Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to migrate from a single disk drive system to a double disk drive software raid-1 system that already has a running system on it. Meaning that formatting and having a new installation of ubuntu using raid-1 is NOT an option.

In this process I have to copy the contents from main disk (/dev/sda1) to mounted raid array (/dev/md0).

First Attempt to Copy:

sudo cp -dpRx / /mnt/md1

Second Attempt to Copy:

sudo rsync -avxHAXS --delete --progress / /mnt/md1

Both of them end with warnings. Not sure if they end successfully.

Which command should I use (from the two above or something else like dd) and with which parameters in order to have the md1 raid-array prepared for next reboot?

This is the warning message I got from "cp" command on my first attempt:

cp: cannot stat `/home/george/.gvfs': Permission denied

This is the error message I got from "rsync" command on my second attempt:

rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9]
share|improve this question

Use the rsync command. It preserves everything that you would care about and you have specified everything that matters.

Then after you are finished, boot from a live media (Ubuntu has live disks too) and do the rsync again. It will not take long, since rsync is smart enough to skip files that are already copied. This will make sure that you are not missing anything, like files in partitions that have stuff mounted over them (/dev comes to mind) or already mounted encrypted home directories. It is a good idea to do it after you reboot since you may have some leftovers from applications that were running at the time of the sync when the system was up that normally get cleaned up after shut down.

share|improve this answer

This is due to a long standing bug in the kernel fuse driver. gvfs is a virtual filesystem used to map things like network shares you browse to in nautilus. It is only accessible to the user, not to root. The bug is that root can't even stat() the directory to see that it is a different filesystem, and thus skip it in accordance with the -x flag.

You can ignore these errors.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.