* [linux-lvm] dd on a lv?
@ 2015-11-08 17:41 Michael Munger
2015-11-08 19:37 ` Zdenek Kabelac
0 siblings, 1 reply; 3+ messages in thread
From: Michael Munger @ 2015-11-08 17:41 UTC (permalink / raw)
To: linux-lvm
In preparing a lv for LUKS, I wanted to write random data to the
entirety of the logical volume.
(It's one of two lv's in the vg that are running LUKS, the other lv are
not encrypted, and all reside on the same pv, which is a linux-raid
(mdadm) device at /dev/md0).
I used dd if=/dev/urandom of=/dev/mygroup/mylogicalvolume to write
random data to the entirety of the lv device.
Here's the issue:
The lv is only 4TB (yes... this took days). I had estimated it would
stop some time early this morning. This afternoon when I checked it, dd
had claimed to have written 4.2 TB of data to a 4TB device.
I immediately thought: "How's that possible" and began to worry that it
escaped the logical volume and began to write other areas of the array.
But, dd if=/dev/mygroup/othervol1 bs=1K count=1 | hexdump -C showed a
LUKS header (as it should) and the same command on the other lv showed
the proper header as well. I took this to mean that those lv's were in tact.
How is it possible that I can write 4.2TB to a 4.0 TB logical volume?
Should I be worried that I have somehow overritten something somewhere
else? If so, how do I find and check that? (I have backups, so if I need
to restore, I need to do it now).
P.S. When I did this on the other lv, which is only 100GB, dd behaved as
expected, and wrote only 100GB of random data to the logical volume.
--
Michael Munger, dCAP, MCPS, MCNPS, MBSS
High Powered Help, Inc.
Microsoft Certified Professional
Microsoft Certified Small Business Specialist
Digium Certified Asterisk Professional
michael@highpoweredhelp.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] dd on a lv?
2015-11-08 17:41 [linux-lvm] dd on a lv? Michael Munger
@ 2015-11-08 19:37 ` Zdenek Kabelac
2015-11-08 19:48 ` Michael Munger
0 siblings, 1 reply; 3+ messages in thread
From: Zdenek Kabelac @ 2015-11-08 19:37 UTC (permalink / raw)
To: LVM general discussion and development
Dne 8.11.2015 v 18:41 Michael Munger napsal(a):
> In preparing a lv for LUKS, I wanted to write random data to the
> entirety of the logical volume.
>
> (It's one of two lv's in the vg that are running LUKS, the other lv are
> not encrypted, and all reside on the same pv, which is a linux-raid
> (mdadm) device at /dev/md0).
>
> I used dd if=/dev/urandom of=/dev/mygroup/mylogicalvolume to write
> random data to the entirety of the lv device.
>
> Here's the issue:
>
> The lv is only 4TB (yes... this took days). I had estimated it would
> stop some time early this morning. This afternoon when I checked it, dd
> had claimed to have written 4.2 TB of data to a 4TB device.
>
> I immediately thought: "How's that possible" and began to worry that it
> escaped the logical volume and began to write other areas of the array.
> But, dd if=/dev/mygroup/othervol1 bs=1K count=1 | hexdump -C showed a
> LUKS header (as it should) and the same command on the other lv showed
> the proper header as well. I took this to mean that those lv's were in tact.
>
> How is it possible that I can write 4.2TB to a 4.0 TB logical volume?
> Should I be worried that I have somehow overritten something somewhere
> else? If so, how do I find and check that? (I have backups, so if I need
> to restore, I need to do it now).
>
> P.S. When I did this on the other lv, which is only 100GB, dd behaved as
> expected, and wrote only 100GB of random data to the logical volume.
Please check you compare sizes in same 'units'
dd reports sizes in 1000 units
while lvm2 normally in 1024
And basically if you want to hear any 'analysis' - you need to show us
'dmsetup table'
Zdenek
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-08 19:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-08 17:41 [linux-lvm] dd on a lv? Michael Munger
2015-11-08 19:37 ` Zdenek Kabelac
2015-11-08 19:48 ` Michael Munger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).