Re: [Nbd] local mounted readonly and exported read write
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] local mounted readonly and exported read write
- From: Salatiel Filho <salatiel.filho@...17...>
- Date: Wed, 11 Apr 2012 09:58:58 -0300
- Message-id: <CAGmni9pGKRVE-au8Z8b+EUgQcGs5N6AC+3o7=AmgQUQNOSq1QQ@...18...>
- In-reply-to: <87fwcacx8x.fsf@...860...>
- References: <CAGmni9qGzq6Npba7QT4vZWK5n-tgh7mdn7F0efbeCGW6zc91Xg@...18...> <87fwcacx8x.fsf@...860...>
On Wed, Apr 11, 2012 at 08:40, Goswin von Brederlow <goswin-v-b@...186...> wrote:
> Salatiel Filho <salatiel.filho@...17...> writes:
>
>> 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 ? Or the local filesystem will just be
>> unable to see the changes until it is remounted ?
>>
>> []'s
>> Salatiel
>
> Results are undefined and your kernel may oops at any time.
>
> Why doesn't nbd-server get an EBUSY when trying to open /dev/sdb2 if it
> is mounted?
>
> MfG
> Goswin
Did a little test:
Machine 1 mounted /dev/sda2 as /mnt read only
Machine 1 exported /dev/sda2 using nbd
Machine 2 uses nbd-client to connect to machine 1 and mount the
exported device as /media
Machine 2 creates a very big file in /media
Machine 1 sees that file after a while without needing remounting...
This is nice , though it can corrupt the fs some time.
[]'s
Salatiel
Reply to: