LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Partition & Backup Plan - How does it look to you? (https://www.linuxquestions.org/questions/linux-newbie-8/partition-and-backup-plan-how-does-it-look-to-you-625723/)

alfoders 03-04-2008 05:46 PM

Partition & Backup Plan - How does it look to you?
 
Hello all. Here is my system info and plan for partitioning and backup. How does it look to you?

Partition & Backup Plan

* Clean install - Mandriva 2008

* Celeron 2Ghz / 1GB RAM / 60GB & 80GB Internal HDs / 200GB External HD

* Home Desktop - Light office work / Music / Photos / Videos / Cable & Wireless Web Surfing / No LAN, Servers or Gaming

* HD #1 - 60GB Internal
hda1 - / - 1GB
hda2 - /boot - 500MB
hda3 - /usr - 10GB
hda4 - /home - 45GB
hda5 - /var - 1GB
hda6 - /tmp - 2.5GB

* HD #2 - 80GB Internal
hdb1 - /swap - 2GB
hdb2 - /storage - 78GB

* HD #3 - 200GB USB External
sda1 - /system backup - 135GB
sda2 - /music - 65GB

* Backup hda1, hda2, hda3, hda4 & hdb2 to sda1 - /system backup

Any suggestions to improve this layout would be much appreciated.

* Am I backing up the right stuff?

* Do I need to backup anything else under hda1 - / ?

* Will putting /swap on the 2nd HD REALLY improve performance?

Thanks to all for any suggestions.

alBERT

Findus 03-04-2008 05:55 PM

I run Fedora 8 on my laptop, with swap on the same hard drive as everything else, as I only have one drive. I haven't noticed any significant decrease in performance. How ever, that may also be because the laptop as a whole blows...

On the other hand I don't think you'll be using your swap that much, except maybe if you suspend your computer to disk (S4). Your 1GB RAM should be able to handle mostly everything else.

Apart from that I don't really have any comments on your partitioning layout.

- Findus

jailbait 03-04-2008 06:51 PM

Quote:

Originally Posted by alfoders (Post 3078220)

* Am I backing up the right stuff?

Yes. You might also consider backing up your music if it is not already backed up to DVD.


Quote:

Originally Posted by alfoders (Post 3078220)

* Do I need to backup anything else under hda1 - / ?

No. Depending on how you are backing up / you might be backing up some things twice. /boot, /usr, /home, /var, and /tmp are mounted on directories within /. Some backup programs copy the entire file system including mounted partitions. Other backup programs copy only the requested partition and do not include mounted partitions.

Quote:

Originally Posted by alfoders (Post 3078220)

* Will putting /swap on the 2nd HD REALLY improve performance?

Like Findus says, probably not. Having multiple hard drives can improve performance if you can balance the hard drive loads. The idea is to get all of your hard drives running in parallel. So you should have your three busiest file systems spread across the three hard drives. Whether or not you have an optimal setup for speed depends on how heavily your /music and /storage partitions are used.

/backup will be heavily used every time you do a backup and unused otherwise. Having /backup on an otherwise lightly used hard drive will help keep your other work from slowing to a crawl while backup is running. Another way to keep backup from impacting your system too much is to use an update style backup which only backs up files that have changed since the last backup.

You have the backup on a separate hard drive from anything being backed up. This is a good idea because a hard drive failure cannot cause you to lose both the backup and original. If you rearrange partitions to try to improve performance don't lose your backup/original separation in the process.

-------------------
Steve Stites

geek745 03-04-2008 11:51 PM

I have a question about your hda1-6. hda1-4 are reserved for primary partitions. hda5+ are logical partitions... so I am curious as to how you have something on hda2 and hda5, for example... my system I am using hda1, 3, 4, and hda5-10 are logical partitions within hda2, which is then inaccessible...

For me, I keep each OS in its own partition and symlink user data from a separate partition into their home directory - same UIDs on all OSs.

A configuration such as this would significantly reduce the hassle you described... but maybe you don't want to reinstall... in that case, watch the backup process to confirm that backing up / does NOT do everything and that you need to specify all of the subdirectories that are on different volumes individually.

jiml8 03-05-2008 09:19 AM

The comment about physical vs logical partitions is quite correct; you will be absolutely unable to implement the exact partition organization that you describe here, though you will be able to implement the functionality that you desire - the partition numbering will be different.

Personally, I don't see the sense in breaking all of the various system directories under / out into different partitions, particularly when they are on the same drive. There is no upside that I see, and the downside is that you limit each directory to a certain maximum size while also complicating your backup plan.

I personally would put / in one partition, with all subdirectories other than /home and perhaps /usr under it, and I would put /home and /usr on different hard drives - and different from each other as well if that were possible.

Since you are specifying all of these as IDE drives, I don't think there is much performance advantage in splitting things over multiple drives, but there would be some advantage. If the drives were SATA or SCSI (which is what I use) the performance advantages would be pronounced.

I do my backups using rsync and cron jobs.

My daily / backup cron script is this:

Code:

rm -rf /mnt/sdb1/back/backup6
mv /mnt/sdb1/back/backup5 /mnt/sdb1/back/backup6
mv /mnt/sdb1/back/backup4 /mnt/sdb1/back/backup5
mv /mnt/sdb1/back/backup3 /mnt/sdb1/back/backup4
mv /mnt/sdb1/back/backup2 /mnt/sdb1/back/backup3
mv /mnt/sdb1/back/backup1 /mnt/sdb1/back/backup2
cp -al /mnt/sdb1/back/backup0 /mnt/sdb1/back/backup1
rsync -a --delete --exclude /tmp --exclude /home --exclude /media --exclude /proc --exclude /sys --exclude /mnt --exclude /var/tmp / /mnt/sdb1/back/backup0

My daily /home backup cron script is this:

Code:

rm -rf /mnt/sde9/homeback/backup6
mv /mnt/sde9/homeback/backup5 /mnt/sde9/homeback/backup6
mv /mnt/sde9/homeback/backup4 /mnt/sde9/homeback/backup5
mv /mnt/sde9/homeback/backup3 /mnt/sde9/homeback/backup4
mv /mnt/sde9/homeback/backup2 /mnt/sde9/homeback/backup3
mv /mnt/sde9/homeback/backup1 /mnt/sde9/homeback/backup2
cp -al /mnt/sde9/homeback/backup0 /mnt/sde9/homeback/backup1
rsync -a --delete --exclude tmp --exclude .Mail/spam /mnt/sdd5/home /mnt/sde9/homeback/backup0

and on a weekly basis I run these two crons:

Code:

#!/bin/bash
dirname=`date`;
mv /mnt/sdb1/back/backup6 /mnt/sdb1/back/weeklybackups/"$dirname"

and
Code:

#!/bin/bash
dirname=`date`;
mv /mnt/sde9/homeback/backup6 /mnt/sde9/homeback/weeklybackups/"$dirname"


alfoders 03-05-2008 05:46 PM

Clarification by OP
 
Let me clarify a couple of items.

1 - I'm planning on installing the latest PRODUCTION
release of Mandriva, not the bleeding edge version.

2 - While I don't write kernel code, I'm hardly a
Linux newbie. I've been a user for >12 years, quit
dual-booting Win98, am comfortable with the command
line and love neat bash scripts.

3 - I started this thread when I noticed that /usr had
swollen to 96% full. (My weakness for experimenting
with apps & utils got the best of me.) When I
installed Mdv2007 - Spring, I figured that 5GB would
suffice. I don't want to repeat this mistake.

4 - I've never had a good b/u plan & have been nervous
about this. I'm more concerned about the loss of data
than I am about having to restore apps, configs,
settings and window manager tweaks. With the new
install & external HD, I plan to "get the backup
religion."

5 - The internal HDs on my system are IDE, not SCSI.

Thanks to all for the suggestions. I'm learning a lot
from this discussion.

alBERT


All times are GMT -5. The time now is 08:09 PM.