Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
No space left on device , which is half empty !!
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
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Sun Jan 25, 2015 9:56 am    Post subject: No space left on device , which is half empty !! Reply with quote

I'm attempting to make a new Gentoo installation from my existing one which has not been updated for a long time, so it is probably best not to touch.

I've set up the chroot environment, unpacked the tarball and chroot into it.

I now do the next step with is emerge --sync and it starts spewing out messages about no space left on device, yet it's only half full and is bigger than the handbook says is needed.

Code:


df -h  /mnt/gentoo/usr/portage
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb22      3.0G  1.5G  1.4G  53% /mnt/gentoo



Code:

rsync: recv_generator: mkdir "/usr/portage/sci-libs/hdf5" failed: No space left on device (28)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: mkdir "/usr/portage/sci-libs/htslib" failed: No space left on device (28)
*** Skipping any contents from this failed directory ***
rsync: recv_generator: mkdir "/usr/portage/sci-libs/hypre" failed: No space left on device (28)
*** Skipping any contents from this failed directory ***   




Never mind, I thought, I'll do like I'm on Windows: reboot , fsck and try again.

Code:
# emerge --sync
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_GB)
>>> Synchronization of repository 'gentoo' located in '/usr/portage'...
>>> Starting rsync with rsync://88.198.224.205/gentoo-portage...
Traceback (most recent call last):
  File "/usr/bin/emerge", line 50, in <module>
    retval = emerge_main()
  File "/usr/lib/portage/pym/_emerge/main.py", line 1031, in emerge_main
    return run_action(emerge_config)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 3949, in run_action
    return action_sync(emerge_config)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 2071, in action_sync
    returncode = _sync_repo(emerge_config, repo)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 2458, in _sync_repo
    tempfile.mkstemp(dir=tmpdir)
  File "/usr/lib/python3.3/tempfile.py", line 283, in mkstemp
    dir = gettempdir()
  File "/usr/lib/python3.3/tempfile.py", line 251, in gettempdir
    tempdir = _get_default_tempdir()
  File "/usr/lib/python3.3/tempfile.py", line 192, in _get_default_tempdir
    dirlist)
FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/']



Man, I'm starting to remember why I stopped updating my old Gentoo installation :o
_________________
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7136
Location: Saint Amant, Acadiana

PostPosted: Sun Jan 25, 2015 10:07 am    Post subject: Reply with quote

You are probably out of inodes, df -i.
For your reference, my portage is using 9.3 GiB (it is on NFS). My / is 5.8 GiB.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Sun Jan 25, 2015 10:25 am    Post subject: Reply with quote

Thanks,

My old system was a fair bit bigger too. My plan was to just get the installation working then copy over to the backup partition from my old ( ie existing ) Gentoo.

I was hoping a fresh installation would be cleaner and leaner than my old Gentoo which must have some serious cruft since it was installed in about 2003.


Does this mean that the 2.5GB stated in the handbook will not even get as far as syncing the portage tree ?!!!

remind me how to get more inodes on ext4 ;)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7136
Location: Saint Amant, Acadiana

PostPosted: Sun Jan 25, 2015 10:33 am    Post subject: Reply with quote

I think 2.5 GiB for / is OK if you have separate portage, /usr and /home.
man mkfs.ext4 tells to use -N number-of-inodes to override defaults.
If you have another Gentoo box on your LAN you can use its portage over NFS, nobody really needs portage in every box, one per network is enough.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Sun Jan 25, 2015 10:48 am    Post subject: Reply with quote

You may be right but that sure as hell is not what is written under "hardware requirements" at the top of the handbook!

Quote:
Diskspace 2.5 GB (excluding swap space)



What's the size of the portage tree now? thx
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7136
Location: Saint Amant, Acadiana

PostPosted: Sun Jan 25, 2015 10:55 am    Post subject: Reply with quote

Jaglover wrote:
You are probably out of inodes, df -i.
For your reference, my portage is using 9.3 GiB (it is on NFS). My / is 5.8 GiB.

_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Sun Jan 25, 2015 11:09 am    Post subject: Reply with quote

Thanks Jag, I got that the first time, but there is likely to be all sorts of cruft in there like tmp log and redundant bz2 downloads,

The question was the size of the tree. My old portdir ( separate from the logs and stuff ) was 4.6 GB but that is well over a year out out date and was not just the tree IIRC.

Clearly the handbook is totally off the wall on this. Not good.


[EDIT] Having just done emerge --sync on top of a stage3 it's a tad under 2GB. using 225K INodes
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43412
Location: 56N 3W

PostPosted: Sun Jan 25, 2015 12:58 pm    Post subject: Reply with quote

Gentree,

The portage tree will just fit into 0.5G if you use a 1k block size, thats not the default on ext4 though.
Nor is it the the default on HDD with a 4k physical sector size.

Code:
Filesystem                Size  Used Avail Use% Mounted on
/dev/mapper/vg-portage    2.0G  431M  1.5G  23% /usr/portage
/dev/mapper/vg-portage     196K  177K   20K   91% /usr/portage
thats space and i-node count
With a 4k block size, you will need 2G, as its full of small files.
Do you really want a fs with a 1k block size on a device with a 4k block size?

I must admit, I did that without thiking about it. ... That sample is on a SSD.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Sun Jan 25, 2015 1:20 pm    Post subject: Reply with quote

thanks Neddy, very enlightening as always.

I was using Reiser4 for all this stuff until it went out of fashion and I must admit I just dumped everything onto ext4 when it was no longer supported.

I usually move portage to a separate partition because it does not need backing up and has different performanc needs.

what would you suggest is a good fs choice / sector size etc for the tree and build fs?

TIA. 8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43412
Location: 56N 3W

PostPosted: Sun Jan 25, 2015 3:01 pm    Post subject: Reply with quote

Gentree,

I have portage on its own filesystem which is formatted 1k block size, one inode per block, no journal on ext4. I might have used the brtees option too but I can't remember.
I forgot all about the underlying device having a 4k block size, so writes will be slowed down due to the SDD doing read/modify/writes but I can't say I've noticed.
I suspect the limiting factor is my broadband.

On rotating rust, the HDD doing read/modify/writes takes several platter revolutions, so you probably want to use the same filesystem block size as physical block size.

Portage in squashfs works too. Squashfs is read only, so there are a few extra hoops ju tump through to do emerge --sync.

The build fs needs to be fast. ext4 without a journal?
I tend to build in tmpfs, as I have the RAM to do that.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Sun Jan 25, 2015 3:44 pm    Post subject: Reply with quote

An overview of my current Gentoo system gives:
Code:

"df" output
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda8       16524084 14082724   1601968  90% /
/dev/sda9       16524084 14945628    739064  96% /home
/dev/sda10      16524084  9298828   6385864  60% /usr/portage
/dev/sda12       7868656  1121032   6328300  16% /var

"df -i" output
Filesystem      Inodes  IUsed   IFree IUse% Mounted on
/dev/sda8      1050576 484611  565965   47% /
/dev/sda9      1050576 435545  615031   42% /home
/dev/sda10     1050576 165898  884678   16% /usr/portage
/dev/sda12     2098720  44495 2054225    3% /var

"du -s" output
8379884   distfiles


So if you are using a 2 G filesystem it might be worth formatting
it with "mkfs -t ext4 -T news" if you are using ext4, which will
get you extra inodes (see /etc/mke2fs.conf for details). I used
to have to do that when installing Gentoo in a limited space.

Will
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13990

PostPosted: Sun Jan 25, 2015 5:03 pm    Post subject: Reply with quote

The Portage tree has grown considerably since I started using squashfs (or the squashfs options have changed to be less efficient). On my system, the squashfs container file is 78M for a recent tree. It was around 45M when I started. I squash using mksquashfs -noappend -comp xz. I store only the official Portage tree in the squashfs. Distfiles, packages, and overlays are all stored elsewhere.
Code:
$ du -ks /usr/portage/
377109  /usr/portage/
$ df -h /usr/portage/
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop0       78M   78M     0 100% /usr/portage
$ df /usr/portage/
Filesystem     1K-blocks  Used Available Use% Mounted on
/dev/loop3         79104 79104         0 100% /usr/portage
$ df -ih /usr/portage/
Filesystem     Inodes IUsed IFree IUse% Mounted on
/dev/loop0       177K  177K     0  100% /usr/portage
$ df -i /usr/portage/
Filesystem     Inodes  IUsed IFree IUse% Mounted on
/dev/loop3     180999 180999     0  100% /usr/portage
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Sun Jan 25, 2015 7:42 pm    Post subject: Reply with quote

Hu, yes, the squashfs is a good trick but I''m more interesting saving the amount of time I spend maintaining Gentoo than increasing it.

The -T news option was news to me ;) I'll bear that in mind.

Neddy, I can't see in the mk2fd and tune2fs man page how to turn off journaling. Could you help?

I'm working with "rotating rust" so I suppose I'll hove to go with wasteful 4k blocks.

Thanks for all the suggestions.
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43412
Location: 56N 3W

PostPosted: Sun Jan 25, 2015 8:11 pm    Post subject: Reply with quote

Gentree,

in
Code:
mke2fs -t ext4 -O ^has_journal ...


^has_journal means turn the option off
has_journal means make the fs with a journal

Nicely hidden in
Code:
man mke2fs
, under the -O option is
Code:
To disable a feature, simply prefix the feature name with a caret ('^') character.

The feature list has been moved to
Code:
man ext4
so its no longer all in one place.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13990

PostPosted: Sun Jan 25, 2015 10:49 pm    Post subject: Reply with quote

Gentree wrote:
Hu, yes, the squashfs is a good trick but I''m more interesting saving the amount of time I spend maintaining Gentoo than increasing it.
My experience has been that a Portage tree inside squashfs is faster than a tree on a bare ext4, at least on when stored on rotating rust. That alone is worth a bit to me, independent of the space savings.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6290

PostPosted: Mon Jan 26, 2015 10:08 am    Post subject: Reply with quote

Hu wrote:
I squash using mksquashfs -noappend -comp xz.

Now, since >=linux-3.18 upstream finally contains overlayfs , I think one can recommend everybody to use squashfs+overlay, not only for the portage tree but also for some other parts of the filesystem like /var/db, /usr/src, /usr/share/texmf-dist, /usr/lib/libreoffice, and /usr/share/games. A webserver directory might be yet another candidate.
The tool I recommend to manage this is sys-fs/squashmount, available from the mv overlay. (To my knowledge this is the only actively maintained script in this direction, and it is already a complete rewrite of an earlier attempt from which it has learnt a lot.)
Back to top
View user's profile Send private message
Gentree
Watchman
Watchman


Joined: 01 Jul 2003
Posts: 5350
Location: France, Old Europe

PostPosted: Mon Jan 26, 2015 6:44 pm    Post subject: Reply with quote

Thanks for that mv, I'll have a look.

Hu seems to have missed the point of my earlier comment. This kind of thing is fun and effective in reducing disk usage and increasing speed. But my main resource concern is the amount of my life spend screwing around maintaining Gentoo, not the price of disk storage or -10% in execution time of ludicrously long installation processes that build from source. That takes forever and forever - 10% is still forever.

I love tuning stuff but I don't want to extend emerge --sync into a half-hour job.

The script you are recommending could be interesting if it automates the process.

8)
_________________
Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6290

PostPosted: Mon Jan 26, 2015 7:04 pm    Post subject: Reply with quote

Gentree wrote:
The script you are recommending could be interesting if it automates the process.

It only automates the process of mounting/resquashing etc., not of maintaining gentoo.
In my experience you save time maintaining gentoo, compared to other distributions, because I never get the headache of a distribution major bump: You have this major headache only at the first install of a fresh machine.
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