Great, thank you. zdb confirms what we already sort of suspected: the
file is ~12T with only 5.5G of real content. I was aware that ZFS
reported on disk size differently, but the fact that this isn't a
feature of compression threw me off in the output.

 Object  lvl   iblk   dblk  dsize  dnsize  lsize   %full  type
 7    5    16K   128K  5.51G     512  11.1T    0.07  ZFS plain file

At any rate, it's still not clear to me how we arrived at this giant
(but sparse) file, since the VM and image tools (qemu-img) only consider
it to be 10G logical. I'm guessing that the implication is that the bug
is with qemu rather than ZFS. My initial concern was that it had been a
storage layer corruption, but I guess it's equally plausible that
somehow the emulation layer ran wild and just started massively growing
the file out of bounds on disk.

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to zfs-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1766308

Title:
  inexplicably large file reported by zfs filesystem

Status in zfs-linux package in Ubuntu:
  Triaged

Bug description:
  I have a zfs filesystem containing a single qemu kvm disk image. The
  vm has been working normally. The image file is only allocated 10G,
  however today I became aware that the file, when examined from the ZFS
  host (hypervisor) is reporting an inexplicable, massive file size of
  around 12T. 12T is larger than the pool itself. Snapshots or other
  filesystem features should not be involved. I'm suspicious that the
  file(system?) has been corrupted.

  
  root@fusion:~# ls -l /data/store/vms/plexee/
  total 6164615
  -rw-r--r-- 1 root root 12201321037824 Apr 23 11:49 plexee-root
                          ^^ !!!!!!

  root@fusion:~# qemu-img info /data/store/vms/plexee/plexee-root 
  image: /data/store/vms/plexee//plexee-root
  file format: qcow2
  virtual size: 10G (10737418240 bytes)
  disk size: 5.9G
  cluster_size: 65536
  Format specific information:
      compat: 1.1
      lazy refcounts: false
      refcount bits: 16
      corrupt: false

  
  root@fusion:~# zfs list rpool/DATA/fusion/store/vms/plexee
  NAME                                 USED  AVAIL  REFER  MOUNTPOINT
  rpool/DATA/fusion/store/vms/plexee  5.88G   484G  5.88G  
/data/store/vms/plexee

  
  root@fusion:~# zfs get all rpool/DATA/fusion/store/vms/plexee
  NAME                                PROPERTY              VALUE               
    SOURCE
  rpool/DATA/fusion/store/vms/plexee  type                  filesystem          
    -
  rpool/DATA/fusion/store/vms/plexee  creation              Mon Mar 26  9:50 
2018   -
  rpool/DATA/fusion/store/vms/plexee  used                  5.88G               
    -
  rpool/DATA/fusion/store/vms/plexee  available             484G                
    -
  rpool/DATA/fusion/store/vms/plexee  referenced            5.88G               
    -
  rpool/DATA/fusion/store/vms/plexee  compressratio         1.37x               
    -
  rpool/DATA/fusion/store/vms/plexee  mounted               yes                 
    -
  rpool/DATA/fusion/store/vms/plexee  quota                 none                
    default
  rpool/DATA/fusion/store/vms/plexee  reservation           none                
    default
  rpool/DATA/fusion/store/vms/plexee  recordsize            128K                
    default
  rpool/DATA/fusion/store/vms/plexee  mountpoint            
/data/store/vms/plexee  inherited from rpool/DATA/fusion
  rpool/DATA/fusion/store/vms/plexee  sharenfs              off                 
    default
  rpool/DATA/fusion/store/vms/plexee  checksum              on                  
    default
  rpool/DATA/fusion/store/vms/plexee  compression           lz4                 
    inherited from rpool
  rpool/DATA/fusion/store/vms/plexee  atime                 off                 
    inherited from rpool
  rpool/DATA/fusion/store/vms/plexee  devices               off                 
    inherited from rpool
  rpool/DATA/fusion/store/vms/plexee  exec                  on                  
    default
  rpool/DATA/fusion/store/vms/plexee  setuid                on                  
    default
  rpool/DATA/fusion/store/vms/plexee  readonly              off                 
    default
  rpool/DATA/fusion/store/vms/plexee  zoned                 off                 
    default
  rpool/DATA/fusion/store/vms/plexee  snapdir               hidden              
    default
  rpool/DATA/fusion/store/vms/plexee  aclinherit            restricted          
    default
  rpool/DATA/fusion/store/vms/plexee  canmount              on                  
    default
  rpool/DATA/fusion/store/vms/plexee  xattr                 on                  
    default
  rpool/DATA/fusion/store/vms/plexee  copies                1                   
    default
  rpool/DATA/fusion/store/vms/plexee  version               5                   
    -
  rpool/DATA/fusion/store/vms/plexee  utf8only              off                 
    -
  rpool/DATA/fusion/store/vms/plexee  normalization         none                
    -
  rpool/DATA/fusion/store/vms/plexee  casesensitivity       sensitive           
    -
  rpool/DATA/fusion/store/vms/plexee  vscan                 off                 
    default
  rpool/DATA/fusion/store/vms/plexee  nbmand                off                 
    default
  rpool/DATA/fusion/store/vms/plexee  sharesmb              off                 
    default
  rpool/DATA/fusion/store/vms/plexee  refquota              none                
    default
  rpool/DATA/fusion/store/vms/plexee  refreservation        none                
    default
  rpool/DATA/fusion/store/vms/plexee  primarycache          all                 
    default
  rpool/DATA/fusion/store/vms/plexee  secondarycache        all                 
    default
  rpool/DATA/fusion/store/vms/plexee  usedbysnapshots       0                   
    -
  rpool/DATA/fusion/store/vms/plexee  usedbydataset         5.88G               
    -
  rpool/DATA/fusion/store/vms/plexee  usedbychildren        0                   
    -
  rpool/DATA/fusion/store/vms/plexee  usedbyrefreservation  0                   
    -
  rpool/DATA/fusion/store/vms/plexee  logbias               latency             
    default
  rpool/DATA/fusion/store/vms/plexee  dedup                 off                 
    default
  rpool/DATA/fusion/store/vms/plexee  mlslabel              none                
    default
  rpool/DATA/fusion/store/vms/plexee  sync                  standard            
    default
  rpool/DATA/fusion/store/vms/plexee  refcompressratio      1.37x               
    -
  rpool/DATA/fusion/store/vms/plexee  written               5.88G               
    -
  rpool/DATA/fusion/store/vms/plexee  logicalused           7.94G               
    -
  rpool/DATA/fusion/store/vms/plexee  logicalreferenced     7.94G               
    -
  rpool/DATA/fusion/store/vms/plexee  filesystem_limit      none                
    default
  rpool/DATA/fusion/store/vms/plexee  snapshot_limit        none                
    default
  rpool/DATA/fusion/store/vms/plexee  filesystem_count      none                
    default
  rpool/DATA/fusion/store/vms/plexee  snapshot_count        none                
    default
  rpool/DATA/fusion/store/vms/plexee  snapdev               hidden              
    default
  rpool/DATA/fusion/store/vms/plexee  acltype               off                 
    default
  rpool/DATA/fusion/store/vms/plexee  context               none                
    default
  rpool/DATA/fusion/store/vms/plexee  fscontext             none                
    default
  rpool/DATA/fusion/store/vms/plexee  defcontext            none                
    default
  rpool/DATA/fusion/store/vms/plexee  rootcontext           none                
    default
  rpool/DATA/fusion/store/vms/plexee  relatime              off                 
    default
  rpool/DATA/fusion/store/vms/plexee  redundant_metadata    all                 
    default
  rpool/DATA/fusion/store/vms/plexee  overlay               off                 
    default

  
  root@fusion:~# dpkg -l | grep zfs
  ii  libzfs2linux                        0.6.5.6-0ubuntu20                     
     amd64        Native OpenZFS filesystem library for Linux
  ii  zfs-dkms                            0.6.5.6-0ubuntu20                     
     amd64        Native OpenZFS filesystem kernel modules for Linux
  ii  zfs-doc                             0.6.5.6-0ubuntu20                     
     all          Native OpenZFS filesystem documentation and examples.
  ii  zfs-initramfs                       0.6.5.6-0ubuntu20                     
     all          Native OpenZFS root filesystem capabilities for Linux
  ii  zfs-zed                             0.6.5.6-0ubuntu20                     
     amd64        OpenZFS Event Daemon (zed)
  ii  zfsutils-linux                      0.6.5.6-0ubuntu20                     
     amd64        Native OpenZFS management utilities for Linux

  
  root@fusion:~# uname -a
  Linux fusion 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar 14 17:48:43 UTC 
2018 x86_64 x86_64 x86_64 GNU/Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1766308/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to