You are not logged in.

#1 2020-10-29 08:15:55

860lacov
Member
Registered: 2020-05-02
Posts: 452

[SOLVED] Unknown subvolumes on btrfs partitions

I had /, home, /var/cache on 2 separated drives with btrfs partitions.

I wanted to test the possibility of moving everything to one drive.

With subvolume snapshots, btrfs send&recieve, fstab and grub edit I succeed.

But now when I do:

sudo btrfs subvolume list /

I get:

ID 461 gen 2611 top level 5 path @
ID 462 gen 2607 top level 5 path @home
ID 463 gen 2611 top level 5 path @cache
ID 464 gen 1078 top level 461 path var/lib/portables
ID 465 gen 1078 top level 461 path var/lib/machines

I tried to delete them but after reboot they are recreated.

Last edited by 860lacov (2021-02-08 23:11:20)

Offline

#2 2020-10-29 09:14:47

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Unknown subvolumes on btrfs partitions

A google search says that those locations are created by systemd.

Last edited by Ropid (2020-10-29 09:15:15)

Offline

#3 2020-10-29 09:30:55

860lacov
Member
Registered: 2020-05-02
Posts: 452

Re: [SOLVED] Unknown subvolumes on btrfs partitions

I probably should mention that I've been searching for an answer.

I would like to know why they are exist.
As I said I have exact copy of my system

On one copy there are no additional subvolunes and on one there are two mentioned in this thread.
I didn't change anything in system.

Offline

#4 2020-10-29 11:03:47

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Unknown subvolumes on btrfs partitions

Those subvolumes do not exist in your copy because they are a child-subvolume for your "/" subvolume. When you use btrfs send/receive to do your copy, only the subvolume you target is sent. Other nested child subvolumes that exist inside that subvolume don't get sent.

Offline

#5 2020-10-29 11:29:25

860lacov
Member
Registered: 2020-05-02
Posts: 452

Re: [SOLVED] Unknown subvolumes on btrfs partitions

But they are exist in my copy

In my source disk with source subvolumes there are only 3 subvolumes

On my target drive systemd is creating

ID 464 gen 1078 top level 461 path var/lib/portables
ID 465 gen 1078 top level 461 path var/lib/machines

And I have no idea why

But they are exist in my copy

In my source disk with source subvolumes there are only 3 subvolumes

On my target drive systemd is creating

ID 464 gen 1078 top level 461 path var/lib/portables
ID 465 gen 1078 top level 461 path var/lib/machines

And I have no idea why

I checked and in my source subvolume in directory /var/lib there are no subvolumes called portables or machines but there are directories with this names

Last edited by 860lacov (2020-10-29 11:50:32)

Offline

#6 2020-10-29 12:11:40

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Unknown subvolumes on btrfs partitions

You are booting from your copy, right? I think systemd creates those locations at boot when they are missing.

I don't know why they are missing in your source. I don't think systemd removes those locations at shutdown. When I look inside /var/lib, the dates for the "machines" and "portables" locations there are old.

Something else that might be interesting: here for me only the "portables" location is a subvolume. The "machines" location is a directory. Maybe systemd has a behavior where it sometimes replaces the locations with a subvolume and sometimes doesn't?

Offline

#7 2020-10-29 13:17:45

860lacov
Member
Registered: 2020-05-02
Posts: 452

Re: [SOLVED] Unknown subvolumes on btrfs partitions

Ropid wrote:

You are booting from your copy, right? I think systemd creates those locations at boot when they are missing.

I don't know why they are missing in your source. I don't think systemd removes those locations at shutdown. When I look inside /var/lib, the dates for the "machines" and "portables" locations there are old.

Something else that might be interesting: here for me only the "portables" location is a subvolume. The "machines" location is a directory. Maybe systemd has a behavior where it sometimes replaces the locations with a subvolume and sometimes doesn't?

Yes from the copy.

At the source they are not missing just both are the directories and not the subvolumes.
I don't fully understand for what portables and machines are.
Maybe I could just remove subvolumes and create directories...

Offline

#8 2020-10-29 13:20:05

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [SOLVED] Unknown subvolumes on btrfs partitions

I just made an experiment here where I removed "machines" with "sudo rmdir /var/lib/machines" and then I rebooted. The "machines" location was created again at boot and it's now a subvolume, just like it is for you.

Offline

#9 2021-02-08 23:11:08

860lacov
Member
Registered: 2020-05-02
Posts: 452

Re: [SOLVED] Unknown subvolumes on btrfs partitions

After all I deleted those 2 subvolumes and replaced them with regular directories. Everything seems working.

Offline

Board footer

Powered by FluxBB