Encrypted partitions with sectors to zero?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone.

I was trying to verify that discard (TRIM) was disabled on my system
(new fresh install on a SSD) when I found some weird things.

Indeed it seems I have many sectors to zero; example:
root@o9020:~# hdparm --read-sector 54003000 /dev/sda
/dev/sda:
reading sector 54003000: succeeded
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
...
0000 0000 0000 0000 0000 0000 0000 0000


According to me, only my /boot partition should have zero (as this is
the only one unencrypted):
root@o9020:~# parted /dev/sda "unit s print"
Model: ATA LITEONIT LCS-128 (scsi)
Disk /dev/sda: 250069680s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number  Start     End         Size        Type      File system  Flags
 1      2048s     1953791s    1951744s    primary   ext4         boot
 2      1955838s  250068991s  248113154s  extended
 5      1955840s  250068991s  248113152s  logical

root@o9020:~# lsblk /dev/sda -f
NAME                              FSTYPE      LABEL MOUNTPOINT
sda
├─sda1                            ext4              /boot
├─sda2
└─sda5                            crypto_LUKS
  └─sda5_crypt (dm-0)             LVM2_member
    ├─VolumeGroup1-root (dm-1)    ext4              /
    ├─VolumeGroup1-swap (dm-2)    swap              [SWAP]
    ├─VolumeGroup1-usr (dm-3)     ext4              /usr
    ├─VolumeGroup1-tmp (dm-4)     ext4              /tmp
    ├─VolumeGroup1-opt (dm-5)     ext4              /opt
    ├─VolumeGroup1-var (dm-6)     ext4              /var
    ├─VolumeGroup1-home (dm-7)    ext4              /home
    └─VolumeGroup1-backups (dm-8) ext4              /backups

root@o9020:~# dmsetup table
VolumeGroup1-home: 0 97648640 linear 254:0 83978240
VolumeGroup1-usr: 0 19529728 linear 254:0 25389056
VolumeGroup1-var: 0 19529728 linear 254:0 64448512
VolumeGroup1-swap: 0 15622144 linear 254:0 9766912
VolumeGroup1-root: 0 9764864 linear 254:0 2048
VolumeGroup1-backups: 0 39059456 linear 254:0 181626880
sda5_crypt: 0 248109056 crypt aes-xts-plain64
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0 8:5 4096
VolumeGroup1-opt: 0 9764864 linear 254:0 54683648
VolumeGroup1-tmp: 0 9764864 linear 254:0 44918784


Is it expected?
Does I have to fully fill the encrypted partition (at least once) to
hide my datas?


FYI I verified TRIM and it seems really disabled:
root@o9020:/tmp# fstrim -v /tmp/
fstrim: /tmp/: FITRIM ioctl failed: Operation not supported


Thanks a lot for your help.


NB: I'm using Debian (Wheezy/Stable):
root@o9020:~# dpkg -l cryptsetup lvm2 dmsetup|tail -3
ii  cryptsetup                                 2:1.4.3-4
          amd64        disk encryption support - startup scripts
ii  dmsetup                                    2:1.02.74-8
          amd64        Linux Kernel Device Mapper userspace library
ii  lvm2                                       2.02.95-8
          amd64        Linux Logical Volume Manager
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
http://www.saout.de/mailman/listinfo/dm-crypt





[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux