Search Results: "Lucas Nussbaum"

22 January 2010

Lucas Nussbaum: Simpler GnuPG-encrypted password store

Roland blogs about his GPG-encrypted password store. When I read the title of his blog post, I thought he would be writing about the gnupg.vim Vim plugin. But he didn t, so I ll take care of that: The gnupg.vim plugin provides transparent editing of GPG-encrypted files. It s as simple as vim foo.gpg, enter your GPG key if you are creating the file, and you are done.

22 December 2009

Lucas Nussbaum: Doctor Capello!

He might too shy to tell everybody, but the world must know. Luca Capello successfully defended his PhD thesis today at Universit de Gen ve, getting a Tr s Bien mention. I must admit that my last biology lesson was 13 years ago, so I m not sure I can really comment on his work on Vomeronasal Receptors: from Monogenic Expression to Axon Guidance. But I was very impressed by the quality of the experimental process, especially compared to what we do in computer science. Debian was well represented at the defense, since Axel Beckert, Didier Raboud and the Debian kilt were also there. Welcome to the list of Debian Developers holding PhD degrees, Luca!

Luca waiting at the door (again).
luca1
Luca ready to start.

21 December 2009

Lucas Nussbaum: Debian s KVM + Ubuntu karmic => bug?

I ve been playing with virtualization, and KVM in particular. However, I m running into an interesting problem. Below is how Ubuntu Netbook Remix look inside my KVM (either using virt-viewer, virt-manager or directly KVM to display the VM). Note how the top panel is fine. I m using KVM 88 from experimental (but I had the same problem with KVM 85 from unstable), the cirrus video driver inside the VM, and an up-to-date karmic VM.
Has someone ran into that problem already? If yes, where is it tracked? I m been failing to find the correct search keywords so far. kvm-unr

9 December 2009

Asheesh Laroia: A big machine that nothing can stop

A couple of weeks ago, Lucas Nussbaum wrote about his experience at the Ubuntu Developer Summit. Two things stuck out at me: In the summer of 2004, my laptop (an iBook G4) ran Debian GNU/Linux on PowerPC. I tried out Ubuntu that autumn, and was very impressed. It's been five years since then. My desktop still runs Debian, and I'm proud to be a "two-distro" community member. At the same time, this juggernaut nature raises concern. When Ubuntu releases ship with significant flaws, I quietly sigh and wonder, Are we doing good service to the people coming to GNU/Linux for the first time and seeing Ubuntu? This bugginess has bit me a few times (even for upgrades between one release and the next), and it pushed a friend of mine to switch a lot of his computing to DragonflyBSD. Lucas points out that Ubuntu's done a fantastic job of becoming visible. A look at Google Trends shows that people search for "Ubuntu" about as much as they search for "Linux" at all. Richard Stallman complains when people refer to GNU/Linux as just "Linux." But today, the most popular name for an operating system based on GNU is probably "Ubuntu." For Stallman, having his hard work associated with someone else's "Linux" project must be frustrating. As a Debian contributor, it would be easy to succumb to the same feeling with regard to Ubuntu. Lucas is well aware of that. He asks, Debian does have users! I was feeling a bit disheartened about my maintenance work on alpine lately, when out of the blue I received an email from a fellow at MIT asking me if I would accept some help with maintenance from him. Just seeing the note was a relief; it's very nice to be reminded that I have users to take care of. Debian is not as popular as Ubuntu on the desktop (or laptop), it's true. But technically sharp people do frequently still choose it. For example, the FreeNAS project recently announced a switch from FreeBSD to Debian (and a new name as coreNAS). But we could end up a "package supermarket". To stave this off, we must do good releases and make sure people know about them. Doing all that work takes us all time. We must recruit new contributors, help them find things to work on, and make sure they feel welcome. And sometimes-sloppy maintainers like me ought to fix our packages, and get help from others where necessary. I promise to work toward that.

26 November 2009

Michal Čihař: Ubuntu bugs for second time

It looks like my post about bugs in Ubuntu has received a bit more attention than I expected for few lines of ranting :-). Most interesting reactions came to Lucas Nussbaum's blog. There were nice explanations how it is supposed to work, but the problem is that people out there can not manage that amount of bugs. It is possible, that for some core packages, they manage to do the job. However most bug reports will probably go to some leaf packages, which are not that important, but lot of people use them. I started to interest in bugs in Ubuntu when I noticed that there is some huge number of bugs linked on phpMyAdmin's PTS page. There was something like 50 too much bugs. After quick look I could see that most of them are duplicates. After little fight with ajaxy interface, I even managed to mark most of them as duplicates and fix it in Debian package. But as somebody with no knowledge of Ubuntu (and not willing to learn internals of yet another distribution, I think Debian and OpenSUSE is enough), I really have no idea what could be done to push some bug fix to existing release. So once some Ubuntu release (The Lucid Lynx in this case) got new version, I marked the bug as fixed. This is probably not that nice to users, but somebody from Ubuntu community should take care of them. Off-topic PS: If anybody is interested in Google Wave invitations, just write me an email, I currently have 15 without any use.

25 November 2009

Lucas Nussbaum: Re: Ubuntu Bugs

(Context: Michal iha complains about bugs filed in Ubuntu not being looked at nor forwarded to Debian or upstream) Michal, I think that your complaint is caused by a misunderstanding of how package maintenance happens in Ubuntu. I ll try to clarify it, based on what I understand (if you know better than me, don t hesitate to comment). The part of Canonical maintaining the distribution is organized into teams (full list here), like Kernel, Foundations, Desktop, Mobile, Server, etc. Most of those teams have mirror-teams in the community, like the Ubuntu Desktop team. Those teams take care of subsets of packages in Ubuntu, of relevance to the respective teams. (This is orthogonal to package upload rights, which are managed with the Ubuntu Core Development Team, and the Ubuntu Development Team ; there s a proposal to change that so that package upload rights are based on the first set of teams). However, there are some packages (probably more than 70% of the packages in Ubuntu, including main+universe) that are of no interest to any particular team. Those packages are maintained on a best-effort basis by all the Ubuntu developers (inside the loosely defined MOTU team), and focus is usually on not diverging from Debian, to make their work as easy as possible. It s very similar to what we do in Debian with orphaned packages: sometimes, important bugs get fixed, because someone complained loudly enough or a developer ran into the bug and did a QA upload ; but usually, we don t really do any bug triaging. Of course, there are some packages in Ubuntu that are not maintained by any core team, but still have someone that cares about them. They are more the exception than the rule. So, yes, obviously, you will run into packages with lots of untriaged bugs, sometimes even with patches. And those bugs and patches are rarely being forwarded manually to Debian, simply because nobody cares about those packages in Ubuntu. In an ideal world, with infinite resources, this would not happen, of course. But realistically, this is not going to change anytime soon. There s a link on the PTS to the bugs of your packages in Ubuntu. The idea is to allow an easy access to the bugs reported in Ubuntu, which are likely to be also relevant to the Debian package. You should probably feel welcomed to triage the bugs against your package in ubuntu, if it makes it easier for you to monitor them. There s some noise in the Ubuntu bugs, of course, but more and more often, by looking at the Ubuntu bugs, I find important bugs in my Debian packages that are not even reported in Debian yet.

24 November 2009

Lucas Nussbaum: UDS Lucid

I m back from Dallas, where I was invited at the Ubuntu Developer Summit for Lucid. I spent a great week there ; the event was extremely well organized (by organizing them every 6 months, you are probably able to gather a lot of experience!). Of course, after all I had heard about people hugging each other all the time in the Ubuntu community, I was a bit worried, especially with the flu spreading! But there are lots of fantastic people around Ubuntu, and it was a very nice opportunity to be able to meet them all. Since it was my first UDS (I was at FOSSCAMP in Prague a few years ago, but didn t stay for UDS back then), I was not really sure of what to expect. I was very pleasantly surprised. UDS vs Debconf UDS is very different from Debconf. In Debconf, we do three different kind of things: In UDS, the main focus is on the third point: most of the sessions are about discussing what will be implemented for the next release. All of the relevant developers are in the same room to discuss possible problems, and the outcome of each session is usually a detailed plan, with a list of action items. It s a very nice way to ensure that changes are well thought, and allows making large-scale changes in Ubuntu very easily (you don t spend weeks arguing about them on mailing lists). Of course, it s probably also helped by the fact that there s a company behind Ubuntu, with a set of large teams (kernel, foundations, desktop, etc), which helps transfering trust (not everybody feel like they have to participate in each discussion, even when they affect the whole distribution: the team in charge is trusted by the rest of the project). On the other hand (yeah, let s be negative for a while) it doesn t really help spreading information between Ubuntu developers: it s often a bit difficult to get the global view of what is happening inside Ubuntu, especially since lots of things are discussed on IRC. Collaboration between Debian and Ubuntu During the week, I mainly was interested on collaboration between Debian and Ubuntu. There s a strong focus on doing the right thing wrt Debian (and also other upstreams). Then, of course, Ubuntu also has an agenda, which sometimes requires moving very fast on some things, or making compromises between technical purity and pragmatism. But the willingness to have common foundations between Debian Squeeze and Ubuntu Lucid will surely benefit both distros. Quality Assurance On the QA front, I am planning to do archive rebuilds for Ubuntu as well (fixing FTBFS is an easy way to start contributing to Ubuntu or Debian, and having those bugs fixed in Lucid would benefit Debian as well, by having patches already prepared). I also had a session with the QA team, where I gave an overview of what we are doing in the Debian QA group, to discuss opportunities for collaboration. The Ubuntu QA team focuses more on testing (with automated or manual testing) and bug triaging than archive quality that part is left to the MOTUs and the release managers. (About MOTUs, I liked how what they do was described as long-tail maintenance, landscape gardening or terraforming. That gives a good idea of what it s about). Ultimate Debian Database On the Ultimate Debian Database front, I did a plenary talk to try to demonstrate how UDD could be useful to Ubuntu as well, and, with Jorge Castro, we examined some metrics of Ubuntu s giving back to Debian. I also talked with the Launchpad team to try to resolve my long standing pretty please provide an export of Ubuntu bugs, so I can easily import them in UDD! issue. Ubuntu and ARM ARM netbooks and smartbooks (mix between netbooks and smartphones) are coming, and Ubuntu is clearly very well positioned to play an important role on that market. There was a whole track about ARM support, with lots of changes that will be done for Lucid. Let s all hope that Ubuntu-powered ARM netbooks win that market, so we don t reproduce the failures of the non-ARM netbooks. Distributed Development James Westby has been working on a set of tools to be able to work on Ubuntu packaging using bzr. The point is not to store the canonical source for Ubuntu packages in bzr (well, at least it s not the plan yet), but to provide a set of branches to make it easier to merge or cherry-pick from Debian. The resulting workflow looks extremely nice, with lots of syntaxic sugar. And even better, he assured me that his code is portable to Git ;)
Using his work, merging Ubuntu-specific changes in a new version of a Debian package basically means pulling from lp:ubuntu/foopkg, merging from lp:debian/sid/foopkg, and you are done!
As a bonus, we (Debian) would get bzr branches with the history of packages (kind of bzr-powered snapshots.debian.org).
James project is not completely ready yet, but should be very soon. It s already basically usable, apparently. Conclusion Ubuntu has clearly gone a very long way since 2004. Everything looks very well organized and polished, and gives the impression of a big machine that nothing can stop. With Cloud Computing and now ARM netbooks, Ubuntu has proven to be able to adapt to the current trends and attract a lot of visibility. It is great news for Free Software, but also proposes an interesting challenge to Debian: of course, it s nice that a Debian-based distro is in that position, but will Debian manage to stay relevant, or are we just going to be the technically-pure distro without many users that serves as a package supermarket for Ubuntu?

