Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

[gentoo-user] Migrating hard drives

 
Goto page 1, 2, 3
   Linux (Home) -> User RSS
Next:  [gentoo-user] Raid reports wrong size  
Author Message
Grant

External


Since: Aug 19, 2005
Posts: 373



(Msg. 1) Posted: Fri Dec 19, 2008 5:10 pm
Post subject: [gentoo-user] Migrating hard drives
Archived from groups: linux>gentoo>user (more info?)

I'm about to switch from one SATA hard drive to another and I'm
planning on going through the normal installation process except for
copying over the data on each partition of my old drive to the
corresponding partition on my new drive. Is there anything to watch
out for? Pitfalls to avoid, etc?

- Grant
Back to top
Login to vote
Paul Hartman

External


Since: Oct 14, 2008
Posts: 20



(Msg. 2) Posted: Fri Dec 19, 2008 5:20 pm
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, Dec 19, 2008 at 10:01 AM, Grant <emailgrant RemoveThis @gmail.com> wrote:
> I'm about to switch from one SATA hard drive to another and I'm
> planning on going through the normal installation process except for
> copying over the data on each partition of my old drive to the
> corresponding partition on my new drive. Is there anything to watch
> out for? Pitfalls to avoid, etc?

I don't think so... it depends on what drive it is and how it is
partitioned... if there's just one partition then it should be as
simple as formatting the new copy and "cp -a /olddrive /newdrive"

If it's your boot drive and has boot/root/home/and so on partitions
then you'll need to pay attention to the partition numbers as they
very well may be different when you partition the new disk. Be sure to
edit the grub config & fstab to make sure it's all pointing to the
right place.

An alternative in that case would be to use dd to clone the old drive
onto the new one, then use something like parted (gparted/qtparted for
GUI) to resize the partitions to fit the new disk, assuming the
filesystems in use allow for such a thing. The disadvantage to this is
you are closing fragmentation and everything else, and if the new
drive is a lot bigger than the old, you may not have enough inodes in
your fileystem.

Whenever I do that, I boot from a live CD and copy the drives as
above, then plug the new drive into its official cable, boot from live
CD again and make sure the partition numbers are right, install grub
(if boot drive), reboot and everything is done. If anything went
horribly wrong, you've always got the original drive that you can go
back to and try again.

Good luck Smile
Paul
Back to top
Login to vote
Albert Hopkins

External


Since: Sep 17, 2007
Posts: 26



(Msg. 3) Posted: Fri Dec 19, 2008 5:30 pm
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 2008-12-19 at 08:01 -0800, Grant wrote:
> I'm about to switch from one SATA hard drive to another and I'm
> planning on going through the normal installation process except for
> copying over the data on each partition of my old drive to the
> corresponding partition on my new drive. Is there anything to watch
> out for? Pitfalls to avoid, etc?

Hmmm, a bit of an abstract description (what is meant by "data"?) of the
issue with a broad question, but here goes...

* If you plan on overwriting the old drive, make a backup.
* Don't overwrite /etc but keep a copy of it around
(e.g. /root/old_etc)
* Keep a copy of your old world file, /etc/portage, etc. so you
know what's installed.
* If you're keeping both drives don't forget to update your
grub/lilo config.
* You might want to re-label your old partitions (if they're
labeled) to avoid confusion.
* Be careful of changes of uid/gids in system accounts with the
new install. When creating new users you might want to be sure
their uids/gids match.
* Again, a backup is your friend.

HTH,
-a
Back to top
Login to vote
Dale

External


Since: Sep 28, 2008
Posts: 96



(Msg. 4) Posted: Fri Dec 19, 2008 8:20 pm
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Uwe wrote:
> Grant wrote:
>
>> I'm about to switch from one SATA hard drive to another and I'm
>> planning on going through the normal installation process except for
>> copying over the data on each partition of my old drive to the
>> corresponding partition on my new drive. Is there anything to watch
>> out for? Pitfalls to avoid, etc?
>>
>> - Grant
>>
>>
> You should take a look at this one:
> http://www.gentoo-wiki.info/HOWTO_Move_Gentoo_Installation_to_new_hard_disk
>
> :>
> Uwe
>
>

Why does that guide say to edit mtab? I thought the system kept up with
mtab itself and we are not supposed to edit that? Something change?

Dale

Smile Smile
Back to top
Login to vote
Grant

External


Since: Aug 19, 2005
Posts: 373



(Msg. 5) Posted: Sat Dec 20, 2008 6:20 pm
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

>> I'm about to switch from one SATA hard drive to another and I'm
>> planning on going through the normal installation process except for
>> copying over the data on each partition of my old drive to the
>> corresponding partition on my new drive. Is there anything to watch
>> out for? Pitfalls to avoid, etc?
>>
>> - Grant
>>
> You should take a look at this one:
> http://www.gentoo-wiki.info/HOWTO_Move_Gentoo_Installation_to_new_hard_disk

Thank you, I've booted to a LiveCD I'm in the middle of copying
everything from the old drive to the new drive with:

cp -ax /olddrive/* /newdrive/

but it's taking hours. Both drives are SATAII and there is about
250GB of data to transfer. The CD spins periodically, the hard disk
activity light stays lit, and I can hear the old drive working
periodically, but I'm thinking this is too long.

Is there something I could have forgotten to do? Is there a way to
check on the progress?

- Grant
Back to top
Login to vote
Grant

External


Since: Aug 19, 2005
Posts: 373



(Msg. 6) Posted: Sat Dec 20, 2008 6:30 pm
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

>>> I'm about to switch from one SATA hard drive to another and I'm
>>> planning on going through the normal installation process except for
>>> copying over the data on each partition of my old drive to the
>>> corresponding partition on my new drive. Is there anything to watch
>>> out for? Pitfalls to avoid, etc?
>>>
>>> - Grant
>>>
>> You should take a look at this one:
>> http://www.gentoo-wiki.info/HOWTO_Move_Gentoo_Installation_to_new_hard_disk
>
> Thank you, I've booted to a LiveCD I'm in the middle of copying
> everything from the old drive to the new drive with:
>
> cp -ax /olddrive/* /newdrive/
>
> but it's taking hours. Both drives are SATAII and there is about
> 250GB of data to transfer. The CD spins periodically, the hard disk
> activity light stays lit, and I can hear the old drive working
> periodically, but I'm thinking this is too long.
>
> Is there something I could have forgotten to do? Is there a way to
> check on the progress?
>
> - Grant

I switched VTs and used 'du -sh /newdisk' to verify that about 150GB
has been copied. I guess it's just slow.

- Grant
Back to top
Login to vote
Joerg Schilling

External


Since: Dec 05, 2006
Posts: 22



(Msg. 7) Posted: Sat Dec 20, 2008 6:50 pm
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Grant <emailgrant.RemoveThis@gmail.com> wrote:

> Thank you, I've booted to a LiveCD I'm in the middle of copying
> everything from the old drive to the new drive with:
>
> cp -ax /olddrive/* /newdrive/

"cp" neither has a "-a" nor a "-x" option. Are you talking abut "gcp"?

> but it's taking hours. Both drives are SATAII and there is about
> 250GB of data to transfer. The CD spins periodically, the hard disk
> activity light stays lit, and I can hear the old drive working
> periodically, but I'm thinking this is too long.

The fastest and most correct way to copy directory trees is to use star
because star forks into two processes and decouples the read process
from the write process.

star -copy -p -acl -sparse -xdot -time -C /olddrive . /newdrive

If you have plenty of RAM, give star half of the RAM as FIFO using the fs=
option (e.g. fs=256M).

If your new filesystem is not optimized for write speed, you may like to add
the -no-fsync option but then star cannot tell you whether the copy was
successful (BTW: GNU tar never calls fsync(2) and thus never may grant a
successful copy).

ftp://ftp.berlios.de/pub/star/

Jörg

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js.RemoveThis@cs.tu-berlin.de (uni)
joerg.schilling.RemoveThis@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
Back to top
Login to vote
Graham Murray

External


Since: Oct 11, 2005
Posts: 33



(Msg. 8) Posted: Sat Dec 20, 2008 7:00 pm
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Joerg.Schilling RemoveThis @fokus.fraunhofer.de (Joerg Schilling) writes:

> "cp" neither has a "-a" nor a "-x" option. Are you talking abut "gcp"?

yes it does

cp --help
Usage: cp [OPTION]... [-T] SOURCE DEST
or: cp [OPTION]... SOURCE... DIRECTORY
or: cp [OPTION]... -t DIRECTORY SOURCE...
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.

Mandatory arguments to long options are mandatory for short options too.
-a, --archive same as -dpR

[snip]
-x, --one-file-system stay on this file system
Back to top
Login to vote
Joerg Schilling

External


Since: Dec 05, 2006
Posts: 22



(Msg. 9) Posted: Sat Dec 20, 2008 7:00 pm
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Graham Murray <graham RemoveThis @gmurray.org.uk> wrote:

> Joerg.Schilling RemoveThis @fokus.fraunhofer.de (Joerg Schilling) writes:
>
> > "cp" neither has a "-a" nor a "-x" option. Are you talking abut "gcp"?
>
> yes it does

See below....

> cp --help
> Usage: cp [OPTION]... [-T] SOURCE DEST
> or: cp [OPTION]... SOURCE... DIRECTORY

So you are definitely not talking about "cp" but about "gcp" Wink

BTW: if you like star not to cross filesystem boundaries, add -M.

Jörg

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js RemoveThis @cs.tu-berlin.de (uni)
joerg.schilling RemoveThis @fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
Back to top
Login to vote
Joerg Schilling

External


Since: Dec 05, 2006
Posts: 22



(Msg. 10) Posted: Sat Dec 20, 2008 8:50 pm
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Dirk Heinrichs <dirk.heinrichs RemoveThis @online.de> wrote:

> Am Samstag, 20. Dezember 2008 18:44:53 schrieb Joerg Schilling:
>
> > "cp" neither has a "-a" nor a "-x" option. Are you talking abut "gcp"?
>
> Sure he is. This is a Linux mailing list. We don't care which options are
> missing in Solaris' version of cp Wink

I was not talking about the Solaris cp but about "cp", the way it is in the
standard.

The problem with giving unspecific advise based on non-standard behavior is
that people may later use the same command line on other platforms and
fail......

Jörg

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js RemoveThis @cs.tu-berlin.de (uni)
joerg.schilling RemoveThis @fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
Back to top
Login to vote
Grant

External


Since: Aug 19, 2005
Posts: 373



(Msg. 11) Posted: Sat Dec 20, 2008 9:20 pm
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

>>>> I'm about to switch from one SATA hard drive to another and I'm
>>>> planning on going through the normal installation process except for
>>>> copying over the data on each partition of my old drive to the
>>>> corresponding partition on my new drive. Is there anything to watch
>>>> out for? Pitfalls to avoid, etc?
>>>>
>>>> - Grant
>>>>
>>> You should take a look at this one:
>>> http://www.gentoo-wiki.info/HOWTO_Move_Gentoo_Installation_to_new_hard_disk
>>
>> Thank you, I've booted to a LiveCD I'm in the middle of copying
>> everything from the old drive to the new drive with:
>>
>> cp -ax /olddrive/* /newdrive/
>>
>> but it's taking hours. Both drives are SATAII and there is about
>> 250GB of data to transfer. The CD spins periodically, the hard disk
>> activity light stays lit, and I can hear the old drive working
>> periodically, but I'm thinking this is too long.
>>
>> Is there something I could have forgotten to do? Is there a way to
>> check on the progress?
>>
>> - Grant
>
> I switched VTs and used 'du -sh /newdisk' to verify that about 150GB
> has been copied. I guess it's just slow.
>
> - Grant

All booted into the new hard drive now, thanks a lot for everyone's help.

It looks like I have 620GB free on this 1TB disk. From what I've
read, formatting eats up about 7%, and I had 250Gb worth of data.
Does that mean about 60GB are being reserved for root?

- Grant
Back to top
Login to vote
Willie Wong

External


Since: Aug 25, 2005
Posts: 103



(Msg. 12) Posted: Sat Dec 20, 2008 11:10 pm
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sat, Dec 20, 2008 at 12:13:40PM -0800, Penguin Lover Grant squawked:
> It looks like I have 620GB free on this 1TB disk. From what I've
> read, formatting eats up about 7%, and I had 250Gb worth of data.
> Does that mean about 60GB are being reserved for root?

If you used ext2/ext3 with mke2fs, the default is 5% reserved. If you
put the whole disk in one partition, than that works out to be just
about 50G. I don't know what you use the disk for, but it seems a bit
silly to have a 1TB disk in just 1 partition for the entire system and
waste 50G this way. Even just splitting the root and home partitions
would be nice. I mean, all system files, the portage tree, and the
distfiles should fit into 50G with no problem, having a 50G reserved
space really is silly.

Furthermore, if this disk is NOT a system disk, but just one for
data... then I ask, what's the point of leaving reserve space for
root?

W
--
Will will will unless Will wills willingly. Maybe Willow
~tiredwired. Sunday Oct. 6. 6:00pm
Sortir en Pantoufles: up 743 days, 20:41
Back to top
Login to vote
Volker Armin Hemmann

External


Since: Aug 22, 2005
Posts: 63



(Msg. 13) Posted: Sun Dec 21, 2008 12:00 am
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Samstag 20 Dezember 2008, Joerg Schilling wrote:
> Grant <emailgrant DeleteThis @gmail.com> wrote:
> > Thank you, I've booted to a LiveCD I'm in the middle of copying
> > everything from the old drive to the new drive with:
> >
> > cp -ax /olddrive/* /newdrive/
>
> "cp" neither has a "-a" nor a "-x" option. Are you talking abut "gcp"?

of course he does. This is a linux list. Everybody is using the gnu tools. Not
some broken solaris stuff.

<snip blatant advertising >
Back to top
Login to vote
Dale

External


Since: Sep 28, 2008
Posts: 96



(Msg. 14) Posted: Sun Dec 21, 2008 12:20 am
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Grant wrote:
>>> I'm about to switch from one SATA hard drive to another and I'm
>>> planning on going through the normal installation process except for
>>> copying over the data on each partition of my old drive to the
>>> corresponding partition on my new drive. Is there anything to watch
>>> out for? Pitfalls to avoid, etc?
>>>
>>> - Grant
>>>
>>>
>> You should take a look at this one:
>> http://www.gentoo-wiki.info/HOWTO_Move_Gentoo_Installation_to_new_hard_disk
>>
>
> Thank you, I've booted to a LiveCD I'm in the middle of copying
> everything from the old drive to the new drive with:
>
> cp -ax /olddrive/* /newdrive/
>
> but it's taking hours. Both drives are SATAII and there is about
> 250GB of data to transfer. The CD spins periodically, the hard disk
> activity light stays lit, and I can hear the old drive working
> periodically, but I'm thinking this is too long.
>
> Is there something I could have forgotten to do? Is there a way to
> check on the progress?
>
> - Grant
>
>
>

People told me that the -v option makes it slower but at least I can see
if it is working. You may want to try ps -aux | grep cp and see if it
shows anything.

I have about 30Gbs of data on mine and I can tell you, it took a couple
hours to get it moved over. It is a slow process.

Dale

Smile Smile
Back to top
Login to vote
Dale

External


Since: Sep 28, 2008
Posts: 96



(Msg. 15) Posted: Sun Dec 21, 2008 12:30 am
Post subject: Re: [gentoo-user] Migrating hard drives [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Joerg Schilling wrote:
> Graham Murray <graham.DeleteThis@gmurray.org.uk> wrote:
>
>
>> Joerg.Schilling.DeleteThis@fokus.fraunhofer.de (Joerg Schilling) writes:
>>
>>
>>> "cp" neither has a "-a" nor a "-x" option. Are you talking abut "gcp"?
>>>
>> yes it does
>>
>
> See below....
>
>
>> cp --help
>> Usage: cp [OPTION]... [-T] SOURCE DEST
>> or: cp [OPTION]... SOURCE... DIRECTORY
>>
>
> So you are definitely not talking about "cp" but about "gcp" Wink
>
> BTW: if you like star not to cross filesystem boundaries, add -M.
>
> Jörg
>
>

I jusr recently copied my system using cp -av and it does have a -a
option. It's in my man page as well. I have not even heard of gcp so I
don't think I have ever used it.

From the man page:

CP(1) User
Commands CP(1)



NAME
cp - copy files and directories

SYNOPSIS
cp [OPTION]... [-T] SOURCE DEST
cp [OPTION]... SOURCE... DIRECTORY
cp [OPTION]... -t DIRECTORY SOURCE...

DESCRIPTION
Copy SOURCE to DEST, or multiple SOURCE(s) to DIRECTORY.

Mandatory arguments to long options are mandatory for short
options too.

-a, --archive
same as -dpR

and the list goes on. It's there, I just used it the other day and it
works.

Dale

Smile Smile
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[gentoo-user] "Copying" between hard drives potential newb.. - Hi Long story short - power outage damages hard drive - under liveCD data can still be read [phew] - comp will not boot from damaged hdd - man runs to shop and buys new hdd plus UPS - installed new hdd | /dev/hda - old damaged hdd is /dev/hdb [3..

[gentoo-user] Hard lockups on new computer with gentoo liv.. - Hi, I've bought a new private computer because my old machine is nearly 10 years old already and deserves a little rest now. I've bought it without an OS, and tried some linux install CDs and dvd's I have. With some worrying results: - One installDC..

[gentoo-user] usb2 hard drive - Greeting, I am trying to get my USB2 external 200 gig ext2fs formated hard drive to mount in Gentoo. Below is my configuration: Linux yodo 2.6.11-gentoo-r3 #1 Sat Oct 1 17:38:42 CDT 2005 i686 AMD Duron(tm) Processor AuthenticAMD GNU/Linux mount..

[gentoo-user] Why is apache 2.2 hard masked? - inquiring mind wants to know... -- gentoo-user@gentoo.org mailing list

[gentoo-user] Why is apache 2.2 hard masked? - Hi, I'm fighting with authentification problems (see my further mails about mod_auth_ldap) and maybe a new module available for apache 2.2 might solve them. BUT apache 2.2 is hard masked - why? Any experiences? - TIA - Wolfgang -- gentoo-user@gentoo.or...
       Linux (Home) -> User All times are: Pacific Time (US & Canada) (change)
Goto page 1, 2, 3
Page 1 of 3

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
  Linux Forums
 Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact