Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > Gentoo Linux Support

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-21-2008, 09:37 AM
Andrew Walker
 
Posts: n/a
Default Moving to larger disk

I started playing with Gentoo on a 20 Gig hard disk and, unsurprisingly,
it's run out of space! Is there any easy way of migrating my system over
to another disk without installing from scratch?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-21-2008, 09:37 AM
J.O. Aho
 
Posts: n/a
Default Re: Moving to larger disk

Andrew Walker wrote:
> I started playing with Gentoo on a 20 Gig hard disk and, unsurprisingly,
> it's run out of space! Is there any easy way of migrating my system over
> to another disk without installing from scratch?


There are many methods, you can use dd, tar, cp and many more commands to do
the copy of your old data. If you boot tour system and make your copies, then
see to not "copy" /proc and /sys, as those directories will contain "streams"
and will just fill your new harddrive with nonsens untill it's completly full.

If you boot from Gentoo isntall CD and preform the "copy" from there, then you
don't have to worry as much about the proc and sys that is on your 20GB
harddrive (just avoid to copy the system thats on the CD).


//Aho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-21-2008, 09:38 AM
Johan Lindquist
 
Posts: n/a
Default Re: Moving to larger disk

So anyway, it was like, 15:54 CEST Apr 01 2005, you know? Oh, and, yeah,
Andrew Walker was all like, "Dude,

> I started playing with Gentoo on a 20 Gig hard disk and,
> unsurprisingly,


Actually it is rather surprising.

> it's run out of space! Is there any easy way of migrating my system
> over to another disk without installing from scratch?


Before you do that, make sure to clean out /usr/portage/distfiles and
/var/tmp/portage. I can't really see how you'd manage to run out of
disk unless you're stockpiling distfiles or keeping workdirs around.

If that doesn't do it, post some more info about your choice of
partitioning and the output of 'du -sk /*' and maybe someone can help
you figure out exactly where you've accumulated all that bloat.

That being said, tar, cpio and even cp -a might do for a migration.

--
Time flies like an arrow, fruit flies like a banana. Perth ---> *
16:55:59 up 159 days, 4:22, 11 users, load average: 0.00, 0.00, 0.00
Linux 2.6.9 x86_64 GNU/Linux Registered Linux user #261729
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-21-2008, 09:38 AM
Sybren Stuvel
 
Posts: n/a
Default Re: Moving to larger disk

Johan Lindquist enlightened us with:
>> I started playing with Gentoo on a 20 Gig hard disk and,
>> unsurprisingly,

>
> Actually it is rather surprising.


Why? I've got about 15 GB of games alone - UT2004 and Neverwinter
Nights. Besides that I've got a MPEG2 encoding TV card which I use to
record shows, like a computer version of a VCR. That's about 10 GB per
movie, untill I compress them. It's easy to fill up so much space!

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-21-2008, 09:38 AM
Andrew Walker
 
Posts: n/a
Default Re: Moving to larger disk


On Fri, 01 Apr 2005 16:59:57 +0200, Johan Lindquist wrote:

> So anyway, it was like, 15:54 CEST Apr 01 2005, you know? Oh, and, yeah,
> Andrew Walker was all like, "Dude,
>
>> I started playing with Gentoo on a 20 Gig hard disk and,
>> unsurprisingly,

>
> Actually it is rather surprising.
>
>> it's run out of space! Is there any easy way of migrating my system
>> over to another disk without installing from scratch?

>
> Before you do that, make sure to clean out /usr/portage/distfiles and
> /var/tmp/portage. I can't really see how you'd manage to run out of
> disk unless you're stockpiling distfiles or keeping workdirs around.
>
> If that doesn't do it, post some more info about your choice of
> partitioning and the output of 'du -sk /*' and maybe someone can help
> you figure out exactly where you've accumulated all that bloat.
>
> That being said, tar, cpio and even cp -a might do for a migration.



Thanks, that's freed about 10 Gig!
As I may migrate anyway, I need to do a backup. Can you recommend an easy
(i.e GUI) backup tool? I want to backup to another ext3 disk but I'm
worried that using tar files in a terminal may be beyond me!
Ideally I want a package that will easily backup my system through a GUI
and if my x-server fails can be restored via a terminal.
By the way, is there a way of making tar files corruption proof, I've
used par tools with windows in the past in case the tar file becomes
corrupted. Also is there a file size limit to ext3, I backed up to a
fat32 file system once and as the tar file was over 4Gig I lost the
entire backup!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-21-2008, 09:38 AM
Andrew Ivanov
 
Posts: n/a
Default Re: Moving to larger disk

Hi!
Since I'm thinking of moving from Mandrake to Gentoo in the next couple
of weeks, I did some research on the possibilities of archiving my files.

First there are the traditional tools like dd, cp, tar, cpio, dump, etc.
They were already mentioned... I don't think I can give you more info
than you can find in man/info/previous postings.
I have used tar for some time now, but I'm not very happy with it. It's
a powerful tool and I can set a lot of include/exclude rules, date
checks and so on. The problem is that I forget what settings I used for
my previous archive and even when I find the note, the command line is
just too long. If looking for a gui tool - may be ark (KDE tool) can
help?? Not sure I prefer dealing with these on the command line.

There's a tool called 'Mondo Rescue'. It consists of two parts. Mondo is
the tool to create the archives, and there's a tool (mindi) which scans
your system (kernel, modules, partitions) and prepares a boot disk
images. You can (either yourself or you can let mondo do it) record
archive on CDs and make the first one bootable. It is said that this can
work well with raid and lvm. I think it's a good choice when you archive
to cd-r(w) (great automation), but it also supports NFS and any place on
your tree (any partition/disk mounted). No GUI! Sorry! But it uses
interface with menus (similar to Midnight commander) and you will not
feel very miserable

The third option is dar. It's just between tar and mondo. Like tar it's
very flexible with great options for include/exclude, differential
archives. And like mondo it allows you to split archive in chunks and
gives you the option of leaving space for a boot-image (in case you're
archiving to CDs or kind of). It has a great documentation set and
offers good scripting options (along with some sample scripts). If
possible it compiles a static version that'll run from any linux and I'm
very impressed with it (so deep that I'll use it for my next
full-data-archive in a day or two). If looking for GUI frontend - try
KDar (I haven't tested it for it doesn't run on KDE 3.2, but it seems
quite popular).

Hope this'll help you!
Good luck
Andrew Ivanov

Andrew Walker wrote:
> Thanks, that's freed about 10 Gig!
> As I may migrate anyway, I need to do a backup. Can you recommend an easy
> (i.e GUI) backup tool? I want to backup to another ext3 disk but I'm
> worried that using tar files in a terminal may be beyond me!
> Ideally I want a package that will easily backup my system through a GUI
> and if my x-server fails can be restored via a terminal.
> By the way, is there a way of making tar files corruption proof, I've
> used par tools with windows in the past in case the tar file becomes
> corrupted. Also is there a file size limit to ext3, I backed up to a
> fat32 file system once and as the tar file was over 4Gig I lost the
> entire backup!

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-21-2008, 09:38 AM
Ben O'Brien
 
Posts: n/a
Default Re: Moving to larger disk

Andrew Walker wrote:
> On Fri, 01 Apr 2005 16:59:57 +0200, Johan Lindquist wrote:
>
>
>>So anyway, it was like, 15:54 CEST Apr 01 2005, you know? Oh, and, yeah,
>>Andrew Walker was all like, "Dude,
>>
>>
>>>I started playing with Gentoo on a 20 Gig hard disk and,
>>>unsurprisingly,

>>
>>Actually it is rather surprising.
>>
>>
>>>it's run out of space! Is there any easy way of migrating my system
>>>over to another disk without installing from scratch?

>>
>>Before you do that, make sure to clean out /usr/portage/distfiles and
>>/var/tmp/portage. I can't really see how you'd manage to run out of
>>disk unless you're stockpiling distfiles or keeping workdirs around.
>>
>>If that doesn't do it, post some more info about your choice of
>>partitioning and the output of 'du -sk /*' and maybe someone can help
>>you figure out exactly where you've accumulated all that bloat.
>>
>>That being said, tar, cpio and even cp -a might do for a migration.

>
>
>
> Thanks, that's freed about 10 Gig!
> As I may migrate anyway, I need to do a backup. Can you recommend an easy
> (i.e GUI) backup tool? I want to backup to another ext3 disk but I'm
> worried that using tar files in a terminal may be beyond me!
> Ideally I want a package that will easily backup my system through a GUI
> and if my x-server fails can be restored via a terminal.
> By the way, is there a way of making tar files corruption proof, I've
> used par tools with windows in the past in case the tar file becomes
> corrupted. Also is there a file size limit to ext3, I backed up to a
> fat32 file system once and as the tar file was over 4Gig I lost the
> entire backup!
>
>


I reckon the easiest and best backup tool in the world is rsync. It's so
fast and smart and I've never had it break on me at all. Just use this one:
rsync -avu --progress <src> <dest>
and if over a network:
rsync -avue ssh --progress <user>@<host>:<src> <user>@<host>:<dest>
and if you want to do a dry run first just to test it will put files
where you want, just add a -n at the end so it can be easily deleted
when you go back through your command history to do the real thing. I
love it so much I mostly use it instead of cp.

As for partition images, there's a good gui (ncurses) tool to use. It
even comes on Knoppix (don't try backing up a mounted filesystem
please). It's called partimage and can even restore partitions to a
different (try bigger) size. It also compresses the partitions on the
fly. It's alot like Norton Ghost which is considered the bees knees of
partition imaging.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 02-21-2008, 09:38 AM
Ben O'Brien
 
Posts: n/a
Default Re: Moving to larger disk

p.s. Here is a script which does incremental backups, showing the true
awsomeness of rsync:

#!/bin/bash
# Incremental backup snapshot script v1.0

RM="/bin/rm -rf"
MV="/bin/mv"
MKDIR="/bin/mkdir -p -m 0700"

#### User definable parameters ####
SNAPSHOT_DEPTH=4

function assign_vars()
{
for (( i=0; i <= $SNAPSHOT_DEPTH; i++))
do
SNAPSHOT[$i]="$SNAPSHOT_DIR/$i"
done

}

function create_dirs()
{
for dir in ${SNAPSHOT[@]}
do
if ! test -d $dir
then
echo "creating directory $dir"
$MKDIR $dir
fi
done
}

function rotate_dirs()
{
# remove snapshots that are too old
if test -d ${SNAPSHOT[$SNAPSHOT_DEPTH]}
then
echo "deleting ${SNAPSHOT[$SNAPSHOT_DEPTH]}"
$RM ${SNAPSHOT[$SNAPSHOT_DEPTH]}
fi

for (( i=$SNAPSHOT_DEPTH; i > 0; ))
do
j=$((i--));
if test -d ${SNAPSHOT[$i]}
then
echo "moving ${SNAPSHOT[$i]} to ${SNAPSHOT[$j]}"
$MV ${SNAPSHOT[$i]} ${SNAPSHOT[$j]}
fi

done
}

COMMAND=$(basename $0 .sh)
if [ $COMMAND == transfer ]
then
SNAPSHOT_TARGET="bitslor:/home/transfer"
elif [ $COMMAND == ben ]
then
SNAPSHOT_TARGET="maclor:/Users/ben/"
elif [ $COMMAND == josh ]
then
SNAPSHOT_TARGET="bitslor:/home/josh/"
elif [ $COMMAND == public ]
then
SNAPSHOT_TARGET="bitslor:/home/public/"
else
exit 0
fi

SNAPSHOT_ROOT="/mnt/backup"
SNAPSHOT_DIR="$SNAPSHOT_ROOT/$COMMAND"

assign_vars
create_dirs

if rsync -avre ssh --progress --stats --link-dest=${SNAPSHOT[1]}
$SNAPSHOT_TARGET ${SNAPSHOT[0]}
then
rotate_dirs
elif test -d ${SNAPSHOT[0]}
then
echo "deleting ${SNAPSHOT[0]}"
$RM ${SNAPSHOT[0]}
fi
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 02-21-2008, 09:38 AM
J.O. Aho
 
Posts: n/a
Default Re: Moving to larger disk

Andrew Walker wrote:

> As I may migrate anyway, I need to do a backup. Can you recommend an easy
> (i.e GUI) backup tool? I want to backup to another ext3 disk but I'm
> worried that using tar files in a terminal may be beyond me!


tar -cf mytarball.tar /path/to/what/I/want/to/tar
/path/to/somethingt/else/I/want/to/tar /path/to/somethingt/other/I/want/to/tar


> Ideally I want a package that will easily backup my system through a GUI
> and if my x-server fails can be restored via a terminal.


You can use Gentoo (not the distro, but the file managementa program), has
option for tar.


> By the way, is there a way of making tar files corruption proof, I've
> used par tools with windows in the past in case the tar file becomes
> corrupted.


There are many reasons why a file would get corrupt, so no matter what program
you run, you can generate corrupt files.


> Also is there a file size limit to ext3, I backed up to a
> fat32 file system once and as the tar file was over 4Gig I lost the
> entire backup!


2T I think the limit is.


//Aho
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 02-21-2008, 09:38 AM
jafar
 
Posts: n/a
Default Re: Moving to larger disk

On Fri, 01 Apr 2005 13:54:06 +0000, Andrew Walker wrote:

> I started playing with Gentoo on a 20 Gig hard disk and, unsurprisingly,
> it's run out of space! Is there any easy way of migrating my system over
> to another disk without installing from scratch?


I had a similar problem so I used the howto at
http://www.brandonhutchinson.com/Mov...hard_disk.html
and adapted it for Gentoo use

Boot into the Gentoo live CD, create partitions on the new disk, mount
the new partitions, copy your system across, chroot, and re-install Grub.
Then you should be happily using a new Hard Disk.

--
Jafar Calley
Producer - http://moonlife-records.com
--------------------------------------
See the latest Mars and Saturn images
http://fatcat.homelinux.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:04 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
UnixAdminTalk.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613