27 October 2009

Lucas Nussbaum: Patches welcome

When you merge a patch, especially a patch that has been waiting to be merged for more than 6 months, it is polite not to publicly mention that the patch required changes to the way it originally looked (a lot of patches do, especially when you didn t provide much feedback during the 6 months waiting period), or that merging the patch required cleaning up, and introduced bugs. Also, crediting the patch author in public communications doesn t hurt. If you fail to do that, people might feel that patches are not so welcome after all.

17 September 2009

Lucas Nussbaum: Free software improvements

Two things that have been annoying me for a long time have been fixed recently, and I discovered those two new features the same day (rainy week-ends are good for you). OK, both changes have been there for a long time, but I m sure I m not the only one who didn t notice them at the time. Big Thank You to both groups of developers (especially to the ati/radeon developers, who have been very helpful on IRC to troubleshoot my setup).

Lucas Nussbaum: Bootstrapping Centos or Fedora from Debian or Ubuntu

Here are some notes about bootstrapping a Centos or Fedora chroot from Debian. It should also work from Ubuntu with minor changes, but I haven t checked. The following should really be done in a chroot, since some commands will install files in your /etc or elsewhere, ignoring the --installroot passed to yum. The following instructions are for Centos, but replacing all occurences of centos with fedora should work. Update: Jaldhar Vyas pointed me to mach, and Paul Wise to mock. Both packages are available in Debian, but use config files for each release shipped in the package. Unfortunately, both packages are out of date, and don t include Fedora 9 or newer. Also, mock doesn t support Centos.

Anyway, both packages could use a new maintainer. Don t hesitate to jump in!

16 September 2009

Lucas Nussbaum: Managing your PTS subscriptions

Subscribing to packages on the PTS is really useful to stay informed of everything happening with those packages. Unfortunately, managing your PTS subscriptions is really a challenge. Here is how I proceed to subscribe to packages I forgot to subscribe after uploading them: Some more info:
  • The PTS lives on master, in /org/packages.qa.debian.org.
  • The script that handles emails send to pts@ is bin/control.pl.
  • The spool dir for pending requests is spool/. The files are simple text files.
  • You can send multiple commands per email. Sending them in the subject might be broken. (at least it failed for me)
  • You don't need to take special care of the From for your emails. It's ignored (unless you subscribe without specifying an email address).

13 May 2009

Lucas Nussbaum: UDD and packages metrics

Peter Eisentraut played with Ultimate Debian Database, and wanted to create a maintenance effort metric by multiplying each package s installed size by its popcon. His query is:
SELECT rank() OVER (ORDER BY score DESC), source,
sum(installed_size::numeric * insts) AS score
FROM packages JOIN popcon USING (package)
WHERE distribution = 'debian' AND release = 'sid'
AND component = 'main' AND architecture IN ('all', 'i386')
GROUP BY source, version ORDER BY score DESC LIMIT 30;
Besides all the interesting things that I learnt by looking at his query (rank(), and a bug in UDD because installed_size should really be numeric to avoid the conversion), Peter had a problem with his query: linux-2.6 is missing from the results, while it should obviously have a large popcon and a large install size. The problem is that the binary packages for linux-2.6 often change, so they don t get very high in popcon. The unstable kernel package gets a ridiculous popcon score: select package, insts from popcon
where package in (select package from packages where source ='linux-2.6' and release='sid')
order by insts desc limit 30;
package                             insts
----------------------------------+-------
linux-libc-dev                      38703
linux-source-2.6.29                   614
linux-headers-2.6.29-2-common         256
linux-image-2.6.29-2-amd64            239
A solution could be to change the metric to be: MAX(insts over all binary packages from this source package) * SUM(installed_size)
The good thing is that UDD already offers a popcon_src view, that gives the popcon score for a source package. So the query becomes:
SELECT rank() OVER (ORDER BY score DESC), source,
sum(installed_size::numeric * insts) AS score
FROM packages JOIN popcon_src USING (source)
WHERE distribution = 'debian' AND release = 'sid'
AND component = 'main' AND architecture IN ('all', 'i386')
GROUP BY source ORDER BY score DESC LIMIT 30;
 rank       source         score
