<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.rosa.ru/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://bugzilla.rosa.ru/"
          
          maintainer="d.postnikov@rosa.ru"
>

    <bug>
          <bug_id>374</bug_id>
          
          <creation_ts>2012-06-13 13:42:17 +0400</creation_ts>
          <short_desc>Duplicated entries in /etc/mtab</short_desc>
          <delta_ts>2013-01-14 11:09:40 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>ROSA-based products</classification>
          <product>ROSA Fresh</product>
          <component>Packages from Main</component>
          <version>Marathon</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Normal</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Denis Silakov">denis.silakov</reporter>
          <assigned_to name="ROSA Linux Bugs">bugs</assigned_to>
          <cc>alex.burmashev</cc>
    
    <cc>alexander.barakin</cc>
    
    <cc>alexander.kazantsev</cc>
    
    <cc>aponomarenko</cc>
    
    <cc>firstlevel</cc>
    
    <cc>sylvainsjc</cc>
    
    <cc>v.potapov</cc>
          
          <cf_platform>---</cf_platform>
          <cf_security_code></cf_security_code>
          <cf_package>setup-2.7.18-6-rosa.lts2012.0.x86_64</cf_package>
          

      

      

      <flag name="qa_verified"
          id="826"
          type_id="1"
          status="+"
          setter="v.potapov"
    />
    <flag name="published"
          id="847"
          type_id="3"
          status="+"
          setter="alex.burmashev"
    />

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1653</commentid>
    <comment_count>0</comment_count>
    <who name="Denis Silakov">denis.silakov</who>
    <bug_when>2012-06-13 13:42:17 +0400</bug_when>
    <thetext>It seems that /etc/mtab is not cleaned up with reboot and the new entries are appended to the ones left from the previous session. For example:

$cat /etc/mtab.old | grep sdb
/dev/sdb1 /mnt/storage ext4 rw,commit=0 0 0
/dev/sdb1 /mnt/storage ext4 rw,commit=0 0 0
/dev/sdb1 /mnt/storage ext4 rw,commit=0 0 0
/dev/sdb1 /mnt/storage ext4 rw,commit=0 0 0
/dev/sdb1 /mnt/storage ext4 rw,commit=0 0 0
/dev/sdb1 /mnt/storage ext4 rw,commit=0 0 0
/dev/sdb1 /mnt/storage ext4 rw,commit=0 0 0

As a side effect, tools like df list every partition several times:
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb1       914G  414G  454G  48% /mnt/storage
/dev/sdb1       914G  414G  454G  48% /mnt/storage
/dev/sdb1       914G  414G  454G  48% /mnt/storage
...

This seems to be a known issue with systemd:
https://bugzilla.redhat.com/show_bug.cgi?id=655571

In that upstream bug, Lennart Poettering suggested to make /etc/mtab a symlink to /proc/mounts. Will this solution work in ROSA or it can break something?

Note also that /etc/mtab -&gt; /proc/mounts symlink will make df output to look slightly unusual. There are some discussion about this in redhat bugzilla, as well:
https://bugzilla.redhat.com/show_bug.cgi?id=709351</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1654</commentid>
    <comment_count>1</comment_count>
    <who name="Aleksandr Kazantcev">alexander.kazantsev</who>
    <bug_when>2012-06-13 13:47:26 +0400</bug_when>
    <thetext>For my system 

mtab -&gt; /proc/self/mounts

and duplicate not available</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1659</commentid>
    <comment_count>2</comment_count>
    <who name="Denis Silakov">denis.silakov</who>
    <bug_when>2012-06-13 14:54:01 +0400</bug_when>
    <thetext>(In reply to comment #1)
&gt; For my system 
&gt; 
&gt; mtab -&gt; /proc/self/mounts
&gt; 
&gt; and duplicate not available

In ROSA /proc/mounts is a symlink to /proc/self/mounts :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2629</commentid>
    <comment_count>3</comment_count>
    <who name="Sylvainsjc">sylvainsjc</who>
    <bug_when>2012-07-23 14:02:12 +0400</bug_when>
    <thetext>Hi,

I&apos;m also affected by this bug

1) I delete the /etc/mtab file using a live DVD
2) Below&apos;s the result of &quot;mount -l&quot; after 2 reboot 

[root@rosa2012lts ~]# mount -l
/dev/sda1 on / type ext4 (rw,noatime,nodiratime,discard,commit=0) [ssdsys]
mqueue on /dev/mqueue type mqueue (rw)
securityfs on /sys/kernel/security type securityfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
hugetlbfs on /dev/hugepages type hugetlbfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
none on /proc type proc (rw)
mqueue on /dev/mqueue type mqueue (rw)
securityfs on /sys/kernel/security type securityfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
hugetlbfs on /dev/hugepages type hugetlbfs (rw)
tmpfs on /tmp type tmpfs (rw,noexec,nosuid,nodev,noatime,mode=0777)                                                                 
/dev/sda5 on /home type ext4 (rw,noatime,acl,commit=0) [ssdhome]                                                                    
/dev/sdb3 on /mnt/datas type ext4 (rw,errors=remount-ro,commit=0) [datas]                                                           
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)                                                                       
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)                                                                              
[root@rosa2012lts ~]#</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3211</commentid>
    <comment_count>4</comment_count>
    <who name="Denis Silakov">denis.silakov</who>
    <bug_when>2012-08-20 16:16:35 +0400</bug_when>
    <thetext>*** Bug 631 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3212</commentid>
    <comment_count>5</comment_count>
    <who name="Denis Silakov">denis.silakov</who>
    <bug_when>2012-08-20 16:17:34 +0400</bug_when>
    <thetext>Also note that messages like this one:

df: `/sys/fs/fuse/connections&apos;: No such file or directory

can be also fixed by turning /etc/mtab into a symlink to /proc/mounts.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4728</commentid>
    <comment_count>6</comment_count>
    <who name="Aleksandr Kazantcev">alexander.kazantsev</who>
    <bug_when>2012-10-30 14:52:59 +0400</bug_when>
    <thetext>*** Bug 1033 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5698</commentid>
    <comment_count>7</comment_count>
    <who name="alexander barakin">alexander.barakin</who>
    <bug_when>2012-12-18 15:21:29 +0400</bug_when>
    <thetext>does it make sense to include symlink /etc/mtab -&gt; /proc/mounts in any base package?
f.e. &quot;filesystem&quot;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5730</commentid>
    <comment_count>8</comment_count>
    <who name="alexander barakin">alexander.barakin</who>
    <bug_when>2012-12-18 20:20:40 +0400</bug_when>
    <thetext>*** Bug 1033 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5783</commentid>
    <comment_count>9</comment_count>
    <who name="Denis Silakov">denis.silakov</who>
    <bug_when>2012-12-20 12:25:59 +0400</bug_when>
    <thetext>In Marathon, /etc/mtab is owned by &apos;setup&apos; package (the file is created in its preinstall script).

In Desktop.Fresh 2012, this file is owned by utils-linux (and it is created as a symlink to /proc/self/mounts).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5793</commentid>
    <comment_count>10</comment_count>
    <who name="Denis Silakov">denis.silakov</who>
    <bug_when>2012-12-20 14:06:18 +0400</bug_when>
    <thetext>(In reply to comment #9)
&gt; In Marathon, /etc/mtab is owned by &apos;setup&apos; package (the file is created in
&gt; its preinstall script).

Sorry, not in preinstall, it is provided by the package itself.

&gt; 
&gt; In Desktop.Fresh 2012, this file is owned by utils-linux (and it is created
&gt; as a symlink to /proc/self/mounts).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5839</commentid>
    <comment_count>11</comment_count>
    <who name="alexander barakin">alexander.barakin</who>
    <bug_when>2012-12-20 18:48:03 +0400</bug_when>
    <thetext>so, i fixed the package &quot;setup&quot;.

advisory: /etc/mtab now is symlink to /proc/self/mounts; closes bug #374
https://abf.rosalinux.ru/build_lists/857666
https://abf.rosalinux.ru/build_lists/857667</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5845</commentid>
    <comment_count>12</comment_count>
    <who name="Denis Silakov">denis.silakov</who>
    <bug_when>2012-12-20 19:35:55 +0400</bug_when>
    <thetext>advisory: /etc/mtab is now a symlink to /proc/self/mounts; closes bug #374

Buildlists:
https://abf.rosalinux.ru/build_lists/857666
https://abf.rosalinux.ru/build_lists/857667</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>5925</commentid>
    <comment_count>13</comment_count>
    <who name="Vladimir Potapov">v.potapov</who>
    <bug_when>2012-12-22 11:36:39 +0400</bug_when>
    <thetext>setup-2.7.18-7-rosa.lts2012.0
**************** Advisory ********************
closes bug #374 (duplicates in /etc/mtab)
/etc/mtab is now a symlink to /proc/self/mounts; 
**********************************************
QA Verified</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6777</commentid>
    <comment_count>14</comment_count>
    <who name="FirstLevel">firstlevel</who>
    <bug_when>2013-01-14 10:56:12 +0400</bug_when>
    <thetext>User has asnwered that ptroblem exist with setup-2.7.18-7.
This is output of his df command
# df
Файловая система Размер Использовано  Дост Использовано% Cмонтировано в
rootfs              12G         5,7G  5,6G           51% /
devtmpfs           3,9G            0  3,9G            0% /dev
tmpfs              3,9G            0  3,9G            0% /dev/shm
tmpfs              3,9G         4,9M  3,9G            1% /run
/dev/sda1           12G         5,7G  5,6G           51% /
tmpfs              3,9G         4,9M  3,9G            1% /run
tmpfs              3,9G            0  3,9G            0% /sys/fs/cgroup
tmpfs              3,9G            0  3,9G            0% /media
/dev/sda6          132G          24G  109G           18% /home

As You can see he has duplicate of etries.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6779</commentid>
    <comment_count>15</comment_count>
    <who name="Denis Silakov">denis.silakov</who>
    <bug_when>2013-01-14 11:07:46 +0400</bug_when>
    <thetext>Formally, there is only duplicate here (&apos;/run&apos;) folder. There is also a logical duplicate - &apos;rootfs&apos; is actually the same as &apos;/dev/sda1&apos;.

This is a specific of our /proc/mounts and this is a completely different issue; feel free to create a new bug for it (it seems that the same issue was fixed in Fedora not long ago - https://bugzilla.redhat.com/show_bug.cgi?id=749356).

The original issue reported here was that new entries were attached to /etc/mtab after each reboot; that issue is fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>6780</commentid>
    <comment_count>16</comment_count>
    <who name="Denis Silakov">denis.silakov</who>
    <bug_when>2013-01-14 11:09:40 +0400</bug_when>
    <thetext>... moreover, the issue is not present in Desktop Fresh 2012, where we use the freshest coreutils.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>