[ale] Extend file system with -r while using lvextend command

Jim Kinney jim.kinney at gmail.com
Mon May 8 11:22:33 EDT 2017


XFS does NOT support shrinking. It supports exabytes of storage and will
happily expand to any size up to it's limit.

Apparently, XFS was designed by/for hoarders. :-)

On May 8, 2017 10:45 AM, "Kyle Brieden" <kyle at txmoose.com> wrote:

> Hey Elliot,
>
> I've been doing it this way for years.  I know for srure that it is safe
> to extend an ext# FS online.  I believe XFS is safe to extend online, as
> well.  The lvextend -r flag just calls "resize2fs" (or tune2fs?  I honestly
> can't recall which it is off hand right now...) for you.  For what it's
> worth, I've extended filesystems while they were being written to this way
> to avoid having a filesystem fill up in the middle of a long-running
> process and breaking the process.
>
> Sizing a filesystem down, on the other hand, should never be done online.
> But extending a filesystem online is typically safe.
>
> I also recently discovered the hard way that either XFS or ZFS (I can't
> recall which, as I use both but very, VERY little) can be extended, but not
> shrunk.  As it, the spec for the FS was actively written to not allow
> shrinking.  Struck me as odd, but I guess there's a logical reason there.
>
> ---
> Very respectfully,
> Kyle Brieden
>
> On 08-05-2017 10:31, Elliot Holden wrote:
>
>> I found out you can extend the filesystem while extending the lvm
>> simultaneously. So it does not have to be in 2 separate commands.
>> Using the -r option or --resizefs with lvextend will do the trick.
>> This way you don't have to unmount the filesystem, extend the
>> filesystem (with xfs_growfs) and then remount the filesystem. Here is
>> the syntax.
>>
>> [elliot at newton ~]$ sudo lvextend -l +100%FREE -r /dev/rhel/home
>>
>>
>> Does any see an issue with doing this type of modification while the
>> filesystem is still mounted? Does anyone know if the filesystem gets
>> unmounted and remounted during this command while using -r ? Just in
>> case some other process is writing to the filesystem at the same time.
>> It's been brought to my attention by a member of my Perl group that
>> you could potentially lose data this way. So I wanted to find out if
>> there are any protections going on in the background while executing
>> this command.
>>
>>
>> Thanks
>>
>>
>> E.
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20170508/7f912182/attachment.html>


More information about the Ale mailing list