[Bug 1381968] Re: Fstrim destroys data on loopback device
[Expired for linux (Ubuntu) because there has been no activity for 60 days.] ** Changed in: linux (Ubuntu) Status: Incomplete => Expired -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
** Changed in: linux (Ubuntu) Assignee: Andy Whitcroft (apw) => (unassigned) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
JDownloader, could you please provide an offline apport-collect as outlined in https://help.ubuntu.com/community/ReportingBugs#Filing_bugs_when_offline_or_using_a_headless_setup ? This wouldn't require rebooting. ** Changed in: linux (Ubuntu) Status: Confirmed => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
** Tags removed: kernel-key ** Tags added: kernel-da-key -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
@Andy: any news about this? can you reproduce? maybe any better place to report this bug? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
Would be nice to know if anyone else can confirm this bug? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
** Tags added: kernel-key -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
Do you need any more information? Could you reproduce the bug? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
** Changed in: linux (Ubuntu) Importance: Undecided = Critical -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
** Changed in: linux (Ubuntu) Assignee: (unassigned) = Andy Whitcroft (apw) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
I have attempted to reproduce this on both Utopic and Trusty (14.04) without success, below is a transcript of my attempt on Trusty. This is with the latest Trusty main kernel. Perhaps you could confirm this script correctly repeats your reproduce steps. If so then there must be a system specific component here: mru@kowtow-t64:~/misc/lp1381961$ sudo ./repro [sudo] password for mru: + set -e + here=/home/mru/misc/lp1381961 + file=/home/mru/misc/lp1381961/sparse-file + loop=/dev/loop7 + md=/dev/md7 + mnt=/home/mru/misc/lp1381961/mnt + rm -f '' + dd if=/dev/zero of=/home/mru/misc/lp1381961/sparse-file bs=1k seek=1024000 count=1 1+0 records in 1+0 records out 1024 bytes (1.0 kB) copied, 3.9741e-05 s, 25.8 MB/s + losetup /dev/loop7 /home/mru/misc/lp1381961/sparse-file + mdadm --create /dev/md7 --auto md --level=1 --raid-devices=1 --force /dev/loop7 mdadm: /dev/loop7 appears to be part of a raid array: level=raid1 devices=1 ctime=Fri Oct 17 10:32:10 2014 mdadm: Note: this array has metadata at the start and may not be suitable as a boot device. If you plan to store '/boot' on this device please ensure that your boot-loader understands md/v1.x metadata, or use --metadata=0.90 Continue creating array? y mdadm: Defaulting to version 1.2 metadata mdadm: array /dev/md7 started. + mkfs.ext4 /dev/md7 mke2fs 1.42 (29-Nov-2011) Discarding device blocks: done Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 64000 inodes, 255856 blocks 12792 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=264241152 8 block groups 32768 blocks per group, 32768 fragments per group 8000 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Allocating group tables: done Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done + echo '*** before mount ...' *** before mount ... + ls -lash /home/mru/misc/lp1381961/sparse-file 17M -rw-r--r-- 1 root root 1001M Oct 17 10:36 /home/mru/misc/lp1381961/sparse-file + mkdir -p /home/mru/misc/lp1381961/mnt + mount /dev/md7 /home/mru/misc/lp1381961/mnt + cp -rp /etc /home/mru/misc/lp1381961/mnt + echo '*** before trim ...' *** before trim ... + ls -lash /home/mru/misc/lp1381961/sparse-file 17M -rw-r--r-- 1 root root 1001M Oct 17 10:36 /home/mru/misc/lp1381961/sparse-file + fstrim -v /home/mru/misc/lp1381961/mnt /home/mru/misc/lp1381961/mnt: 1011752960 bytes were trimmed + echo '*** after trim ...' *** after trim ... + ls -lash /home/mru/misc/lp1381961/sparse-file 17M -rw-r--r-- 1 root root 1001M Oct 17 10:36 /home/mru/misc/lp1381961/sparse-file + umount /home/mru/misc/lp1381961/mnt + echo '*** after umount ...' *** after umount ... + ls -lash /home/mru/misc/lp1381961/sparse-file 31M -rw-r--r-- 1 root root 1001M Oct 17 10:36 /home/mru/misc/lp1381961/sparse-file + fsck -v -f /dev/md7 fsck from util-linux 2.20.1 e2fsck 1.42 (29-Nov-2011) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information 2718 inodes used (4.25%) 0 non-contiguous files (0.0%) 2 non-contiguous directories (0.1%) # of inodes with ind/dind/tind blocks: 0/0/0 Extent depth histogram: 2024 11814 blocks used (4.62%) 0 bad blocks 1 large file 1621 regular files 259 directories 0 character device files 0 block device files 0 fifos 0 links 829 symbolic links (686 fast symbolic links) 0 sockets 2709 files mru@kowtow-t64:~/misc/lp1381961$ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
Here is the actual script i am using to implement your reproduction script in the description. ** Attachment added: repro https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+attachment/4238850/+files/repro -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
I will try your script and also provide output to show the dataloss on my side -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
I could reproduce the issue by adding a single sync. It seems the umount in original script flushes data to loopdevice. When the caches are already flushed you will be able to reproduce the dataloss! Btw..fsck seems unable to detect the broken filesystem!? PS: I changed from mdadm to normal mounting the loopback device ** Attachment added: modified script https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+attachment/4238892/+files/repro -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
*** before mount ... 17M -rw-r--r-- 1 root root 1001M Oct 17 13:32 /root/lp1381961/sparse-file *** copy files ... *** sync ... *** du before trim... 16K /root/lp1381961/mnt/lost+found 342M/root/lp1381961/mnt/.jd_home 342M/root/lp1381961/mnt *** before trim ... 364M -rw-r--r-- 1 root root 1001M Oct 17 13:32 /root/lp1381961/sparse-file /root/lp1381961/mnt: 656330752 bytes were trimmed *** after trim ... 4.1M -rw-r--r-- 1 root root 1001M Oct 17 13:32 /root/lp1381961/sparse-file *** du after trim... 16K /root/lp1381961/mnt/lost+found 342M/root/lp1381961/mnt/.jd_home 342M/root/lp1381961/mnt *** after umount ... 4.1M -rw-r--r-- 1 root root 1001M Oct 17 13:32 /root/lp1381961/sparse-file fsck from util-linux 2.20.1 e2fsck 1.42.9 (4-Feb-2014) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information 23615 inodes used (36.90%, out of 64000) 2 non-contiguous files (0.0%) 14 non-contiguous directories (0.1%) # of inodes with ind/dind/tind blocks: 0/0/0 Extent depth histogram: 23605/2 95763 blocks used (37.41%, out of 256000) 0 bad blocks 1 large file 22267 regular files 1339 directories 0 character device files 0 block device files 0 fifos 0 links 0 symbolic links (0 fast symbolic links) 0 sockets 23606 files -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
sorry, somehow assigned to wrong package ** Package changed: openjdk-6 (Ubuntu) = linux (Ubuntu) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
Sorry , just noticed that I reported this bug in wrong project. Must be assigned to kernel! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1381968] Re: Fstrim destroys data on loopback device
I could not create missing logs because of: It appears you are currently running a mainline kernel I've upgraded to mainline kernel 3.17.1-031701-generic #201410150735, thought it maybe contains a bugfix for this. As the server runs in production-environment a restart is not that easy. I've detected this issue running the default ubuntu kernel. Do you still need logs? ** Changed in: linux (Ubuntu) Status: Incomplete = Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1381968 Title: Fstrim destroys data on loopback device To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1381968/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs