You are not logged in.
Pages: 1
I would like to install one instance of Arch Linux on both of my hard drives. Arch recognizes both drives but, during the installation, I seem to only be able to select one. I realize I could go back later and reformat the second drive after installing on the first, but it would like the OS to perceive the collective disk space as one large drive. I know Red Hat will install on multiple drives during the setup. Can Arch?
Thanks in advance
Offline
You need to set up LVM:
http://wiki.archlinux.org/index.php/Lvm
Offline
Great. Thanks for pointing me in that direction. Will I have to install the RAID portion indicated on that wiki along with the LVM?
Offline
No, but you will have to adjust the commands accordingly. LVM is quite capable of spanning multiple physical volumes on it's own without using RAID. Remember that GRUB cannot boot from LVM, so you will need at least /boot or maybe / on a regular partition.
Offline
/boot has to bee an regular partition, but there is no need to put / on a regular partition as long as you enable the lvm2 hook in your /etc/mkinitcpio.conf (probably somewhere between sata/pata/scsi and filesystems).
Offline
Thank you guys for your feedback.
OK. Instead of selecting "FD" for each partition, should I be selecting LVM?
I am still confused about which parts of these steps to omit and which parts to execute. Some of the RAID and the LVM parts are bunched together. I am very new at this (why am I choosing the harder way to install?), so I do not yet have a good intuition of how to proceed. Any further clarification would be much appreciated. Thanks in advance.
Last edited by mjjjurek (2007-08-17 19:58:56)
Offline
I'll try to summerize the procedure:
1. start the system with the installmedia, (if needed: use km to select your keymap and consolefont) and start /arch/setup
2. prepare harddrive (select: partion harddrive):
1st hdd (depending on the version of the install cd you are using: hda/sda):
Partition 1: /boot ~100mb, bootable, type=83
Partition 2: swap 256mb - 2g (depending on your needs, the size of your ram and your hdd), type=82
Partition 3: lvm remaining space, type=8e
2nd hdd (hdb/sdb):
Partition 1: lvm, entire space, type=8e
3. after that, switch to another terminal (alt + f2) and create the lvm:
lvm pvcreate /dev/sda3
lvm pvcreate /dev/sdb1
lvm vgcreate <some volumegroup name> /dev/sda3
lvm vgextend <the same volumegroup name> /dev/sdb1
now you can use the following command to add as many logical volumes as you want:
lvm lvcreate --size <size of partition> --name <name of lgocial volume> <volumegroup name as above>
eg:
lvm lvcreate --size 10G --name root systemname
lvm lvcreate --size 50G --name home systemname
...
4. Now switch back to the installer (alt + F1) and select "set filesystem mountpoints". You see a list of partitions which the installer found on your system. And for every logical volume you created there should be an entry named: "/dev/mapper/<volumegroupname>-<name of logical volume>".
First you can select a partition for swap (eg: /dev/sda2)
Then you can select a partition and filesystem for / (eg: /dev/mapper/systemname-root, ext3), /boot (eg: /dev/sda1, ext2) and each other directory for which you created an logical volume (/home, /var, ...).
The rest of the installation should work as with any normal install, except a few things (Some of this is probably allready done by the installer):
You need to enable the lvm2 hook in /etc/mkinitcpio.conf (before filesystems)
Change USELVM="no" to USELVM="yes" in /etc/rc.conf
Edit /boot/grub/menu.lst and change the root parameter in your kernel commandline to something like that: "root=/dev/mapper/<volumegroupname>-<root-volume>"
I hope this isn't written to confusing and helps you.
Last edited by gothmog.todi (2007-08-18 10:59:14)
Offline
I just got around to playing with this last night.
gothmog.todi, Thank you so much for breaking this down for me. It helped a lot. I have a few more questions, if you don't mind.
When you have the code,
lvm lvcreate --size 10G --name root systemname
lvm lvcreate --size 50G --name home systemname
is it necessarily to create these particular logical volumes? Are these the actually sizes of the disk that are acknowledged when I run the df command? If so, is it possible to make one large logical volume of both hard drives? Right now, when I run the df command, it recognizes sda, and the root and home partitions. Sdb or sdb1 are not shown. Is this normal? I am not sure I am setting up the partitions correctly.
Thanks again for all your help!
Offline
df only recognises mounted filesystems. df will acknowledge those sizes once you format and mount the logical volumes.
You don't need to create separate volumes if you don't want to. You could instead just use a single volume for your root filesystem (you'll still need a boot partition though) and store everything on that.
To create a single volume that fills your entire volume group (i.e. spanning both drives) then you could use
lvm lvcreate --extents 100%FREE --name root <volumegroupname>
Note, you'll have to replace <volumegroupname> with the actual name you use for your volume group. Sorry if that was stating the obvious, but I wanted to make it clear just in case.
Edit: Personally I wouldn't use a single volume for everything, but it is your choice if you want to do that.
Last edited by retsaw (2007-08-24 20:49:56)
Offline
Thanks for your clarification, retsaw
Out of curiosity, how would you organize your volumes? I currently have sda: 320G and sdb: 300G. Any suggestions for me on effective ways I could set up my volumes using those?
I apologize in advance for my painfully basic questions.
Offline
My current setup is:
/ 5 GB
/var 5 GB
/home 20 GB
/mnt/stuff 400 GB
/mnt/music 125 GB
I have separated /var out because stuff gets written there frequently, in particular logfiles, my MySQL database (for Amarok and MythTV), and the pacman package cache. I wouldn't say this was necessary though and you can keep /var as part of /, in which case I'd recommend using 10 GB for /.
A separate /home partition is useful if you need/want to re-install or change distros. Not that I actually do this now, but I still think it is good practise to keep it seperate.
/mnt/stuff is mainly for my MythTV recordings.
/mnt/music is for my music collection.
I'd suggest at least having a 10 GB / and maybe then allocate the rest for /home if you are happy with keeping all your files in your home dir.
Offline
I also have two fairly large hd's, both are 250g's. I decided to utilize two separate arch64 installs. The main install being on the primary hd and the 2nd install on the 2nd hd which is basically a arch64 base install with minimal gui stuff and wm, including a chroot arch32 environment for the stuff that 64bit can't deal with yet. I partitioned both hd's exactly the same with a seperate /home partition containing most of the disk space. I added the home dir partition of the 2nd install to my fstab of my primary install to use for storage or whatever so it's auto mounted at boot. That's where I keep all my music. I have over 90 gigs of music. Considering the size of the drives, I'm not missing the extra space the base install is using on the 2nd hd, and it's very handy to be able to boot the 2nd hd in case of emergencies. I use the arch32 chroot environment on the 2nd hd for running 32bit stuff on my primary install. If I want to update my 2nd install, or the 32bit environment, i just chroot from my primary. For me, at least for a desktop system, this seemed like the best way to utilize most of the disk space while being able to recover from a major problem if i needed to. But just in case I totally screw things up, I back up everything to a usb hd, and keep a live cd handy. I use to have a raid set up with lvm, but it made my system seem so sluggish compared to how it runs now. Anyway having more than one hd sure gives you a lot of options!
-- archlinux 是一个极好的 linux。
Offline
This may be slightly off topic but nevertheless very useful. I found an article in TUX magazine by Nicholas Petreley that describes installing multiple distros on the same machine.
---for there is nothing either good or bad, but only thinking makes it so....
Hamlet, W Shakespeare
Offline
Thanks everybody! Everything is installed and configured to my satisfaction!
Offline
Pages: 1