Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-24-2005, 04:47 PM   #1
Registered: Feb 2005
Posts: 32

Rep: Reputation: 15
transferring files to other disk..

hi all,

i have a linux system here (arch linux) which I'm happy with. it has one harddisk of 120gb. I recently added two new 120gb drives thinking I would like to set up a mirror RAID on these two identical disks, make new partitions (/var, /tmp, /home, /boot, / and swap) and move all my files currently on the original disk to the new RAID, and then make the RAID bootable and remove the original disk.

the original disk is not the same model as the newer disks, which is why I would like to remove it and use it for some other purpose.

can anyone tell me what partitions to make and how big they should be? should the swap partition also be in the mirror raid? it seems weird to me to mirror the swap partition ...

after making the partitions I would like to move all the files over to the new RAID. how can I do this safely without forgetting anything in the process?
and how do I make my RAID bootable and succesfully reboot?

the machine is going to be a small business mail(imap) / web / groupware server (mysql, php etc), up to 10 users

Old 03-24-2005, 06:22 PM   #2
Registered: Dec 2004
Distribution: gentoo
Posts: 190

Rep: Reputation: 30
I would partition like so:
2GB Swap
256MB Boot
30GB Root
The rest Home (I'm assuming your users get home directories and accounts on the server)

It doesn't really matter if the swap is on the RAID or not.. RAID doesn't just keep working when a whole drive breaks, it fixes errors when one disk gets bad sectors, etc. Because of this, it might make your system ever so slightly more reliable to have the swap on the RAID array.

I would boot off a bootable linux cd (gentoo livecd, knoppix, etc) to move the files. cp -pR will preserve file ownership information and copy recursively in a smart way. I like to copy one partition (mount point / filesystem, really) at a time, so cp -Rpx is good for me. Just read the manpage for cp and it will tell you everything you need to know.

Once you have your files all coppied over the way you want them onto the destination drive, chroot to it ("man chroot" for more info).
From there you can update your bootloader config file (/etc/lilo.conf or /boot/grub/grub.conf, etc) and install it (grub, lilo).
The man pages should tell you all you need to know for reinstalling the bootloader (man lilo, man lilo.conf, man grub, etc)

Good Luck!

Last edited by visaris; 03-24-2005 at 06:24 PM.
Old 03-24-2005, 06:46 PM   #3
Registered: Oct 2004
Distribution: Debian Sarge
Posts: 177

Rep: Reputation: 30
not to step on anyone's toes, but I just recently did something similar and cp -ax works a lot better, less complications with certain directories.

edited because I had psaux on the brain :P

Last edited by audibel; 03-24-2005 at 08:50 PM.
Old 03-24-2005, 07:04 PM   #4
Registered: Dec 2004
Distribution: gentoo
Posts: 190

Rep: Reputation: 30
Yeah, -a is short for -dpPR. I think that may be better, though, I have had problems with -d in the past.

Perhaps just cp -pPRx would be the best.

       -P     Do  not  follow any symbolic links, neither those that occur in
              the parameter list nor those encountered during  the  recursive
              copy.  Just copy them as symbolic link.

       -R     Copy  directories  recursively,  and  do  the  right thing when
              objects other than ordinary files or  directories  are  encoun-
              tered.   (Thus, the copy of a FIFO or special file is a FIFO or
              special file.)

       -p     Preserve the original files' owner, group, permissions (includ-
              ing the setuid and setgid bits), time of last modification  and
              time  of  last  access.   In case duplication of owner or group
              fails, the setuid and setgid  bits  are  cleared.   (Note  that
              afterwards  source  and  copy  may well have different times of
              last access, since the copy  operation  is  an  access  to  the
              source file.)

              Skip  subdirectories that are on different filesystems from the
              one that the copy started on.

       -d     Copy  symbolic  links as symbolic links rather than copying the
              files that they point  to,  and  preserve  hard  links  between
              source files in the copies.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transferring 40000+ files with FTP (mget) shows 0 files tim1235 Linux - Software 5 10-17-2004 06:06 PM
Error transferring install image. You are probably Out of Disk Space gonzalo76 Fedora - Installation 4 09-04-2004 01:35 PM
Transferring installation to a new hard disk? mconsidine Linux - General 6 05-16-2004 09:14 AM
IO Error when transferring files. mickey_kamer Linux - General 4 03-19-2004 09:29 AM
Transferring Files From VMware? Crickit Linux - Software 5 04-17-2003 02:56 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:43 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration