Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
more btrfs help, please
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1589

PostPosted: Sat Jan 11, 2020 8:18 am    Post subject: more btrfs help, please Reply with quote

I have worked my way through the handbook up to the chroot, with the next step installing the portage snapshot. That did not proceed as expected.

Code:

# emerge --sync

[...]

rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-qt/qttranslations': Disk quota exceeded
rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-qt/qtvirtualkeyboard': Disk quota exceeded
rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-qt/qtwayland/files': Disk quota exceeded
rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-qt/qtwebchannel': Disk quota exceeded
rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-qt/qtwebengine/files': Disk quota exceeded
rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-qt/qtwebkit/files': Disk quota exceeded
rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-qt/qtwebsockets': Disk quota exceeded
rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-qt/qtwebview': Disk quota exceeded
rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-qt/qtwidgets/files': Disk quota exceeded
rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-qt/qtx11extras': Disk quota exceeded
rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-qt/qtxml': Disk quota exceeded
rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-qt/qtxmlpatterns': Disk quota exceeded
rm: cannot remove '/var/db/repos/gentoo/.tmp-unverified-download-quarantine/dev-ros': Disk quota exceeded
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/portage/util/_async/AsyncFunction.py", line 39, in _run
    result = self.target(*(self.args or []), **(self.kwargs or {}))

[...]

  File "/usr/lib64/python3.6/site-packages/portage/locks.py", line 187, in _lockfile_iteration
    _raise_exc(e)
  File "/usr/lib64/python3.6/site-packages/portage/locks.py", line 181, in _lockfile_iteration
    myfd = os.open(lockfilename, os.O_CREAT|os.O_RDWR, 0o660)
  File "/usr/lib64/python3.6/site-packages/portage/__init__.py", line 246, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 122] Disk quota exceeded: b'/var/lib/gentoo/news/.news-gentoo.unread.portage_lockfile'
emergelog(): [Errno 122] Disk quota exceeded


I have set the /var subvolume to have a 16GB quota (with distfiles in a SEPARATE 16GB subvolume, but I have downloaded exactly none of those yet). The portage tree only takes up about 100MB.

Code:

# btrfs subvolume list -agtu /mnt/gentoo/
ID      gen     top level       uuid    path
--      ---     ---------       ----    ----

[...]

260     130     5               ********-****-****-****-************    <FS_TREE>/var

[...]


# btrfs qgroup show -er /mnt/gentoo/
qgroupid         rfer         excl     max_rfer     max_excl
--------         ----         ----     --------     --------

[...]

0/260        93.41MiB     93.41MiB     16.00GiB         none

[...]



What went wrong? I have read some complaints about btrfs thinking that a filesystem had filled up when it still had space available, but nothing like this. Is btrfs really that fragile? I have become afraid that every time I try to do something it will croak for one reason or another.
Back to top
View user's profile Send private message
Banana
Guru
Guru


Joined: 21 May 2004
Posts: 434
Location: Germany

PostPosted: Sat Jan 11, 2020 10:14 am    Post subject: Reply with quote

Hello curmudgeon.

What does a
Code:
df -h
outside and inside the chroot say?
_________________
My personal space
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1589

PostPosted: Sat Jan 11, 2020 12:46 pm    Post subject: Reply with quote

Banana wrote:
What does a
Code:
df -h
outside and inside the chroot say?


I can answer that. :)

Outside:

Code:

# df -h
Filesystem          Size  Used Avail Use% Mounted on
udev                 10M  4.0K   10M   1% /dev
/dev/sdb1           2.2G  2.2G     0 100% /mnt/cdrom
tmpfs               7.8G  1.1G  6.8G  14% /.unions/memory
aufs                7.8G  1.1G  6.8G  14% /
/dev/loop0          2.0G  2.0G     0 100% /mnt/livecd
none                7.8G   20K  7.8G   1% /mnt/aufs-rw-branch
tmpfs               1.6G  1.1M  1.6G   1% /run
shm                 7.8G     0  7.8G   0% /dev/shm
cgroup_root          10M     0   10M   0% /sys/fs/cgroup
vartmp              7.8G     0  7.8G   0% /var/tmp
tmp                 7.8G  203M  7.6G   3% /tmp
/dev/mapper/gentoo  466G   18G  447G   4% /mnt/gentoo
/dev/mapper/gentoo  466G   18G  447G   4% /mnt/gentoo/swap
/dev/mapper/gentoo  466G   18G  447G   4% /mnt/gentoo/usr/local
/dev/mapper/gentoo  466G   18G  447G   4% /mnt/gentoo/var
/dev/mapper/gentoo  466G   18G  447G   4% /mnt/gentoo/tmp
/dev/mapper/gentoo  466G   18G  447G   4% /mnt/gentoo/home
/dev/mapper/gentoo  466G   18G  447G   4% /mnt/gentoo/var/cache/distfiles


