Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

repquota --raw-grace does not work correctly

Help
2012-11-05
2013-03-26
  • masterbrian
    masterbrian
    2012-11-05

    Greetings,

    I'm trying to make some script that use the repquota "-raw-grace" switch. Actually it seems that the output produced by it is wrong. This is an example:

    root@server:~# repquota -a -g -raw-grace
    *** Report for group quotas on device /dev/sda4
    Block grace time: 15days; Inode grace time: 15days
                            Block limits                File limits
    Group           used    soft    hard  grace    used  soft  hard  grace


    154960    +- 2250000 2000000 2250001 1352427208       5     0     0      0

    grace time for group 154960 is 1352427208. According to the documentation this value is in seconds since epoch.
    Btw, the same command, without the -raw-grace switch give this output:

    root@mc-bkp09:~# repquota -a -g
    *** Report for group quotas on device /dev/sda4
    Block grace time: 15days; Inode grace time: 15days
                            Block limits                File limits
    Group           used    soft    hard  grace    used  soft  hard  grace


    154960    +- 2250000 2000000 2250001  3days       5     0     0

    this way the grace time is 3days.

    The problem is that 1352427208 seconds corresponds to "15653 days 2 hours 13 minutes 28 seconds", instead of 3 days. Is it a bug?

    Thank you

     
  • masterbrian
    masterbrian
    2012-11-05

    I forget to say that I'm using quota-tools on "Ubuntu 11.10" with kernel 3.0.0-12-server SMP x86_64 on a local filesystem with ext3 with 1.8TB of data.

     
  • Jan Kara
    Jan Kara
    2012-11-06

    It's not a bug. You just misunderstood the documentation of -raw-grace. The time reported by -raw-grace is a date when quota expires. In particular your value 1352427208 means the quota will expire on Fri Nov  9 03:13:28 CET 2012.