Re: BTRFS: could not find root 8

2015-12-24 Thread Hugo Mills
On Thu, Dec 24, 2015 at 10:04:48AM +0100, Swâmi Petaramesh wrote:
> Hi there,
> 
> I’m running Arch Linux with kernel 4.2.5-1-ARCH
> 
> Since a few days, I have noticed a series of messages :
> 
> « BTRFS: could not find root 8 »
> 
> During boot.

   systemd is now probing for qgroups on startup. The message is
simply indicating that qgroups are not enabled on the FS. It's harmless.

   Hugo.

> Besides that, the system behaves normally, and I have no clue…
> 
> Here is an extract of the relevant parts of my dmesg :
> 
> [1.515764] Btrfs loaded
> [1.516239] BTRFS: device label BOOT devid 1 transid 8557 /dev/sda8
> [1.523135] device-mapper: uevent: version 1.0.3
> …
> [   20.639556] BTRFS: device label LINUX devid 1 transid 474967 /dev/dm-1
> [   20.952280] PM: Starting manual resume from disk
> [   20.952291] PM: Hibernation image partition 254:2 present
> [   20.952295] PM: Looking for hibernation image.
> [   20.952730] PM: Image not found (code -22)
> [   20.952738] PM: Hibernation image not present or could not be loaded.
> [   20.979997] BTRFS info (device dm-1): use ssd allocation scheme
> [   20.980008] BTRFS info (device dm-1): turning on discard
> [   20.980014] BTRFS info (device dm-1): disk space caching is enabled
> [   20.980017] BTRFS: has skinny extents
> [   21.319036] ip_tables: (C) 2000-2006 Netfilter Core Team
> …
> [   23.047601] FS-Cache: Loaded
> [   23.053089] systemd[1]: Mounted POSIX Message Queue File System.
> [   23.070842] systemd[1]: Mounted Huge Pages File System.
> [   23.072100] systemd[1]: Mounted Temporary Directory.
> [   23.080089] BTRFS info (device dm-1): disk space caching is enabled
> [   23.087653] systemd[1]: Started Remount Root and Kernel File Systems.
> …
> [   25.429686] BTRFS info (device sda8): use ssd allocation scheme
> [   25.429694] BTRFS info (device sda8): turning on discard
> [   25.429698] BTRFS info (device sda8): disk space caching is enabled
> [   25.429700] BTRFS: has skinny extents
> …
> [   25.593769] Adding 4530172k swap on /dev/mapper/VGZ-SWAP.  Priority:-1 
> extents:1 across:4530172k SSDscFS
> …
> [   25.777378] FAT-fs (sda2): utf8 is not a recommended IO charset for FAT 
> filesystems, filesystem will be case sensitive!
> [   25.800485] FAT-fs (sda2): Volume was not properly unmounted. Some data 
> may 
> be corrupt. Please run fsck.
> [   25.817125] BTRFS: could not find root 8
> [   25.844334] BTRFS: could not find root 8
> [   25.845650] BTRFS: could not find root 8
> [   25.847190] BTRFS: could not find root 8
> [   25.855431] BTRFS: could not find root 8
> [   25.856834] BTRFS: could not find root 8
> [   25.860539] BTRFS: could not find root 8
> [   25.862021] BTRFS: could not find root 8
> [   29.778795] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
> …
> 
> TIA, kind regards.
> 

-- 
Hugo Mills | I am an opera lover from planet Zog. Take me to your
hugo@... carfax.org.uk | lieder.
http://carfax.org.uk/  |
PGP: E2AB1DE4  |


signature.asc
Description: Digital signature


Re: BTRFS: could not find root 8

2015-12-24 Thread Swâmi Petaramesh
Le jeudi 24 décembre 2015, 10:29:02 CET Hugo Mills a écrit :
>
>systemd is now probing for qgroups on startup. The message is
> simply indicating that qgroups are not enabled on the FS. It's harmless.

Thanks Hugo. Then it’s harmless but worrying at 1st sight ;-)

Kind regards.

-- 
Swâmi Petaramesh  http://petaramesh.org PGP 9076E32E

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: BTRFS: could not find root 8

2015-11-29 Thread Goffredo Baroncelli
On 2015-11-27 23:51, Chris Murphy wrote:
> But from github I'm not finding any indication that systemd enables
> quota. This issue suggests that quota disabled is tolerated.
> https://github.com/systemd/systemd/issues/1809

Looking at the systemd source, it seems that it could enable quota when playing 
with the "machine":


See src/shared/machine-pool.c:

