Hi, I am setting up a raid array using the Software-RAID-HOWTO. In the section "Root Filesystem on RAID" he explains how to copy a working filesystem to a new raid array. The commands are: cd / find . -xdev | cpio -pm /mnt/newroot What is going on in that command? Does anyone else have a favorite command to do this function, which may be easier to remember? Why didn't he use dd? Thanks for any insight. -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
Hi ! Try using the dd comand the sintax is dd if=[input partition] of=[output partition] with the DD you could copy an entire partition, and use the mkswap and swapon to recreate and enable the swap partitions
Hi, I am setting up a raid array using the Software-RAID-HOWTO.
In the section "Root Filesystem on RAID" he explains how to copy a working filesystem to a new raid array. The commands are:
cd / find . -xdev | cpio -pm /mnt/newroot
What is going on in that command?
Does anyone else have a favorite command to do this function, which may be easier to remember? Why didn't he use dd?
Thanks for any insight.
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
find . -xdev Prints a list of file names in the current directory (.) without descending other file systems (usr, var, home, etc). You need to cd to / so that the find output will be relative, i.e. not start with a /. For instance, if you want to copy the usr filesystem, you would use find usr -xdev (*without* the /) The pipe | connects this to: cpio -pm /mnt/newroot Reads a list of file names to copy to another path (p) withhout changing modification (m) times of the files. dd will only work for filesystems if they are identical - could be dangerous to use in your case. Piet le Roux zentara wrote:
Hi, I am setting up a raid array using the Software-RAID-HOWTO.
In the section "Root Filesystem on RAID" he explains how to copy a working filesystem to a new raid array. The commands are:
cd / find . -xdev | cpio -pm /mnt/newroot
What is going on in that command?
Does anyone else have a favorite command to do this function, which may be easier to remember? Why didn't he use dd?
Thanks for any insight.
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
Piet le Roux wrote:
find . -xdev Prints a list of file names in the current directory (.) without descending other file systems (usr, var, home, etc). You need to cd to / so that the find output will be relative, i.e. not start with a /. For instance, if you want to copy the usr filesystem, you would use find usr -xdev (*without* the /)
The pipe | connects this to:
cpio -pm /mnt/newroot Reads a list of file names to copy to another path (p) withhout changing modification (m) times of the files.
dd will only work for filesystems if they are identical - could be dangerous to use in your case.
Yes, I found that out. I tried dd to transfer after booting from a floppy. I seemed to work except my drives were different sizes, 1 gig ang 20 gig. After booting the 20 gig raid array as root, it reported being 60% full!!!! Now I know why the find | cpio method is better!!!!!!! Thanks. -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
zentara wrote:
Hi, I am setting up a raid array using the Software-RAID-HOWTO.
In the section "Root Filesystem on RAID" he explains how to copy a working filesystem to a new raid array. The commands are:
cd / find . -xdev | cpio -pm /mnt/newroot
What is going on in that command?
Does anyone else have a favorite command to do this function, which may be easier to remember? Why didn't he use dd?
Thanks for any insight.
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
It is never wise to copy a filesystem while it is still in business and never do that with "dd" under those circumstances. If you use the normal (ext2) filesystem, you better do it with the dump and restore programs, which are used for backup purposes. Mount the new empty filesystem lets say on /mnt cd /mnt dump 0f - /dev/<your source disk> | restore rf - And if you want to be very safe, do in in single use mode. Minze Broersma -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
participants (4)
-
linux@ods.co.cr
-
mc.broersma@home.nl
-
pgp@sactria.co.za
-
zentara@gypsyfarm.com