[Discuss] Multiple HDD setup in Linux
Murray Strome
wmstrome at shaw.ca
Tue May 6 14:46:49 PDT 2008
R. Langkamer wrote:
> On 5/6/08 1:51 PM, Brian Burger wrote:
>
>> Last time I had to deal with multiple drives in one machine was
>> several years ago when I still ran XP; I've managed nicely with just
>> one partitioned harddrive in Linux until recently.
>>
>> As a result, I haven't a damn clue where to even start setting up a
>> multi-drive system in *nix... my old Windows habits come forward and I
>> find myself thinking of D & E drives again...
>>
>> Here's the setup:
>> Ubuntu 8.04
>> 1 120GB HDD (a few years old, still solid, but stuffed to the brim
>> with files)
>> 1 500GB HDD (new, not installed yet)
>> ext3 across the board for formatting
>>
>> Currently I've got / as sda1, /home as sda2, no swap, no boot.
>>
>> I'd like to use the 500GB as the main drive, with /boot, /, /swap &
>> the first part of /home on there, then use the entire 120GB as an
>> extension of /home - ideally, set up so it's all seamless from the
>> desktop end. I'm pretty sure I can set this up in LVM, but I'd
>> appreciate pointers or links to current, usable tutorials & resources
>> before I dive in!
>>
>> For bonus points, I'd like to install & partition the 500GB, leaving
>> my data intact on the 120, then later copy my /home over to the new
>> 500GB, then extend /home across into the entirety of the 120GB.
>>
>> I think 'dd' can handle the file movement side of this while keeping
>> the permissions & such intact, and LVM looks flexible enough to handle
>> the multi-stage re-deploying of partitions I'm thinking of above, but
>> anyone with actual experience doing this sort of thing, please advise!
>>
>> (I'm going to fill a couple of DVDs with backups of stuff I really
>> can't afford to loose, but hopefully the whole operation will go
>> smoothly and I'll be able to destroy the backup DVDs unused...)
>>
>> I'll probably do a clean install of Ubuntu into the new partitions;
>> there's a number of issues I"m having with my much-upgraded Ubuntu
>> install that'll hopefully just go away with a clean install and lots
>> more space to use...
>>
>> Thanks,
>>
>> Brian
>
>
> I'm unable to give details right now (I should be doing "work"
> instead of list lurking), but suffice to say, this is doable and as is
> the way in Linux land, there are many ways to accomplish this (off the
> top of my head, you can either use LVM or not, I am sure there are a
> few other ways as well though).
> Personally, I just put it all on one drive and if I had your drive
> configuration, I would use the 120GB as the main and the 500GB as the
> backup drive.
>
I am assuming that your 120GB HD is just two partitions, swap and / --
is this correct? If so, this is what I would do (and what I have done
several times now)
I would probably do a fresh install of Ubuntu (probably the new version
which I think is 8.04) on your new 500GB Drive. Just out of habit, and
since you will now have LOTS of space, I would select manual partitioning:
/ about 40GB should be plenty
/usr about 40GB
/etc about 10 GB
/home maybe 150GB to make sure that you have room enough for everything
that you want from your old 120GB drive
swap probably about twice as big as your RAM, but not a big deal.
/Backup -- or whatever you want to call it for the rest of the space.
This will give you a partition where you can put anything you like, like
backups, or just some of your documents, photos, videos, downloads or
whatever.
During this partitioning phase, I would set your old HD to something
like /old_LINUX but BE CERTAIN YOU DO NOT FORMAT IT! You will be given
the option as to what partitions you want to partition (everything on
the new drive must be).
When you get to the end of the installation, it will set up GRUB with
the new installation as the default, and should have an entry for your
old installation, so for the time being you will be able to log in to
your old installation, or your new one (a good idea in case something
doesn't work with the new one).
After you have successfully installed everything on the new drive, you
can copy most of what you want from you old home directory to the new
one (checking the user and group IDs to make sure they match). Depending
on how things are set up, you might also want to copy some files from
the old /etc to the new one.
The things that are likely to be a bit tricky will be some of the
configuration files for things like .mozilla, .mozilla-thunderbird,
.jpilot, etc. if you are using them.
Alternative: IF your old HD is already partitioned into at least swap,
/ and /home, during the partitioning phase, you could just set the /home
mount point to the old one, make /new_home the 150GB partition on your
new HD. Name the other partitions on your old drive things like
/old_root, /old_usr /old_var etc. (whatever they are now).
Then when you are selecting partitions to format, don't format anything
on the old drive, but format everything on the new one. If your old HD
is REALLY full, you might just copy 4GB of files from your /home
directory to a DVD (making sure you verify the result), then delete
those files to make certain that you will have enough space. If you
choose to do this, I am not certain everything in the = old LINUX will
still run properly if you boot into it.
Good luck! I hope this helps.
Murray
More information about the Discuss
mailing list