int setup_machine_directory(uint64_t size, sd_bus_error *error) {
_cleanup_release_lock_file_ LockFile lock_file = LOCK_FILE_INIT;
struct loop_info64 info = {
.lo_flags = LO_FLAGS_AUTOCLEAR,
[...]
r = check_btrfs();
if (r < 0)
return sd_bus_error_set_errnof(error, r, "Failed to determine 
whether /var/lib/machines is located on btrfs: %m");
if (r > 0) {
(void) btrfs_subvol_make_label("/var/lib/machines");

r = btrfs_quota_enable("/var/lib/machines", true);
[...]

But I was unable to understand if:
- enabling quota is a "per filesystem" attribute or per "subvolume attribute"
- when systemd invokes setup_machine_directory()

Does someone have more information ?

BR


-- 
gpg @keyserver.linux.it: Goffredo Baroncelli 
Key fingerprint BBF5 1610 0B64 DAC6 5F7D  17B2 0EDA 9B37 8B82 E0B5
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: BTRFS: could not find root 8

2015-11-29 Thread Qu Wenruo



Goffredo Baroncelli wrote on 2015/11/29 15:07 +0100:

On 2015-11-27 23:51, Chris Murphy wrote:

But from github I'm not finding any indication that systemd enables
quota. This issue suggests that quota disabled is tolerated.
https://github.com/systemd/systemd/issues/1809


Looking at the systemd source, it seems that it could enable quota when playing with the 
"machine":


See src/shared/machine-pool.c:

int setup_machine_directory(uint64_t size, sd_bus_error *error) {
 _cleanup_release_lock_file_ LockFile lock_file = LOCK_FILE_INIT;
 struct loop_info64 info = {
 .lo_flags = LO_FLAGS_AUTOCLEAR,
[...]
 r = check_btrfs();
 if (r < 0)
 return sd_bus_error_set_errnof(error, r, "Failed to determine 
whether /var/lib/machines is located on btrfs: %m");
 if (r > 0) {
 (void) btrfs_subvol_make_label("/var/lib/machines");

 r = btrfs_quota_enable("/var/lib/machines", true);
[...]

But I was unable to understand if:
- enabling quota is a "per filesystem" attribute or per "subvolume attribute"


Not a systemd dev, so I can only answer this one.

Btrfs quota is a "per filesystem" attribute.
Yeah, it's filesystem level.



And the root reason for the "could not find root" error message is,
btrfs doesn't have a good enough ioctl API for btrfs qgroup.

Currently, btrfs already has several IOCTLs, but only covers the 
following operations:

1) Enable/disable quota -> IOC_QUOTA_CTL
2) Rescan and rescan status -> IOC_QUOTA_RESCAN* (3 ioctls)
3) Qgroup create/remove/assign -> IOC_QGROUP_* (3 ioctls)

It does *NOT* include the most used operation, show qgroup accounting.

And "btrfs qgroup show" commands uses the generic tree search facility 
to manually get needed qgroup info.


Unfortunately, generic tree search will output such error if one is 
searching for a non-exist tree.



So the result is, either we find a good idea to create a dedicated 
qgroup ioctl(either new ioctl number or integrate it into existing one), 
or just ignore the error message.


Thanks,
Qu



- when systemd invokes setup_machine_directory()

Does someone have more information ?

BR





--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: BTRFS: could not find root 8

2015-11-28 Thread Imran Geriskovan
>>> After upgrading from systemd227 to 228
>>> these messages began to show up during boot:
>>> [   24.652118] BTRFS: could not find root 8
>>> [   24.664742] BTRFS: could not find root 8

> b. For the OP, is it possible quotas was ever enabled on this file system?

Quotas have never been enabled since creation of this fs.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: BTRFS: could not find root 8

2015-11-28 Thread Chris Murphy
On Sat, Nov 28, 2015 at 2:40 AM, Imran Geriskovan
 wrote:
 After upgrading from systemd227 to 228
 these messages began to show up during boot:
 [   24.652118] BTRFS: could not find root 8
 [   24.664742] BTRFS: could not find root 8
>
>> b. For the OP, is it possible quotas was ever enabled on this file system?
>
> Quotas have never been enabled since creation of this fs.


OK so we need some clarification on whether "could not find root 8" is
telling us systemd was looking to leverage already enabled quotas but can't
because they're not enabled; or if it's enabled them. I'd be surprised if
it's enabling quotas.

And also how to determine, from user space, whether quotas are enabled.

In the meantime, OP, does this message happen every boot? Or is it onetime?
If every boot, you could add boot parameter systemd.log_level=debug and
then look just above the "could not find..." message what systemd is doing
just prior.

--
Chris Murphy
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: BTRFS: could not find root 8

2015-11-28 Thread Chris Murphy
On a btrfs that has never had quota enabled:

# btrfs qgroup show /

Results in kernel message:
[  378.103836] BTRFS: could not find root 8


Each time I issue the same command, I get another "could not find..."
message. This is rather indirect, but probably means quotas aren't
enabled, and I'd expect you get this message every boot, and that it
can be ignored.


--
Chris Murphy
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: BTRFS: could not find root 8

2015-11-28 Thread Imran Geriskovan
It's on every boot.
With systemd.log_level=debug boot parameter appended,
I could not find any meaningful operation just before the message.
The systemd journal boot dump will be in your personal mailbox shortly.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: BTRFS: could not find root 8

2015-11-27 Thread Hugo Mills
On Fri, Nov 27, 2015 at 10:33:29PM +0200, Imran Geriskovan wrote:
> After upgrading from systemd227 to 228
> these messages began to show up during boot:
> 
> [   24.652118] BTRFS: could not find root 8
> [   24.664742] BTRFS: could not find root 8
> 
> Are they important?

   That's the quota tree. I don't know exactly what's happening, but
possibly systemd is now enabling qgroups for its own purposes, and
what you're seeing is simply the qgroups being enabled for the first
time?

   Hugo.

-- 
Hugo Mills | Great oxymorons of the world, no. 8:
hugo@... carfax.org.uk | The Latest In Proven Technology
http://carfax.org.uk/  |
PGP: E2AB1DE4  |


signature.asc
Description: Digital signature


Re: BTRFS: could not find root 8

2015-11-27 Thread Chris Murphy
On Fri, Nov 27, 2015 at 1:43 PM, Hugo Mills  wrote:
> On Fri, Nov 27, 2015 at 10:33:29PM +0200, Imran Geriskovan wrote:
>> After upgrading from systemd227 to 228
>> these messages began to show up during boot:
>>
>> [   24.652118] BTRFS: could not find root 8
>> [   24.664742] BTRFS: could not find root 8
>>
>> Are they important?
>
>That's the quota tree. I don't know exactly what's happening, but
> possibly systemd is now enabling qgroups for its own purposes, and
> what you're seeing is simply the qgroups being enabled for the first
> time?

I'm seeing a feature in systemd 228, "systemd-tmpfiles learned two new
line types “q” and “Q” that operate like “v”, but also set up a basic
btrfs quota hierarchy when used on a btrfs file system with quota
enabled."
https://lukevizzicks.co.uk/systemd-228-system-and-service-manager-released/

But from github I'm not finding any indication that systemd enables
quota. This issue suggests that quota disabled is tolerated.
https://github.com/systemd/systemd/issues/1809

Questions:
a. Quotas seem to be sufficiently in-flux, and with two (?) deprecated
methods, and one new implementation that I don't think it's OK for
anything to enable it by default. Are there different opinions on
this?
b. For the OP, is it possible quotas was ever enabled on this file system?
c. How can we determine if quotas are enabled on Btrfs? I don't see a
command within btrfs-quota to determine quota status.



-- 
Chris Murphy
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: BTRFS: could not find root 8

2015-11-27 Thread Duncan
Chris Murphy posted on Fri, 27 Nov 2015 15:51:03 -0700 as excerpted:

> On Fri, Nov 27, 2015 at 1:43 PM, Hugo Mills  wrote:
>> On Fri, Nov 27, 2015 at 10:33:29PM +0200, Imran Geriskovan wrote:
>>> After upgrading from systemd227 to 228 these messages began to show up
>>> during boot:
>>>
>>> [   24.652118] BTRFS: could not find root 8
>>> [   24.664742] BTRFS: could not find root 8
>>>
>>> Are they important?
>>
>>That's the quota tree. I don't know exactly what's happening, but
>> possibly systemd is now enabling qgroups for its own purposes, and what
>> you're seeing is simply the qgroups being enabled for the first time?
> 
> I'm seeing a feature in systemd 228, "systemd-tmpfiles learned two new
> line types “q” and “Q” that operate like “v”, but also set up a basic
> btrfs quota hierarchy when used on a btrfs file system with quota
> enabled."
> https://lukevizzicks.co.uk/systemd-228-system-and-service-manager-released/
> 
> But from github I'm not finding any indication that systemd enables
> quota. This issue suggests that quota disabled is tolerated.
> https://github.com/systemd/systemd/issues/1809
> 
> Questions:
> a. Quotas seem to be sufficiently in-flux, and with two (?) deprecated
> methods, and one new implementation that I don't think it's OK for
> anything to enable it by default. Are there different opinions on this?

Definitely no different here.  As with raid56 mode, I'd want quotas to
be stable, with no bugs reported for two kernel cycles minimum, before
I'd consider recommending them.  Since we had quota bugs in 4.3, that
means 4.5 at the earliest, and presumably the LTS after that for those
not keeping current, altho if the quota fixes are backported to LTS
when finally stable then possibly 4.4 and 4.1... after the backports,
of course.

Let's hope systemd's not auto-enabling quotas, but I'd not be surprised
if they are, despite intentions to the contrary, given the problems I
had when they first added the tmpfiles.d v=subvolume support, in 218
IIRC.  The fixes only made it into 221, tho patches were available on
the bug I filed (during 219) against 220.

I'm on 226 (gentoo's 226-r1) ATM.  I probably won't go out of my way to
grab newer just to test this, but if 228 appears unmasked to ~amd64 in
the gentoo tree, I'll upgrade and be on the lookout for this thanks to
this thread.  I know for sure I've never enabled quotas here, so if I
see that in dmesg, I'll be pretty irritated at systemd, and will be
either ccing a bug if already filed or filing my own ASAP, as well as
creating my own patch to disable the q/Q in its shipped tmpfiles.d
config in the mean time.

> b. For the OP, is it possible quotas was ever enabled on this file
> system?
> c. How can we determine if quotas are enabled on Btrfs? I don't see a
> command within btrfs-quota to determine quota status.

Very good question. =:^)


-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html