Disk installation (aka hardware engineer, sysadmin day success)

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..

 

 

  1. insert the disk. Duh, it won’t work if its not in …
  2. 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.
  3. dd if=/dev/sdb of=/dev/null
  4. create a partition on the disk. I just used the whole disk as a single partition
  5. fdisk /dev/sdb     
    then create a new primary partition (n), from 1 to the end, and write that to the disk (w)
  6. create a physical volume
  7. pvcreate /dev/sdb1
  8. extend the volume group to include the new physical volume
  9. vgextend VolGroup00 /dev/sdb1
  10. 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
  11. pvdisplay
    lvdisplay
  12. 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.
  13. lvextend -L+279G /dev/VolGroup00/LogVol00
  14. Finally, resize the volume to encomass the new space. You don’t need to unmount for this!
  15. resize2fs /dev/VolGroup00/LogVol00