Inside:

Code:

# df -h
Filesystem          Size  Used Avail Use% Mounted on
/dev/mapper/gentoo  466G   18G  447G   4% /
/dev/mapper/gentoo  466G   18G  447G   4% /swap
/dev/mapper/gentoo  466G   18G  447G   4% /usr/local
/dev/mapper/gentoo  466G   18G  447G   4% /var
/dev/mapper/gentoo  466G   18G  447G   4% /tmp
/dev/mapper/gentoo  466G   18G  447G   4% /home
/dev/mapper/gentoo  466G   18G  447G   4% /var/cache/distfiles
udev                 10M  4.0K   10M   1% /dev
shm                 7.8G     0  7.8G   0% /dev/shm
cgroup_root          10M     0   10M   0% /sys/fs/cgroup
Back to top
View user's profile Send private message
Gatak
Apprentice
Apprentice


Joined: 04 Jan 2004
Posts: 168

PostPosted: Sat Jan 11, 2020 12:48 pm    Post subject: Reply with quote

I would not recommend using quotas, especially if you plan to use snapshots. It can make some operations (like balance) very slow. Do you need quotas?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6480

PostPosted: Sat Jan 11, 2020 1:21 pm    Post subject: Reply with quote

It looks like the quota is counting the entire partition usage toward the limit, which sounds like a bug. Either way you'll have to turn it off for now.

It doesn't surprise me this stuff is untested, this is the first time in 15+ years I've heard of anyone actually using disk quotas.
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1589

PostPosted: Sat Jan 11, 2020 1:40 pm    Post subject: Reply with quote

Gatak wrote:
I would not recommend using quotas, especially if you plan to use snapshots. It can make some operations (like balance) very slow. Do you need quotas?


I have no plans to use snapshots. I put quotas in since (as recommended by many of the guides I have seen) I elected to use subvolumes in lieu of multiple partitions, and I want to limit the total space (particularly of /var and /tmp - not to mention swap, of course) used per subvolume. The segregation also helps with backups (side question dos the --one-file-system option in tar avoid going into btrfs subvolumes when creating an archive?).
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6480

PostPosted: Sat Jan 11, 2020 2:08 pm    Post subject: Reply with quote

The `mountpoint` command sees them as separate filesystems, so it's likely tar will too.
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3768
Location: Hamburg

PostPosted: Sat Jan 11, 2020 3:20 pm    Post subject: Re: more btrfs help, please Reply with quote

curmudgeon wrote:
What went wrong? I have read some complaints about btrfs thinking that a filesystem had filled up when it still had space available
Especially 5.4.3 suffers from a bug of this kind (df -h shows 0 bytes). Not sure whether this is solved now in 5.4.x
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1589

PostPosted: Sat Jan 11, 2020 8:00 pm    Post subject: Re: more btrfs help, please Reply with quote

toralf wrote:
Especially 5.4.3 suffers from a bug of this kind (df -h shows 0 bytes). Not sure whether this is solved now in 5.4.x


I have drug out my trusty Gentoo live DVD (which probably needs a refresh) for the install. The uname command reports the kernel as "4.5.2-aufs-r1."
Back to top
View user's profile Send private message
Gatak
Apprentice
Apprentice


Joined: 04 Jan 2004
Posts: 168

PostPosted: Sun Jan 12, 2020 10:26 am    Post subject: Reply with quote

curmudgeon wrote:
Gatak wrote:
I would not recommend using quotas, especially if you plan to use snapshots. It can make some operations (like balance) very slow. Do you need quotas?


I have no plans to use snapshots. I put quotas in since (as recommended by many of the guides I have seen) I elected to use subvolumes in lieu of multiple partitions, and I want to limit the total space (particularly of /var and /tmp - not to mention swap, of course) used per subvolume. The segregation also helps with backups (side question dos the --one-file-system option in tar avoid going into btrfs subvolumes when creating an archive?).


qgroups wont help with the segregation (--one-file-system option), but the subvols will. It is a very good use for subvols. also snapshots are excellent as temporary backups. i.e. make one before an update and restore if things go bad.

I suggest you disable quotas. It is most likely not needed. I do not think any official guide would recommend them either.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum