I'm running out of disk space on my server, so was going to add a new IDE hard disk. Presumably, each drive like hard disks are listed under the virtual filesystem under /dev. I only have one hard disk in there at the moment and I bascally want to add a new hard disk and only append the new space to /home. However, under /dev where I was expecting just one entry for /dev/sda1, I get sda, sda1 and sda2 which look like SATA drives (which I don't understand). These entries are highlighted in yellow and if I do a "ls -la" I get things like: -
cdrom (in blue) -> sr0 (in yellow)
cdrw (in blue) -> sr0 (in yellow)
floppy (in blue) -> fd0 (in yellow)
How will I know if I've added a new hard disk and how can I identify the devices above in any certainty?
As far as I can tell, the procedure for adding a new disk is: -
1. Add new physical drive (data and power cable)
2. Check to see if the new device appears under /dev (this is one bit I'm unclear about).
3. fdisk the new disk using "fdisk /dev/sda2" or whatever (thats what I need to know too, I guess).
4. Format the Linux partition using "mkfs -t ext3 /dev/sda2".
5. Scan for Linux LVM file-systems which the "vgcreate <groupname> /dev/partition1...or something". Don't understand this bit either really.
6. Create volumes to a specific set with the "pvcreate /dev/partition1" command.
7. Now I should be able to create a logical volume (presumably something like VolGroup01 like I can see under /dev now). Apparently, I should use "lvcreate -L xyM -n <volume> <group>" where xy is the size of the group and <group> is the volume group name (something like VolGroup02?) and <volume> is the name returned from the previous step.
8. Finally, format the logical volume (VolGroup02) with "mkfs -t ext3 /dev/sda2" (again? - didn't I do that already above - wrong order?)
Now, can I mount the new drive and append the space with something like "mount /dev/hda2 /home" and if so, how can I make this automatic?
Anything I've got wrong above. Oh, and sorry for all the questions!