lvm issues: trouble adding HDDs
I'm attempting to add a HDD to my machine, which is using LVM, to extend the usable drive space.
i have read the howto, and google the heck out of this, to no avail.
most of it has gone off without a hitch, but i think i am missing a step somewhere.
( also, i'm attempting to get acquainted with encrypted lvm, and i'm assuming that this shouldn't make a difference. Please correct me if i am wrong. )
what i have done:
- physically installed the new 60GB hdd
- i formated the disk with fdisk, giving it an ID of linux lvm,
creating one partition the size of the whole disk
- i executed: mkfs -t ext3 /dev/hdb1
- i exetecuted: pvcreate /dev/hdb1
- I added the PV to the VG, bear, by executing: vgextend bear /dev/hdb1
- i am trying to extend my 'home' logical volume,
so, i execute: lvextend -L +59G /dev/bear/home
and i get an error
i also tried: lvextend -L +59G /dev/bear/home /dev/hdb1
both commands return the same error message:
"Extending logical volume home to 162.39 GB
Insufficient suitable allocatable extents for logical volume home: 794 more required"
at this point, i'm at a total loss of what to do.
google, as well as all the forums i normally visit have shared no love.
ok, so, i have just determined that i am retarded.
not that this is something new, its just more proof.
solution is as follow,
hopefully, this will help someone else in the future,
if not myself.
so, just like, when you buy an HDD at the store, and you buy a "60gb" HDD, what you really get is something along the lines of 58Gb or so.
i knew this.
so, to get the right file size, i executed: cat /proc/partitions
and it indicated that hdb1 was 58.6 gb.
so i was trying to execute: vgextend -L +58G /dev/home/bear
and getting errors
so, after playing around a lil, and executing: vgdisplay
i noticed that the "FREE PE / Size " was reporting 55.9Gb
so, i executed the command: vgextend -L +55G /dev/home/bear
and it worked perfectly. ( i tried +56G also, but it bitched )
anyway, i followed it up with: resize2fs
and now, df is reporting that i now have 163 Gb available to use.
feel free to slap me with a herring for my ignorance.
this really seems to be my luck.
i actually break down enough to actually make a new thread,
and 5 minutes after i do, i figure out what the hell the problem is.
i am now a happy camper.
|All times are GMT -5. The time now is 03:03 AM.|