FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 02-05-2011, 10:22 PM
Nikolaus Rath
 
Default Resizing PVs

Sam Sharpe <lists.redhat@samsharpe.net> writes:
> On 5 February 2011 22:15, Nikolaus Rath <Nikolaus@rath.org> wrote:
>> You can shrink a PV, but you will loose the extents that are stored in
>> the space that you have truncated. I don't consider that resizing.
>
> That's interesting. I do consider it resizing... It's not the function
> of the pvresize command to move the LVs around so that it is possible
> to downsize the PV. That's something that the admin must do.

My definition of resizing is shrinking without the need for temporary
additional storage. A partition can be resized by resizing the file
system and then shrinking the partition with fdisk. A logical volume can
be resized the same way. A physical volume can not be resized, you first
need to put the data (extents) somewhere else.

> Yes, so it won't do exactly what you want in one command, so you have
> to do it a different way. I have in the past added a second PV,

In my case that doesn't work. I just created one PV for every harddisk,
I never had the need for additional PVs or partitions until now. Well,
my bad luck I guess.


>> Why so aggressive?
>
> I wasn't being particularly aggressive, but I do actually dislike
> people saying (or abbreviating) "just for the record" when they are
> incorrect or the facts are disputed. The only thing that goes in the
> official record are the facts.

My intention was just to avoid a reply of the form "Then use an USB
stick instead". It's not that I am not able to work around the problems,
I just wanted to clarify that it can be quite a hassle.



Best,

-Nikolaus

--
»Time flies like an arrow, fruit flies like a Banana.«

PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-06-2011, 01:34 PM
Nikolaus Rath
 
Default Resizing PVs

Chris Adams <cmadams@hiwaay.net> writes:
> Once upon a time, Nikolaus Rath <Nikolaus@rath.org> said:
>> You can shrink a PV, but you will loose the extents that are stored in
>> the space that you have truncated. I don't consider that resizing.
>
> Changing the size of something is called resizing.

How would you distinguish between the resizing done by e.g. resize2fs
and the one done by fdisk?


>> Unfortunately, pvmove can only move extends to other PVs but not to a
>> different location in the same PV.
>
> Not true. It isn't as straightforward; you have to know a map of the
> PEs and specify them to the pvmove command like (assuming the
> destination PEs are not in use):
>
> pvmove /dev/sda2:1000-1100 /dev/sda2:100-200

Oh, I didn't know about that. It seems that this thread finally produced
some useful information as well, thanks!


Best,


-Nikolaus

--
»Time flies like an arrow, fruit flies like a Banana.«

PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-06-2011, 03:35 PM
Sam Sharpe
 
Default Resizing PVs

On 6 February 2011 14:34, Nikolaus Rath <Nikolaus@rath.org> wrote:
> Chris Adams <cmadams@hiwaay.net> writes:
>> Once upon a time, Nikolaus Rath <Nikolaus@rath.org> said:
>>> You can shrink a PV, but you will loose the extents that are stored in
>>> the space that you have truncated. I don't consider that resizing.
>>
>> Changing the size of something is called resizing.
>
> How would you distinguish between the resizing done by e.g. resize2fs
> and the one done by fdisk?

fdisk will be resizing a partition or block device. resize2fs resizes
a filesystem.

Those are all you need to reduce the size of a fs on a physical
partition. But if you want to shrink that fs to less than the size of
the current data within it, then you also need to do some work first.

In LVM, you would first need to shrink your FS with resize2fs, then
you need to reduce the LV with lvreduce, then that gives you space in
your VG. You can then use pvresize to reduce the size of the PV and
finally fdisk to reduce the size of the PV's partition. Easy... (

>>> Unfortunately, pvmove can only move extends to other PVs but not to a
>>> different location in the same PV.
>>
>> Not true. *It isn't as straightforward; you have to know a map of the
>> PEs and specify them to the pvmove command like (assuming the
>> destination PEs are not in use):
>>
>> pvmove /dev/sda2:1000-1100 /dev/sda2:100-200
>
> Oh, I didn't know about that. It seems that this thread finally produced
> some useful information as well, thanks!

I didn't know this either. This definitely trumps my way of
temporarily extending the VG with another PV.

--
Sam
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 
Old 02-06-2011, 06:40 PM
Tom H
 
Default Resizing PVs

On Sun, Feb 6, 2011 at 9:34 AM, Nikolaus Rath <Nikolaus@rath.org> wrote:
>
> Oh, I didn't know about that. It seems that this thread finally produced
> some useful information as well, thanks!

What an obnoxious so-called thank you!
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 10:00 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org