------+---------------+-------------
1   openoffice.org      92177633504
2   qt4-x11             18503941620
3   linux-2.6           16036201020
4   gcc-4.3             14369300376
5   mesa                12962475968
6   eglibc              12581290240
7   gcc-4.4             11411296672
8   samba               10021083072
9   xulrunner            9037295424
10   mysql-dfsg-5.0      8348333532
This time, linux-2.6 shows up near the top of the list.

1 May 2009

Lucas Nussbaum: Simple CMS for a simple website ?

Dear readers, I m looking for a simple CMS, that would be usable by a non-programmer to write a simple website with less than 10 pages, not updated too frequently. Requirements:
- maintained/supported, but won t force me to upgrade for security reasons every month
- good wysiwyg editor (including positioning of images). Wiki-like markup is not an option.
- easy to learn, easy to use.
- doesn t look like a CMS or a blog for the visitors.
- usable by a non-programmer. Please suggest something that your parents would be able to use :-) Bonus points if:
- documentation available in french
- available as a Debian package
- doesn t expose many complex about publication workflow, user management, etc So, suggestions ?

21 April 2009

Lucas Nussbaum: I hate thunderbird (and its HTML-only emails)

Apparently, since Thunderbird 2.0, the user now has an easy way to choose to send messages as HTML-only emails, instead of the sane defaults of doing text only or text + HTML . As a result, lots of Thunderbird users now send HTML-only emails, which are a PITA to read with mutt. Does someone know if there s an open bug about reverting that change? Does someone know of a good strategy to convert HTML-only emails to text emails, preferably pluggable into procmail, so it happens at delivery time? It s how course possible to read HTML emails using an external HTML viewer, but I can t find a way to reply to a stripped version of the messages.

4 April 2009

Lucas Nussbaum: LWN article about the DPL election

In case you missed it: LWN article about the Debian Project Leader election.

14 March 2009

Lucas Nussbaum: Anomos: anonymous BitTorrent

