Discussion:
Preparing encryption on SSD?
(too old to reply)
Tuxedo
2018-08-30 08:26:38 UTC
Permalink
Hello,

Before prepearing LUKS on a previous system with an old-fashioned drive it
was recommended first to fill up the partition that was to be encrypted with
random data:

dd if=/dev/urandom of=/dev/sda1

The partition was about 750GB for which the above writing took about 24
hours to complete.

Now with a new SSD and where the partition to be encrypted is 1.52TiB (at
/dev/nvmeOn1p1) I run the same:

dd if=/dev/urandom of=/dev/nvmeOn1p1

However, after about 10 minutes, the following error is returned:

dd: writing to '/dev/nvmeOn1p1': No space left on device
7773105+0 records in
7773104+0 recirds out
3979829248 bytes (3.7GB) copied, 395.103072 seconds, 9.6MB/s

Does anyone know why this happens and perhaps how encryption can best be
prepared on an SSD?

Thanks,
Tuxedo
Henrik Carlqvist
2018-08-30 20:21:05 UTC
Permalink
Post by Tuxedo
Now with a new SSD and where the partition to be encrypted is 1.52TiB
dd if=/dev/urandom of=/dev/nvmeOn1p1
dd: writing to '/dev/nvmeOn1p1': No space left on device 7773105+0
records in 7773104+0 recirds out 3979829248 bytes (3.7GB) copied,
395.103072 seconds, 9.6MB/s
What does "cat /proc/partitions" say?

Did you reboot your system or successfully run partprobe after
partitioning the drive?

regards Henrik
Tuxedo
2018-08-31 06:04:59 UTC
Permalink
[...]
Post by Henrik Carlqvist
What does "cat /proc/partitions" say?
I had some problems completing and rebooting the Slackware installation, but
by inserting a Debian-based GParted media, cat /proc/partitions returns:

259 0 1953514 nvmeOn1
259 1 1630552064 nvmeOn1p1
259 2 20971500 nvmeOn1p2
259 3 10351828 nvmeOn1p3
259 4 9728088 nvmeOn1p4
8 0 7816704 sda
8 1 7816688 sd1
7 0 238080 loop0
Post by Henrik Carlqvist
Did you reboot your system or successfully run partprobe after
partitioning the drive?
At first I was't to install LILO on the MBR as setup did not recognise
/dev/sda for some reason. But I ran partprobe in GParted and thereafter did
a complete Slackware reinstall and now booting Slackware works.

Maybe something was wrong with the MBR sector which partprobe fixed.

Once logged into the new Slackware, cat /proc/partitions now returns:

major minor #blocks name

1 0 16384 ram0
1 1 16384 ram1
1 2 16384 ram2
1 3 16384 ram3
1 4 16384 ram4
1 5 16384 ram5
1 6 16384 ram6
1 7 16384 ram7
1 8 16384 ram8
1 9 16384 ram9
1 10 16384 ram10
1 11 16384 ram11
1 12 16384 ram12
1 13 16384 ram13
1 14 16384 ram14
1 15 16384 ram15
259 0 1953514584 nvme0n1
259 1 1630552064 nvme0n1p1
259 2 209715200 nvme0n1p2
259 3 103518208 nvme0n1p3
259 4 9728088 nvme0n1p4

This was just an initial test installation on the new hardware. Partitioning
could be better done for LUKS combined with LVM.

Many thanks,
Tuxedo

Loading...