move /usr fs to other disk

Because my /usr filesystem was full, I added a new disk to my machine. Then I added this new disk to FreeBSD with a new filesystem on it. I added this file system with mounting point /claude in /etc/fstab. After reboot I could see /claude with df command. Then I copied the content of /usr to /claude with the command

cp -R /usr /claude

After cp finished, I edited /etc/fstab to remove the line with /usr and change mounting point /claude from the new disk to /usr. And at last, a rebooted FreeBSD. Then I got the following messages:

init: can't exec gett '/usr/libexec/getty' for port /dev/ttyv4: now such file or directory.

init: can't exec gett '/usr/libexec/getty' for port /dev/ttyv5: now such file or directory.

etc.

What did I do wrong?
Because I have installed FreeBSD on VMware Server I can rollback the situation before I removed /usr form /etc/fstab.
What are the next steps from this point, to use /usr from my new disk?

Please Help.

Regards

Claude
 
Because of compatability I still use FreeBSD 7.0. cpdup is not available at my system. Do you have a alternative?
 
Sorry I gave the wrong information.
I used cp -Rp /usr /claude

instead of cp -R /usr /claude
I thought this was the right way because I read it on one of the posts on this forum.
 
I executed the commands
cd /claude
dump 0af - /usr | restore rf -

After a while I got the message filesystem is full.

I will do a rollback again and remove all the data from /claude before I do de dump again.

Can I use only dump oaf on /claude instead of "dump 0af - /usr | restore rf -" ?
A guess "- /usr | restore rf -" stands for a comment?
 
oh borther.....

you can't you have to use
Code:
cd /claude
dump 0af - /usr | restore rf -
2nd line is 2 commands
1st will dump fs to pipe, 2nd will restore fs from pipe to current directory
 
1st command will take you to new partition (mount point).

dump 0af - /usr will dump (copy) /usr and all files on fly.
| restore rf - will restore input of dump command to current directory /claude using UNIX pipe concept. A pipe feeds input of one or more command to a second command.

Please read man pages and link provided for the details.
 
Never used the dump commando. I would do the copy with Midnight Commander, preserving attributes and symlinks.
Then change /etc/fstab to mount the new /usr.
Depending on your system configuration, a drop to single user mode might be needed to change it.
 
I rollbacked to previous state, deleted all content from /claude (with rm -R *). Then reexecuted:
cd /claude
dump 0af - /usr | restore rf -

After the dump completed, edited /etc/fstab.
Delete the line with /usr in /etc/fstab.
Updated the line with /claude, changed /claude for /usr.
Then rebooted. Finally the system started with a new /usr filesystem.

Thanks for your help.
Regards
Claude
 
Back
Top