Problem replacing drive in existing volgroup
Tod
tod at stthomasepc.org
Sat Apr 7 21:56:48 UTC 2007
Chris Tyler wrote:
> On Sat, 07 Apr 2007 14:02:04 -0400, Tod <tod at stthomasepc.org> wrote:
>> Funny thing is that sfdisk shows:
> (...snip...)
>> Disk /dev/hdd: 77545 cylinders, 16 heads, 63 sectors/track
>>
>> sfdisk: ERROR: sector 0 does not have an msdos signature
>> /dev/hdd: unrecognized partition table type
>> No partitions found
>
> This error is expected, because you used hdd as a whole drive
> (unpartitioned), so there is no partition table present (not a
> problem!). If you had created a partition that spanned all of the
> cylinders on the drive and then used /dev/hdd1 instead of /dev/hdd,
> sfdisk would show that partition. (BTW, sfdisk has some challenges with
> large drives, you may want to use parted/gparted or fdisk)
Is there a way to fix this so it does show up, or should I just leave it
alone?
I used sfdisk -l just to see, I've been using parted to do the heavy
lifting (which incidentally gave me an error because hdd had no label
found).
>
>> Also df -h shows:
>>
>> Filesystem Size Used Avail Use% Mounted on
>> /dev/mapper/VolGroup00-LogVol00
>> 2.0G 1.6G 263M 87% /
>> /dev/hda1 99M 11M 83M 12% /boot
>> tmpfs 236M 0 236M 0% /dev/shm
>>
>> Which seems to reflect the absence of hdb and hdb1's content pvmoved
>> over to hdd.
>
> What it does not show is where the physical volumes (PVs)
> underlying /dev/mapper/VolGroup0-LogVol00 are located -- use the 'pvs'
> command to see the PVs in the VG "VolGroup00".
Ok, cool.
>> Since I didn't see any extra space available I did a:
>>
>> /usr/sbin/lvextend -L -1G /dev/VolGroup00/LogVol00
>>
>> This apparently did nothing.
>
> Assuming that you used +1G instead of -1G (or used an absolute size), it
> would have extended the LV (container) but not the filesystem (inside
> the container). Do a 'resize2fs /dev/VolGroup00/LogVol00' to resize the
> filesystem to match the LV then the space will be usable. (If you're
> shrinking a filesystem, use resize2fs with a size parameter first, then
> reduce the LV size to match -- the rule is that the fs must always be
> equal to or smaller than the LV).
I did, the -1G was a typo. I tried the resize and it worked. So then
if I understand then the method for using more of my new drive I should
just do lvextend, followed by resize2fs.
> Hope this helps--
>
Helped a lot, now I can yum update and reboot :) Thanks.
More information about the fedora-list
mailing list