The following information is based on Anomos website. Funnily, when you go to that website, the default page is a blog that doesn t answer the What s anomos? question. The answer to that question is available on the About page, on this blog post, and those slides. So, Anomos seems like a good answer to the it s to easy to determine who is donwloading a file with BitTorrent problem. It:
  • uses a mix network (like Tor) to transfer all the content.
  • encrypts the file being transferred.

    It is based on BitTorrent for performance, however, performance might be seriously affected by the mix network (which probably don t resist too well to heavy load since most internet connections have asymmetric upload/download bandwidths). A strange point is that it uses a central tracker. I m not sure why the central tracker couldn t be dropped, to simply use a DHT instead. (And traffic to the DHT could go through the mix network as well).
  • 8 March 2009

    Lucas Nussbaum: Make, tmpfs, and [amc]time granularity

    As you might have guessed (or not), I ve been playing with the idea of improving my Debian rebuild setup by building on tmpfs: disk I/O take a signifiant amount of time, that could easily be reduced by building (mostly) in memory. Most packages build fine on tmpfs: only 8 packages fail only on tmpfs. Apparently, most of the failures are caused by old versions of autoconf: this version used /tmp to store temporary files ; for example, when generating Makefile, it would create it on /tmp, then move it to the current directory. The problem arises when /tmp is an ext3 filesystem, while the current directory is on tmpfs: when moving the file back to the current directory, the mtime of the file is truncated. This can lead make to think that a given target needs to be rebuilt. A nice example of that is the smuxi package, that just loops when building. Demo:
    # cat Makefile
    f2: f1
            echo "Need to rebuild f2!"
    
    First case: f1 and f2 are stored in the current directory. Make agrees that
    f2 was created after f1:
    # rm f1 f2 ; touch f1 ; touch f2 ; make
    make:  f2' is up to date.
    
    Second case: f2 is created on /tmp, then moved to the current directory. Make thinks that f2 was created before f1 (and is right, according to stat).
    # rm f1 f2 ; touch f1 ; touch /tmp/f2 ; mv /tmp/f2 f2 ; make
    echo "Need to rebuild f2!"
    Need to rebuild f2!
    # stat f1 f2
      File:  f1'
    [..]
    Modify: 2009-03-08 18:21:08.900237000 +0100
      File:  f2 
    [..]
    Modify: 2009-03-08 18:21:08.000000000 +0100
    

    7 March 2009

    Lucas Nussbaum: Wysiwyg tool to create simple websites?

    Hi, I m looking for a tool to create simple websites (5-10 pages), only static content (no PHP). Think of the typical small business or sports club website: text + pictures about what they did/do, nothing really complex. Requirements:
  • usable by a non-programmer who doesn t want to know about gory technical details (HTML, CSS, etc)
  • doesn t make it too hard to create a website with a few pages (i.e it should do a bit more than just allowing to create one page)
  • built-in support for (S)FTP uploading of the website, usable by a non-programmer after someone computer-litterate will have set it up. (that s not an absolute requirement, but would still be nice to have. also, what are the nice graphical tools to do that, currently?) I m asking for two different persons with different needs. So please don t limit your replies to free software (although it would be nice): cheap proprietary applications might be adequate as well. Regarding platform, Linux, Mac OS X or Windows would all be suitable. I don t think that a CMS is the right tool here: the focus should be put on the content (which won t be often modified anyway) and its presentation, not on the ease of modification. For example, I d like to be able to position pictures in a precise way. However, I might be interested in a CMS that is:
  • easy to setup (for a reasonably computer-literate person)
  • extremely easy to learn (a couple hours at most, for a non-programmer)
  • easy to transform into something that looks good In your comments, it would be great if you could include examples of what you did with those tools (yes, links are welcomed!) Thank you.
  • 3 March 2009

    Lucas Nussbaum: PhD !

    This blog post is long overdue, but like Lenny, it was finally released. Yes, I defended my PhD thesis on December 4th. So I m officially a Doctor from the Universit Joseph Fourier Grenoble. The general context of my thesis is distributed systems, like peer-to-peer systems and applications running on HPC (High Performance Computing) cluster and grids. More specifically, I worked on methods and tools to study such systems, trying to answer the following questions: take a given application that will run on a distributed system. What can we learn or verify about its performance or its characteristics? Will it scale well, even with 1000 or 10000 nodes? Does this app perform better than this another app? Under which conditions? (that s probably the hardest question, because you need to be able to run both apps under the same conditions if you want a fair comparison!) My work involved studying basic building blocks that can be used to study distributed systems, like network emulators (Dummynet, Linux s traffic control subsystem, NISTNet). I also designed P2PLab, which allows to emulate network-centric peer-to-peer systems using a cluster, targetting experiments with thousands of emulated instances of the application. For example, it allowed to run experiments with ~15000 emulated BitTorrent nodes using 160 real machines. So what s next? Well, my first-priority plan is to make use of my PhD to apply to an academic position (maitre de conf rences, i.e assistant professor). If you know an open position where I would be a good fit, don t hesitate to tell me! Of course, this plan might very well fail (I will know around end of June). In that case, I ll probably be looking for a job, likely Free-Software-related. Again, if you hear of something for me, ping me!

    Lucas Nussbaum: Creating a large file without zeroing it: update

    Given the large number of comments I got (26!), I feel obliged to post a summary of what was said. First, the problem:
    I want to create a large file (let s say 10 GB) to use as swap space. This file can t be a sparse file (a file with holes, see wikipedia if you don t know about sparse files).
    Since I m going to mkswap it, I don t care about the data that is actually in that file after creating it. The stupid way (but only solution on ext3) to create it is to fill it with zeroes, with is very inefficient. Theodore Tso provided more information in a comment, which I m copying here:
    Yes, it will work on ext4. A convenient which makes this easy to use can be found here at http://sandeen.fedorapeople.org/utilities/fallocate.c. It was written by Eric Sandeen, a former XFS developer who now works for Red Hat, who has been a big help making sure ext4 will be ready for Fedora and Red Hat Enterprise Linux. (Well, I guess I shouldn t call him a former XFS developer since he still contributes patches to XFS now and then, but he s spending rather more time on ext4 these days.) One warning about the program; it calls the fallocate system call directly, and it doesn t quite have the right magic architecture-specific magic for certain architectures which have various restrictions on how arguments need to be passed to system calls. In particular, IIRC, I believe there will be issues on the s390 and powerpc architectures. The real right answer is to get fallocate into glibc; folks with pull into making glibc do the right thing, please talk to me. Glibc does have posix_fallocate(), which implements the POSIX interface. posix_fallocate() is wired to use the fallocate system call, for sufficiently modern versions of glibc. However, posix_fallocate() is probablematic for some applications; the problem is that for filesystems that don t support fallocate(), posix_fallocate() will simulate it by writing all zeros to the file. However, this is not necessarily the right thing to do; there are some applications that want fallocate() for speed reasons, but if the filesystem doesn t support it, they want to receive the ENOSPC error message, so they can try some other fallback which might or might not involve writing all zero s to the file. The other shortcoming with posix_fallocate() is that it doesn t support the FALLOC_FL_KEEP_SIZE flag. What this flag allows you to do is to allocate disk blocks to the file, but not to modify the i_size parameter. This allows you to allocate space for files such as log files and mail spool files so they will be contiguous on disk, but since i_size is not modified, programs that append to file won t get confused, and tail -f will continue to work. For example, if you know that your log files are normally approximately 10 megs a day, you can fallocate 10 megabytes, and then the log file will be contiguous on disk, and the space is guaranteed to be there (since it is already allocated). When you compress the log file at the end of the day, if the log file ended up being slightly smaller than 10 megs, the extra blocks will be discarded when you compress the file, or if you like, you can explicitly trim away the excess using ftruncate().
    fallocate works fine: creating a 20 GB file is almost immediate. Also, syncing or umounting the filesystem is also immediate, and reading the file returns only zeros. I m not sure how it is implemented, but it looks nice :-). However, it still doesn t solve my initial problem: mkswap works, but not swapon:
    :/tmp# touch tmp
    :/tmp# /root/fallocate -l 10g tmp
    :/tmp# ls -lh tmp
    -rw-r--r-- 1 root root 10G Mar  3 11:01 tmp
    :/tmp# du tmp
    10485764	tmp
    :/tmp# mkswap tmp
    Setting up swapspace version 1, size = 10737414 kB
    no label, UUID=a316ce8e-cf33-412b-8dc0-e10d9f2ebdbb
    :/tmp# strace swapon tmp
    [...]
    swapon( /tmp/tmp )                      = -1 EINVAL (Invalid argument)
    write(2,  swapon: tmp: Invalid argument\n , 30swapon: tmp: Invalid argument
    ) = 30
    exit_group(-1)
    
    (swapon works fine if the file is created normally without using fallocate()). Any other ideas?

    Next.

    Previous.