A failed powersupply was my excuse to upgrade most of the other internals of the desktop computer too. Some notes on adding a disk to LVM, following Suji's notes from 2007 (all of these require sudo):
(create a primary partition, type "8E" Linux LVM, exit with "w")
mkfs -t ext3 /dev/sdd1 (this will create the file-system. option "-c" which checks for bad sectors is recommended by some, but takes ages to complete)(see comments)
(this will create a physical volume)
will now list all the physical volumes and the newly created one should be visible.
will list the volume groups. On my machine there's one named "datadisk"
vgextend datadisk /dev/sdd1
(this will extend the volume group with the new disk)
vgdisplay -v datadisk
will now display info on the volume group. The new disk should show up in the list of physical volumes.
lvextend -l100%VG /dev/datadisk/data
(this will extend the logical volume so that the new size is 100% of available space in the volume-group)
(this will resize the logical volume. takes a long time to complete with big disks and there is no progress bar/display)
- finally you can check that the mounted volume group is actually re-sized to the new size and has lots of free space:
There is more info in the LVM-HOWTO.
One thought on “Computer upgrade”
just for completeness: you can omit this step:
mkfs -t ext3 /dev/sdd1
This filesystem will be lost as soon as you run
pvcreateanyway. Maybe it was recommended only for the sake of the bad sectors test?
Good luck with the new hardware!