Difference between revisions of "Talk:AddExtraHardDisk"

From SME Server
Jump to navigationJump to search
m
Line 13: Line 13:
  
 
Doesn't the CONSOLE > MANAGE DISK REDUNDANCY already take care of this automatically? If so, I don't know why this HOWTO is needed. http://wiki.contribs.org/Raid#Adding_another_Hard_Drive_Later
 
Doesn't the CONSOLE > MANAGE DISK REDUNDANCY already take care of this automatically? If so, I don't know why this HOWTO is needed. http://wiki.contribs.org/Raid#Adding_another_Hard_Drive_Later
 +
 +
== Another Option ==
 +
 +
Not recommended way as if you loose the drive you loose your system but you are in a world of hurt following these instructions and loose the drive as well.  In all of these commands you would replace {drive} with the device you are working with (hda,hdc,sda,sdb,etc).
 +
 +
fdisk /dev/{drive}
 +
 +
Do the n,p,1 stuff.  Then do T (change partition type), 1 (partition 1), 8e (Linux LVM).  You can then write and save the partion.
 +
 +
Instead of formatting the drive do the following:
 +
 +
pvcreate /dev/{drive}1
 +
 +
The 1 at the end specifies the partition you created in fdisk.
 +
 +
Add the new partition to the volume group with:
 +
 +
vgextend main /dev/{drive}1
 +
 +
And check that you have new available space (it should show total size and free space):
 +
 +
vgs
 +
 +
Increase the root logical volume with:
 +
 +
lvresize -L +{space available} main/root
 +
 +
And finally increase the filesystem with:
 +
 +
ext2online -C0 /dev/main/root
 +
 +
Also see [http://wiki.contribs.org/Raid#Upgrading_the_Hard_Drive_Size Upgrading the Hard Drive Size] in the Raid article.  The lvresize and ext2online commands can be used to take advantage of all of the available space.
 +
 +
By following these instructions you aren't just limiting space to a specific mount point/ibay but make it available to the entire system.  You also don't have to mess with or tweak quotas.  The space just becomes available.
 +
 +
If you are using a clean drive that is new to the system you shouldn't have to reboot or telinit 1 either.

Revision as of 16:22, 17 August 2007

1. It might be useful to make a shorter, more printer-friendly version. Maybe as pdf?

2. Another suggestion is to replace the names bigdisk, mp3 and hdc1 with variables that the user can change to fit their situation.
These variables will then change the later paths automatically.
I think that would increase the success-rate when using it.

3. Maybe combine suggestion 1 and 2, so the printable version show the customized paths? Would that be doable? How?

4. Is it really necessary to go to runlevel 1 (with telinit 1)?
It's a petty that I can't do these actions thru an ssh-client (copy and paste-ability).

/Per

Doesn't the CONSOLE > MANAGE DISK REDUNDANCY already take care of this automatically? If so, I don't know why this HOWTO is needed. http://wiki.contribs.org/Raid#Adding_another_Hard_Drive_Later

Another Option

Not recommended way as if you loose the drive you loose your system but you are in a world of hurt following these instructions and loose the drive as well. In all of these commands you would replace {drive} with the device you are working with (hda,hdc,sda,sdb,etc).

fdisk /dev/{drive}

Do the n,p,1 stuff. Then do T (change partition type), 1 (partition 1), 8e (Linux LVM). You can then write and save the partion.

Instead of formatting the drive do the following:

pvcreate /dev/{drive}1

The 1 at the end specifies the partition you created in fdisk.

Add the new partition to the volume group with:

vgextend main /dev/{drive}1

And check that you have new available space (it should show total size and free space):

vgs

Increase the root logical volume with:

lvresize -L +{space available} main/root

And finally increase the filesystem with:

ext2online -C0 /dev/main/root

Also see Upgrading the Hard Drive Size in the Raid article. The lvresize and ext2online commands can be used to take advantage of all of the available space.

By following these instructions you aren't just limiting space to a specific mount point/ibay but make it available to the entire system. You also don't have to mess with or tweak quotas. The space just becomes available.

If you are using a clean drive that is new to the system you shouldn't have to reboot or telinit 1 either.