On 12-02-25 09:10 PM, Fahrzin Hemmati wrote:
> btrfs is horrible for small filesystems (like a 5GB drive). df -h says
> you have 967MB available, but btrfs (at least by default) allocates 1GB
> at a time to data/metadata. This means that your 10MB file is too big
> for the current allocation and requires a new data chunk, or another
> 1GB, which you don't have.

So increasing the size of the filesystem should suffice then?  How much
bigger?  10G?  Nope.  still not big enough:

# lvextend -L+1G /dev/rootvol/mint_usr; btrfs fi resize max /usr; df -h /usr
  Extending logical volume mint_usr to 10.00 GiB
  Logical volume mint_usr successfully resized
Resize '/usr' of 'max'
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/rootvol-mint_usr
                       10G  2.8G  6.0G  32% /usr
test ~ # apt-get install -y -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  linux-headers-3.0.0-16-generic
The following NEW packages will be installed:
  linux-headers-3.0.0-16-generic
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
264 not fully installed or removed.
Need to get 0 B/851 kB of archives.
After this operation, 10.8 MB of additional disk space will be used.
(Reading database ... 180246 files and directories currently installed.)
Unpacking linux-headers-3.0.0-16-generic (from 
.../linux-headers-3.0.0-16-generic_3.0.0-16.28_i386.deb) ...
dpkg: error processing 
/var/cache/apt/archives/linux-headers-3.0.0-16-generic_3.0.0-16.28_i386.deb 
(--unpack):
 unable to install new version of 
`/usr/src/linux-headers-3.0.0-16-generic/include/config/dvb/usb.h': No space 
left on device

20G maybe?  Nope:

# lvextend -L20G /dev/rootvol/mint_usr; btrfs fi resize max /usr; df -h /usr
  Extending logical volume mint_usr to 20.00 GiB
  Logical volume mint_usr successfully resized
Resize '/usr' of 'max'
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/rootvol-mint_usr
                       20G  2.8G   16G  15% /usr
test ~ # apt-get install -y -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  linux-headers-3.0.0-16-generic
The following NEW packages will be installed:
  linux-headers-3.0.0-16-generic
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
264 not fully installed or removed.
Need to get 0 B/851 kB of archives.
After this operation, 10.8 MB of additional disk space will be used.
(Reading database ... 180246 files and directories currently installed.)
Unpacking linux-headers-3.0.0-16-generic (from 
.../linux-headers-3.0.0-16-generic_3.0.0-16.28_i386.deb) ...
dpkg: error processing 
/var/cache/apt/archives/linux-headers-3.0.0-16-generic_3.0.0-16.28_i386.deb 
(--unpack):
 unable to install new version of 
`/usr/src/linux-headers-3.0.0-16-generic/include/config/ncpfs/packet/signing.h':
 No space left on device

Maybe 50G?  Yup:

# apt-get install -y -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  linux-headers-3.0.0-16-generic
The following NEW packages will be installed:
  linux-headers-3.0.0-16-generic
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
264 not fully installed or removed.
Need to get 0 B/851 kB of archives.
After this operation, 10.8 MB of additional disk space will be used.
(Reading database ... 180246 files and directories currently installed.)
Unpacking linux-headers-3.0.0-16-generic (from 
.../linux-headers-3.0.0-16-generic_3.0.0-16.28_i386.deb) ...
Setting up linux-image-3.0.0-16-generic (3.0.0-16.28) ...
...
# df -h /usr
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/rootvol-mint_usr
                       50G  2.8G   43G   7% /usr

So I guess I need a 50G btrfs filesystem for 2.8G worth of data?

Does that really seem right?  I suppose to be fair it could have been
some other value between 20G and 50G since I didn't test values in
between.  So still, I need some amount more than 20G of space to store
2.8G of data?

Surely there is something going on here other than just btrfs sucks for
small filesystems.

b.




Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to