Re: What is the best way to upgrade a drive?
- From: houghi <houghi@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 28 Apr 2007 11:00:54 +0200
John wrote:
The drive I want to replace is hda2 which contains /home and /boot. In
retrospect I think it was not such a good idea to keep /boot and /home on
the same drive....
It is indeed easier to have them on seperate drives or just have gone
with the default, which is to have thre partitions. /, /home and swap.
My question is, how to replace hda as painlessly as possible without loosing
data or trashing the entire sytem? The machine running Suse 10.1 and I
don't plan on upgrading until after 10.3 is released.
1) Put back /boot where it belongs. This can be easily done.
- name a directory /boot_new
- copy the data from /boot to /boot_new
- umount /boot
- put a # in front of the line that says /boot in /etc/fstab
Now reboot and see if it works out. If not, you need to simply remount
/dev/hda1 as /boot and remove the #
The currently installed drives are all IDE but the machine is SATA capable.
I have not yet decided if the new drive will be EIDE or SATA. I'm not sure
if it's a good idea to mix the two so I am leaning towards EIDE at the
moment.
Here is my current setup:
john@uisce:~/doc> df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hdb1 38G 23G 15G 61% /
udev 1.3G 300K 1.3G 1% /dev
/dev/hda1 118M 40M 78M 34% /boot
/dev/hda2 75G 63G 13G 84% /home
/dev/hdd2 18G 16G 1.4G 93% /local
/dev/hdc2 15G 1.1G 14G 7% /srv
/dev/hdc3 7.3G 174M 7.1G 3% /tmp
/dev/hdc1 15G 1.5G 14G 10% /var
hdd1 is swap 20GB
That is some freaking setup that just is begging for problems and you do
not use the capacity to its fullest. From what I see, you could easily
place /srv /tmp and /var back on HDB1 with the same method as you use
with /boot
Now you have an empty hdc. Take out that drive and put in the new HDD.
No idea why you need so much swap, but if you do, you might want to
consider putting it on different HD's. I will be asuming that you are
buying a newer and bigger HD. I will say 320GB or 400GB are the best
priced per GB and I asume you are a smart person who buys with his brain
AND his wallet. ;-)
So put in the new HD.
Mount it as /home_new
Copy everything from /home to /home_new
Log in as root
/umount /home_new and /home
Mount /dev/hdc1 as /home (change /etc/fstab directly or use YaST)
Now you should be able to log back in a user. Reboot and see if all
works. If it does, halt the machine and take out hdb. Put into that
place the old hdc.
Some extra remarks: Do you realy need that much swap? If yes, add some
to the new hdb as well.
Look at the usage of your directories. It is not becauise you can put
every directory on a seperate partition that you should. Unless you have
very specific reasons to do so, the best way to go is KISS.
Especial /srv /tmp and /var are just space wasters with the amount of
discspace you use.
Here is what I would do:
1) / on /dev/hdb1
2) swap + /data-hda1 on /hda1
3) swap + /home on /hdd1
4) swap + /data-hdc1 on /hdc1
Now if you see that some directory (e.g. /local) needs more space then
it does have on /dev/hdb1, just copy the data to a subdirectory in e.g.
/data-hda1/local, first rename /local to /local_old and then symlink
/local to /data-hda1/local.
Another thing you can do is put swap on those three drives (on all four
would be even better) and then use LVM to make one big happy partition
of trhe rest of hda, hdc and hdd.
This all asumes that you stick with IDE.
If you start using SATA, it is even easier.
Drop in the new HD, copy the data to the HD, umount the old, mount the
new.
houghi
--
Remind me to write an article on the compulsive reading of news. The
theme will be that most neuroses can be traced to the unhealthy habit
of wallowing in the troubles of five billion strangers. -- Heinlein
.
- References:
- What is the best way to upgrade a drive?
- From: John
- What is the best way to upgrade a drive?
- Prev by Date: Re: next SuSE 10.3 code name Microsoft Linux - Novell Enterprise Edition
- Next by Date: Re: Monitor settings
- Previous by thread: Re: What is the best way to upgrade a drive?
- Next by thread: Re: What is the best way to upgrade a drive?
- Index(es):
Relevant Pages
|