* How to determine the reserved blocks in xfs filesystem ?
@ 2014-11-18 12:35 Mukul Malhotra
2014-11-18 13:32 ` Brian Foster
2015-08-24 4:44 ` Mukul Malhotra
0 siblings, 2 replies; 7+ messages in thread
From: Mukul Malhotra @ 2014-11-18 12:35 UTC (permalink / raw)
To: xfs
[-- Attachment #1.1: Type: text/plain, Size: 160 bytes --]
Hello,
Does xfs have reserved blocks too, like ext* ? if yes, how can they be
determined ?
Can you provide the specific command.
Thanks
Mukul
[-- Attachment #1.2: Type: text/html, Size: 572 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to determine the reserved blocks in xfs filesystem ?
2014-11-18 12:35 How to determine the reserved blocks in xfs filesystem ? Mukul Malhotra
@ 2014-11-18 13:32 ` Brian Foster
2014-11-18 22:35 ` Dave Chinner
2015-08-24 4:44 ` Mukul Malhotra
1 sibling, 1 reply; 7+ messages in thread
From: Brian Foster @ 2014-11-18 13:32 UTC (permalink / raw)
To: Mukul Malhotra; +Cc: xfs
On Tue, Nov 18, 2014 at 06:05:58PM +0530, Mukul Malhotra wrote:
> Hello,
>
> Does xfs have reserved blocks too, like ext* ? if yes, how can they be
> determined ?
>
XFS reserves blocks internally such that it can perform operations when
all free space is consumed, etc. It looks like 5% is the default.
I don't think it's "like ext4," however, which reserves blocks for the
root user. I don't believe the reserved blocks in XFS are accessible for
file allocation by any user unless the reserve pool is modified as such.
> Can you provide the specific command.
>
The following command can get/set the reserved block count on an active
mount:
xfs_io -x -c "resblks" <mnt>
Note that this can lead to problems if reduced too much and all space is
consumed, as sometimes block allocation is required to perform space
freeing operations (removing a file, etc.). This is probably a reason
the resblks command is only available in xfs_io expert mode. ;)
Brian
> Thanks
> Mukul
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to determine the reserved blocks in xfs filesystem ?
2014-11-18 13:32 ` Brian Foster
@ 2014-11-18 22:35 ` Dave Chinner
2014-11-19 0:19 ` Brian Foster
0 siblings, 1 reply; 7+ messages in thread
From: Dave Chinner @ 2014-11-18 22:35 UTC (permalink / raw)
To: Brian Foster; +Cc: Mukul Malhotra, xfs
On Tue, Nov 18, 2014 at 08:32:07AM -0500, Brian Foster wrote:
> On Tue, Nov 18, 2014 at 06:05:58PM +0530, Mukul Malhotra wrote:
> > Hello,
> >
> > Does xfs have reserved blocks too, like ext* ? if yes, how can they be
> > determined ?
> >
>
> XFS reserves blocks internally such that it can perform operations when
> all free space is consumed, etc. It looks like 5% is the default.
Not quite.
/*
* We default to 5% or 8192 fsbs of space reserved, whichever is
* smaller. This is intended to cover concurrent allocation
* transactions when we initially hit enospc. These each require a 4
* block reservation. Hence by default we cover roughly 2000 concurrent
* allocation reservations.
*/
So, in most cases, there are 32MB of reserved blocks available for
internal emergency use.
> I don't think it's "like ext4," however, which reserves blocks for the
> root user. I don't believe the reserved blocks in XFS are accessible for
> file allocation by any user unless the reserve pool is modified as such.
Most definitely not "like ext4". The reserved blocks are considered
"used space" (i.e. not available to any user) and are reported as
such in statfs() output (e.g. via df).
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to determine the reserved blocks in xfs filesystem ?
2014-11-18 22:35 ` Dave Chinner
@ 2014-11-19 0:19 ` Brian Foster
2014-11-21 16:36 ` Mukul Malhotra
0 siblings, 1 reply; 7+ messages in thread
From: Brian Foster @ 2014-11-19 0:19 UTC (permalink / raw)
To: Dave Chinner; +Cc: Mukul Malhotra, xfs
On Wed, Nov 19, 2014 at 09:35:18AM +1100, Dave Chinner wrote:
> On Tue, Nov 18, 2014 at 08:32:07AM -0500, Brian Foster wrote:
> > On Tue, Nov 18, 2014 at 06:05:58PM +0530, Mukul Malhotra wrote:
> > > Hello,
> > >
> > > Does xfs have reserved blocks too, like ext* ? if yes, how can they be
> > > determined ?
> > >
> >
> > XFS reserves blocks internally such that it can perform operations when
> > all free space is consumed, etc. It looks like 5% is the default.
>
> Not quite.
>
> /*
> * We default to 5% or 8192 fsbs of space reserved, whichever is
> * smaller. This is intended to cover concurrent allocation
> * transactions when we initially hit enospc. These each require a 4
> * block reservation. Hence by default we cover roughly 2000 concurrent
> * allocation reservations.
> */
>
> So, in most cases, there are 32MB of reserved blocks available for
> internal emergency use.
>
Yep, I glossed right over the hard cap... thanks. ;)
Brian
> > I don't think it's "like ext4," however, which reserves blocks for the
> > root user. I don't believe the reserved blocks in XFS are accessible for
> > file allocation by any user unless the reserve pool is modified as such.
>
> Most definitely not "like ext4". The reserved blocks are considered
> "used space" (i.e. not available to any user) and are reported as
> such in statfs() output (e.g. via df).
>
> Cheers,
>
> Dave.
> --
> Dave Chinner
> david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to determine the reserved blocks in xfs filesystem ?
2014-11-19 0:19 ` Brian Foster
@ 2014-11-21 16:36 ` Mukul Malhotra
0 siblings, 0 replies; 7+ messages in thread
From: Mukul Malhotra @ 2014-11-21 16:36 UTC (permalink / raw)
To: Brian Foster; +Cc: xfs
[-- Attachment #1.1: Type: text/plain, Size: 1765 bytes --]
Thanks a lot for the solution.
Mukul
On Wed, Nov 19, 2014 at 5:49 AM, Brian Foster <bfoster@redhat.com> wrote:
> On Wed, Nov 19, 2014 at 09:35:18AM +1100, Dave Chinner wrote:
> > On Tue, Nov 18, 2014 at 08:32:07AM -0500, Brian Foster wrote:
> > > On Tue, Nov 18, 2014 at 06:05:58PM +0530, Mukul Malhotra wrote:
> > > > Hello,
> > > >
> > > > Does xfs have reserved blocks too, like ext* ? if yes, how can they
> be
> > > > determined ?
> > > >
> > >
> > > XFS reserves blocks internally such that it can perform operations when
> > > all free space is consumed, etc. It looks like 5% is the default.
> >
> > Not quite.
> >
> > /*
> > * We default to 5% or 8192 fsbs of space reserved, whichever is
> > * smaller. This is intended to cover concurrent allocation
> > * transactions when we initially hit enospc. These each require
> a 4
> > * block reservation. Hence by default we cover roughly 2000
> concurrent
> > * allocation reservations.
> > */
> >
> > So, in most cases, there are 32MB of reserved blocks available for
> > internal emergency use.
> >
>
> Yep, I glossed right over the hard cap... thanks. ;)
>
> Brian
>
> > > I don't think it's "like ext4," however, which reserves blocks for the
> > > root user. I don't believe the reserved blocks in XFS are accessible
> for
> > > file allocation by any user unless the reserve pool is modified as
> such.
> >
> > Most definitely not "like ext4". The reserved blocks are considered
> > "used space" (i.e. not available to any user) and are reported as
> > such in statfs() output (e.g. via df).
> >
> > Cheers,
> >
> > Dave.
> > --
> > Dave Chinner
> > david@fromorbit.com
>
[-- Attachment #1.2: Type: text/html, Size: 2756 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to determine the reserved blocks in xfs filesystem ?
2014-11-18 12:35 How to determine the reserved blocks in xfs filesystem ? Mukul Malhotra
2014-11-18 13:32 ` Brian Foster
@ 2015-08-24 4:44 ` Mukul Malhotra
2015-08-24 15:08 ` Emmanuel Florac
1 sibling, 1 reply; 7+ messages in thread
From: Mukul Malhotra @ 2015-08-24 4:44 UTC (permalink / raw)
To: xfs
[-- Attachment #1.1: Type: text/plain, Size: 391 bytes --]
Hi,
I have below queries on XFS log device as,
1. After creating a XFS filesystem with an external log device (journal),
is there a way to mount the filesystem if I lose the external log device or
a way to recover files?
2. Is there a way to convert an existing XFS filesystem which has internal
log to external log and vice versa.
Need help on above queries.
Thank You
Mukul Malhotra
[-- Attachment #1.2: Type: text/html, Size: 709 bytes --]
[-- Attachment #2: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: How to determine the reserved blocks in xfs filesystem ?
2015-08-24 4:44 ` Mukul Malhotra
@ 2015-08-24 15:08 ` Emmanuel Florac
0 siblings, 0 replies; 7+ messages in thread
From: Emmanuel Florac @ 2015-08-24 15:08 UTC (permalink / raw)
To: Mukul Malhotra; +Cc: xfs
Le Mon, 24 Aug 2015 10:14:52 +0530
Mukul Malhotra <smilemukul2005@gmail.com> écrivait:
> Hi,
>
> I have below queries on XFS log device as,
>
> 1. After creating a XFS filesystem with an external log device
> (journal), is there a way to mount the filesystem if I lose the
> external log device or a way to recover files?
You can use some other device to hold the log. You could use a ramdisk,
a loop device pointing to some file, etc. No problem as long as you
unmounted the filesystem properly.
> 2. Is there a way to convert an existing XFS filesystem which has
> internal log to external log and vice versa.
>
Apparently no. xfs_growfs should be able to do it, but the man page
states that this function is not implemented.
--
------------------------------------------------------------------------
Emmanuel Florac | Direction technique
| Intellique
| <eflorac@intellique.com>
| +33 1 78 94 84 02
------------------------------------------------------------------------
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-08-24 15:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18 12:35 How to determine the reserved blocks in xfs filesystem ? Mukul Malhotra
2014-11-18 13:32 ` Brian Foster
2014-11-18 22:35 ` Dave Chinner
2014-11-19 0:19 ` Brian Foster
2014-11-21 16:36 ` Mukul Malhotra
2015-08-24 4:44 ` Mukul Malhotra
2015-08-24 15:08 ` Emmanuel Florac
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox