Wouter Verhelst <[email protected]> writes:
> On Tue, Apr 10, 2012 at 11:18:05AM -0300, Salatiel Filho wrote:
>> Hi guys , i have a doubt.
>> If i have a device , let's say /dev/sdb2 which is mounted locally read
>> only, and this same device is exported using nbd , and mounted
>> readwrite by the client. If the client writes to the Filesystem , this
>> can lead to data corruption ?
>
> Yes, as in, "reads from /dev/sdb2 on the server will probably only get
> you garbage after a while". This is because there's nothing in nbd
> telling the filesystem layer that things have changed in the block
> device it's working with, and that the data it's cached is no longer
> valid.
Worse it can potentially lead to kernel oopses and crash your system.
> There are filesystems who are written to support such a mode of
> operation (e.g., GFS2), but don't try this with "normal" filesystems
> like ext4.
>
> Also, note that "mount -o ro" will still try to write to the filesystem
> if the journal is dirty. Arguably this is a bug in the kernel.
Thereby also endangering the client that has it mounted read-write.
>> Or the local filesystem will just be unable to see the changes until
>> it is remounted ?
>
> No, it doesn't work that way.
MfG
Goswin
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Nbd-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nbd-general