Picked up a drive from DiscounTechnologies which is based here in Hillcrest. The hard part was figuring out the order of commands to work with LVM – the linux volume manager. Its pretty simple once you read the docs. We have heaps of space on pipe1 (for now) and soon we’ll upgrade pipe2, too. Full instructions behind the read more..
- insert the disk. Duh, it won’t work if its not in …
- check that it is ok. This is optional, but easy to do and if you get an i/o error here stop and RMA the drive. If you don’t see any output for a second or two, hit ctrl-c to stop and it will tell you how many bytes read. This is good.
- create a partition on the disk. I just used the whole disk as a single partition
- create a physical volume
- extend the volume group to include the new physical volume
- use display to show the physical volumes or logical volumes. This will also tell you the names that you need to use in the lvextend command
- extend the logical volume to encompass the new disk. If you ask for too much space it will warn you. If you ask for too little, some of the drive will not be used.
- Finally, resize the volume to encomass the new space. You don’t need to unmount for this!
dd if=/dev/sdb of=/dev/null
fdisk /dev/sdb
then create a new primary partition (n), from 1 to the end, and write that to the disk (w)
pvcreate /dev/sdb1
vgextend VolGroup00 /dev/sdb1
pvdisplay
lvdisplay
lvextend -L+279G /dev/VolGroup00/LogVol00
resize2fs /dev/VolGroup00/LogVol00