Thank you for reply.
I tried
I think my problem related with /proc/mounts
BTW system does have /etc/mtab and content of it after
mount -o remount,ro,bind /mnt/raid3 /mnt/raid3-readonly
Code:
/dev/sdb1 /mnt/raid3 ext3 rw,noatime 0 0
/mnt/raid3 /mnt/raid3-readonly none ro,bind 0 0
but content of /proc/mounts is
Code:
/dev/sdb1 /mnt/raid3 ext3 ro,noatime,data=ordered 0 0
/dev/sdb1 /mnt/raid3-readonly ext3 ro,data=ordered 0 0
and it explains why olddir also read-only.
I assumed that /mnt/raid3 path is overlapping with another mount point and affects on it too. That is why I changed source and mount point to another filesystem
Code:
mkdir /mnt/raid3/testfolder
mkdir /root/readonlyfolder
mount --bind /mnt/raid3/testfolder /root/readonlyfolder
mount -o remount,ro,bind /mnt/raid3/testfolder /root/readonlyfolder
Now /etc/mtab has
Code:
/dev/sdb1 /mnt/raid3 ext3 rw,noatime 0 0
/mnt/raid3/testfolder /root/readonlyfolder none ro,bind 0 0
but /proc/mounts still has both readonly
Code:
/dev/sdb1 /mnt/raid3 ext3 ro,noatime,data=ordered 0 0
/dev/sdb1 /root/readonlyfolder ext3 ro,data=ordered 0 0
So, I can rephrase my question. Why does "mount -o remount,ro" affect on /mnt/raid3 in /proc/mounts file?
Thanks.