LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-24-2005, 05:47 PM   #1
bschiett
Member
 
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

thanks!
bert
 
Old 03-24-2005, 07:22 PM   #2
visaris
Member
 
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 07:24 PM.
 
Old 03-24-2005, 07:46 PM   #3
audibel
Member
 
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 09:50 PM.
 
Old 03-24-2005, 08:04 PM   #4
visaris
Member
 
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.

Code:
       -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.)

       -x
              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.
 
  


Reply


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 07:06 PM
Error transferring install image. You are probably Out of Disk Space gonzalo76 Fedora - Installation 4 09-04-2004 02:35 PM
Transferring installation to a new hard disk? mconsidine Linux - General 6 05-16-2004 10:14 AM
IO Error when transferring files. mickey_kamer Linux - General 4 03-19-2004 10:29 AM
Transferring Files From VMware? Crickit Linux - Software 5 04-17-2003 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:09 AM.

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