[dm-devel] write directly to device mapper snapshot origin device ?

Navin P.S navinp1912 at gmail.com
Fri Jul 15 12:15:42 UTC 2016


On Fri, Jul 15, 2016 at 5:21 PM, Mikulas Patocka <mpatocka at redhat.com> wrote:
>
>
> On Fri, 15 Jul 2016, Navin P.S wrote:
>
>> Resend ..
>>
>> On Thu, Jul 14, 2016 at 7:55 PM, Navin P.S <navinp1912 at gmail.com> wrote:
>> > Hi,
>> >   Can i do dd if=/dev/zero of=/dev/mapper/dmo count=20 ? where dmo is
>> > a dm snapshot origin created through dmsetup command. Instead of
>> > /dev/zero i can write valid devices.
>> >
>> > I could create the dmo through some lvm2 commands.
>
> lvcreate -s
>
>> > Is direct write
>> > with 4k (page size values ) allowed when it is mapped to 2 block
>> > devices in linear mode ?
>> >
>> >
>> > Regards,
>> > -- Navin
>>
>> I'm seeing  OOM followed by reboot of host machine.
>> Does this mean this device cannot to exported to containers for writing ?
>
> The snapshot driver requires 32 bytes of memory for one chunk (the chunk
> size is selected with the "-c" switch to lvcreate). You should set system
> memory according to that.
>
> Mikulas
>
>> -- Navin
>>




Are origin devices readonly ?

When i do dd if=/dev/zero of=/dev/mapper/ff count=10, it kills all the
process says OOM.

How do you go about debugging this ? I'm running 4.7.0-rc7+ .


root at vm-xenial-foo:~# dmsetup info
Name:              cryptie4-ff
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      251, 0
Number of targets: 2

Name:              ff
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      251, 1
Number of targets: 1

root at vm-xenial-foo:~# dmsetup status
cryptie4-ff: 0 102400 linear
cryptie4-ff: 102400 122880 linear
ff: 0 102400 snapshot-origin
root at vm-xenial-foo:~#




free -m
              total        used        free      shared  buff/cache   available
Mem:           7762        2178        3720         358        1864        4920
Swap:         19145           0       19145


-- 
-- Navin




More information about the dm-devel mailing list