linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Help: Mount point does not report full size of LV.
@ 2007-02-28 16:10 Nick Gyma
  2007-02-28 16:34 ` Bryn M. Reeves
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Gyma @ 2007-02-28 16:10 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1889 bytes --]

Hey all, linux n00b here runing ubuntu:

I added a 3rd hdd to my system today and tried to extend the logical volume
i currently had with the new added space. it was previously a windows NTFS
disk (formatted clean before transfer). after going through the steps it all
displays properly under "vgdisplay -v" but when i actually go and check the
mount point folder size it is still the same as before and has not increased
along w/ the volume group and logical volume.

I've tried to remove the hdd from the VG to try and redo it but i get errors
when trying to use "vgreduce" to remove the PV, saying "physical volume
"dev/hdd1" still in use", even after running a "pvmove" command which
resulted in "no extents avail for allocation".

Here's what I did wrong in setting it up, even though it displays correct:

I first ran fdisk on /dev/hdd1, the partition, instead of the whole disk
/dev/hdd (first mistake). I created a partition, sized it to take the full
space, changed it to 8e, which gave me /dev/hdd1p1. which i really didn't
want, but it happened anyway.

I then did a pvcreate /dev/hdd1, not hdd1p1, then did "vgextend VGforMyth
/dev/hdd1" then did "lvextend --size +79.3G /dev/VGforMyth/video"

Somewhere along the way i realized what i was doing wrong and went back and
fdisk'ed /dev/hdd to remove the two partitions (hdd1, hdd1p1) and create a
new correct partition /dev/hdd1 set to 8e and extending the entire disk.
Now, /dev/hdd1 was still part of the VG while "fixing" the issue. I'm
guessing doing all that screwed it up somewhere along the way.

Is there a way to fix the LV as it is so that the mount point
/home/nick/video is correct? or should i wipe it all out and start over? if
so, how do i go about doing that? do i delete all data on the LV then do a
vgremove then fdisk everything, deleting all partitions and start over?

Thanks in advance for your help!
-Nick

[-- Attachment #2: Type: text/html, Size: 2169 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-lvm] Help: Mount point does not report full size of LV.
  2007-02-28 16:10 [linux-lvm] Help: Mount point does not report full size of LV Nick Gyma
@ 2007-02-28 16:34 ` Bryn M. Reeves
  0 siblings, 0 replies; 6+ messages in thread
From: Bryn M. Reeves @ 2007-02-28 16:34 UTC (permalink / raw)
  To: LVM general discussion and development

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nick Gyma wrote:
> Hey all, linux n00b here runing ubuntu:
> 
> I added a 3rd hdd to my system today and tried to extend the logical
> volume i currently had with the new added space. it was previously a
> windows NTFS disk (formatted clean before transfer). after going through
> the steps it all displays properly under "vgdisplay -v" but when i
> actually go and check the mount point folder size it is still the same
> as before and has not increased along w/ the volume group and logical
> volume.

Sounds like you just need to tell the file system to grow into the new
space - lvresize or lvextend *only* affect the block device (logical
volume).

> I've tried to remove the hdd from the VG to try and redo it but i get
> errors when trying to use "vgreduce" to remove the PV, saying "physical
> volume "dev/hdd1" still in use", even after running a "pvmove" command
> which resulted in "no extents avail for allocation".

Careful with that! Although in this case it should be safe, reducing a
block device with a file system on it is potentially risky - if you get
the size wrong, you can chop the end off & loose data.

> Is there a way to fix the LV as it is so that the mount point
> /home/nick/video is correct? or should i wipe it all out and start over?
> if so, how do i go about doing that? do i delete all data on the LV then
> do a vgremove then fdisk everything, deleting all partitions and start
> over?

By the sound of it, the lvextend worked - does lvdisplay show the
correct (new) size for the logical volume?

If it does, you now need to resize the file system it contains. Since
this was NTFS, you'll need to use the ntfsresize tool for this:

http://man.linux-ntfs.org/ntfsresize.8.html

To grow the fs to fit the new device size, you just need to do:

# ntfsresize /path/to/lv

Note that the file system must be unmounted for this step.

Your distribution may provide ntfsresize with the tools to work with
NTFS file systems. If not, you can use a rescue CD that includes it.
I've had good results with systemrescuecd in the past:

http://www.sysresccd.org/Main_Page

Kind regards,

Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFF5a8c6YSQoMYUY94RAvdRAKChQnXulqXqG4Ip6UnfPFazxIjTBgCgnvLN
UzyLOYQjLCx8PY7IcTXp2sc=
=9XDs
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-lvm] Help: Mount point does not report full size of LV.
@ 2007-02-28 18:07 Nick Gyma
  2007-02-28 18:12 ` Bryn M. Reeves
  2007-02-28 18:43 ` Matt P
  0 siblings, 2 replies; 6+ messages in thread
From: Nick Gyma @ 2007-02-28 18:07 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1356 bytes --]

 Thanks for the reply.  The other two disks are file system ext3.  Is it
possible to change this 3rd disk to be ext3 as well from the current state
i'm in?  and then resize to fill?

Thanks for helping.  here are the results of vgdisplay:  (the 208.31GB is
correct)

nick@ubuntu:~$ sudo vgdisplay -v
Finding all volume groups
Finding volume group "VGforMyth"
--- Volume group ---
VG Name VGforMyth
System ID
Format lvm2
Metadata Areas 3
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 3
Act PV 3
VG Size 208.31 GB
PE Size 64.00 MB
Total PE 3333
Alloc PE / Size 3333 / 208.31 GB
Free PE / Size 0 / 0
VG UUID C8kSGQ-rAw1-GmUi-7oKx-zatX-8D1A-bYuK35

--- Logical volume ---
LV Name /dev/VGforMyth/video
VG Name VGforMyth
LV UUID q6mYAL-6r5u-92bK-xeIc-qttc-Zmxk-00e0rS
LV Write Access read/write
LV Status available
# open 0
LV Size 208.31 GB
Current LE 3333
Segments 3
Allocation inherit
Read ahead sectors 0
Block device 253:0

--- Physical volumes ---
PV Name /dev/hda4
PV UUID 9VmJ6M-UxhP-7LRF-SAOE-ix3l-pSWe-a2ueRL
PV Status allocatable
Total PE / Free PE 950 / 0

PV Name /dev/hdb1
PV UUID tCKbgt-nBvc-r8FS-OxEd-u9XW-NiOA-00q0BI
PV Status allocatable
Total PE / Free PE 1192 / 0

PV Name /dev/hdd1
PV UUID KEBtSE-LKcc-l79g-2NSh-6VLQ-HKoG-l0zciX
PV Status allocatable
Total PE / Free PE 1191 / 0

[-- Attachment #2: Type: text/html, Size: 1658 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-lvm] Help: Mount point does not report full size of LV.
  2007-02-28 18:07 Nick Gyma
@ 2007-02-28 18:12 ` Bryn M. Reeves
  2007-02-28 18:43 ` Matt P
  1 sibling, 0 replies; 6+ messages in thread
From: Bryn M. Reeves @ 2007-02-28 18:12 UTC (permalink / raw)
  To: LVM general discussion and development

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nick Gyma wrote:
> Thanks for the reply.  The other two disks are file system ext3.  Is it
> possible to change this 3rd disk to be ext3 as well from the current
> state i'm in?  and then resize to fill?
>  
> Thanks for helping.  here are the results of vgdisplay:  (the 208.31GB
> is correct)
>  

I'm not completely sure what you mean here, but generally if you want to
change a file system type you need to do a full backup of the old file
system then create the new one and restore.

It tends to be that the only "in place" conversion tools are to update
one version of a file system to a later one, e.g. ext2->ext3 or gfs1->gfs2.

Otoh, if the 208.31G is correct for your size you should be ready to
resize the NTFS file system on it.

Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFF5cYO6YSQoMYUY94RAnDEAJ96mrC5ze9RNkiYolW0ZCE1JQ/+kgCeOR2a
hOype56F942Z+/Ajj9va+Wk=
=K+3p
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-lvm] Help: Mount point does not report full size of LV.
  2007-02-28 18:07 Nick Gyma
  2007-02-28 18:12 ` Bryn M. Reeves
@ 2007-02-28 18:43 ` Matt P
  2007-02-28 23:30   ` Nick Gyma
  1 sibling, 1 reply; 6+ messages in thread
From: Matt P @ 2007-02-28 18:43 UTC (permalink / raw)
  To: linux-lvm

To be safe unmount the filesystem you want to grow. Then you'll use
the resize2fs command. From what you've provided so far, and assuming
you want to use all the available space on the LV, the command line
will probably look something like:

resize2fs -p /dev/VGforMyth/video

I'd recommending reading the man page for resize2fs before proceeding.

On 2/28/07, Nick Gyma <nickgyma@gmail.com> wrote:
>
>
> Thanks for the reply.  The other two disks are file system ext3.  Is it possible to change this 3rd disk to be ext3 as well from the current state i'm in?  and then resize to fill?
>
> Thanks for helping.  here are the results of vgdisplay:  (the 208.31GB is correct)
>
> nick@ubuntu:~$ sudo vgdisplay -v
> Finding all volume groups
> Finding volume group "VGforMyth"
> --- Volume group ---
> VG Name VGforMyth
> System ID
> Format lvm2
> Metadata Areas 3
> Metadata Sequence No 5
> VG Access read/write
> VG Status resizable
> MAX LV 0
> Cur LV 1
> Open LV 0
> Max PV 0
> Cur PV 3
> Act PV 3
> VG Size 208.31 GB
> PE Size 64.00 MB
> Total PE 3333
> Alloc PE / Size 3333 / 208.31 GB
> Free PE / Size 0 / 0
> VG UUID C8kSGQ-rAw1-GmUi-7oKx-zatX-8D1A-bYuK35
>
> --- Logical volume ---
> LV Name /dev/VGforMyth/video
> VG Name VGforMyth
> LV UUID q6mYAL-6r5u-92bK-xeIc-qttc-Zmxk-00e0rS
> LV Write Access read/write
> LV Status available
> # open 0
> LV Size 208.31 GB
> Current LE 3333
> Segments 3
> Allocation inherit
> Read ahead sectors 0
> Block device 253:0
>
> --- Physical volumes ---
> PV Name /dev/hda4
> PV UUID 9VmJ6M-UxhP-7LRF-SAOE-ix3l-pSWe-a2ueRL
> PV Status allocatable
> Total PE / Free PE 950 / 0
>
> PV Name /dev/hdb1
> PV UUID tCKbgt-nBvc-r8FS-OxEd-u9XW-NiOA-00q0BI
> PV Status allocatable
> Total PE / Free PE 1192 / 0
>
> PV Name /dev/hdd1
> PV UUID KEBtSE-LKcc-l79g-2NSh-6VLQ-HKoG-l0zciX
> PV Status allocatable
> Total PE / Free PE 1191 / 0
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [linux-lvm] Help: Mount point does not report full size of LV.
  2007-02-28 18:43 ` Matt P
@ 2007-02-28 23:30   ` Nick Gyma
  0 siblings, 0 replies; 6+ messages in thread
From: Nick Gyma @ 2007-02-28 23:30 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 492 bytes --]

you know what.  i think that was the final step i just missed.  funny
because i was following the guide on the mythtv site.
thanks for helping me out guys.

for those following along:
i unmounted the path, it had me run "sudo e2fsck -f /dev/VGforMyth/video"
first, then i ran "sudo resize2fs -p /dev/VGforMyth/video", then remounted
it to /home/nick/video

it now shows up as 194.4GB under the file browser, which i guess is right
even though VGforMyth shows up as 208.31GB?

thanks again...

[-- Attachment #2: Type: text/html, Size: 567 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-03-01  6:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-28 16:10 [linux-lvm] Help: Mount point does not report full size of LV Nick Gyma
2007-02-28 16:34 ` Bryn M. Reeves
  -- strict thread matches above, loose matches on Subject: below --
2007-02-28 18:07 Nick Gyma
2007-02-28 18:12 ` Bryn M. Reeves
2007-02-28 18:43 ` Matt P
2007-02-28 23:30   ` Nick Gyma

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).