Indeed.
>
> So... you will have to omit the `data=xxx' portion of the
> mount options when remounting. It's being invisibly added
> by /bin/mount.
Thought so. I tried both ways just to be sure.
> /bin/mount tries to be smart. If, for example you have
>
> /dev/hdf12 /mnt/hdf12 ext3 noauto,ro,data=writeback 1
>
> in /etc/fstab and then type
>
> mount /dev/hdf12 -o remount,rw
>
> then /bin/mount runs off and looks up the fstab entry and
> inserts the mount options. However if you instead type
>
> mount /dev/hdf12 /mnt/hdf12 -o remount,rw (1)
>
> then /bin/mount does *not* look up the fstab entry, and
> the remount succeeds.
Interesting, and (almost) 100% true
sean@henry:~$ sudo mount /dev/sda8 /usr -oro,nodev,data=writeback,remount
mount: you must specify the filesystem type
sean@henry:~$ sudo mount /dev/sda8 /usr -oro,nodev,data=writeback,remount -text3
mount: /usr not mounted already, or bad option
sean@henry:~$ sudo mount /dev/sda8 /usr -oro,nodev,remount -text3
sean@henry:~$ mount
/dev/sdb6 on / type ext3 (rw)
none on /proc type proc (rw)
/dev/sda1 on /boot type ext2 (ro,nosuid,nodev)
/dev/sdc6 on /home type ext3 (rw,nosuid,nodev,data=ordered)
/dev/sda8 on /usr type ext3 (ro,nodev)
/dev/sda5 on /var type ext3 (rw,nosuid,nodev,sync,data=journal)
none on /dev/pts type devpts (rw,gid=5,mode=620)
It succeeds as long as I don't specify the journal type.
>
> ho-hum. For the while you'll have to fiddle with the mount
> usage to get things working right. Equation (1) above will
> work fine. Or apply the appended patch.
>
> > I can, however, remount it as ext2 read-write, but when I try to remount as
> > ext3 (even read only) I get the same problem.
>
> You can't switch between ext2 and ext3 with a remount - unmount
> is needed.
Wierd. This certainly looked to all the world as though it worked for me. Thus:
sean@henry:~$ sudo mount /dev/sda8 /usr -oro,nodev,remount -text2
...doesn't give me an error, but:
sean@henry:~$ mount
/dev/sdb6 on / type ext3 (rw)
none on /proc type proc (rw)
/dev/sda1 on /boot type ext2 (ro,nosuid,nodev)
/dev/sdc6 on /home type ext3 (rw,nosuid,nodev,data=ordered)
/dev/sda8 on /usr type ext3 (ro,nodev)
^^^^
/dev/sda5 on /var type ext3 (rw,nosuid,nodev,sync,data=journal)
none on /dev/pts type devpts (rw,gid=5,mode=620)
> > Wierdly, "mount" lists it as being still an ext3 partition even though it has
> > been remounted as ext2. I can't umount /usr because kjournald is currently
> > listed as using the partition.
>
> That sounds very weird. Could you please describe the steps
> you took to create this state?
See above.
> Sometimes /etc/mtab gets out of sync - especially for the
> root fs. It's more reliable to look in /proc/mounts
sean@henry:~$ cat /proc/mounts
/dev/root / ext3 rw 0 0
/proc /proc proc rw 0 0
/dev/sda1 /boot ext2 ro,nosuid,nodev 0 0
/dev/sdc6 /home ext3 rw,nosuid,nodev 0 0
/dev/sda8 /usr ext3 ro,nodev 0 0
/dev/sda5 /var ext3 rw,nosuid,nodev,sync 0 0
none /dev/pts devpts rw 0 0
sean@henry:~$ cat /etc/mtab
/dev/sdb6 / ext3 rw 0 0
none /proc proc rw 0 0
/dev/sda1 /boot ext2 ro,nosuid,nodev 0 0
/dev/sdc6 /home ext3 rw,nosuid,nodev,data=ordered 0 0
/dev/sda8 /usr ext3 ro,nodev 0 0
/dev/sda5 /var ext3 rw,nosuid,nodev,sync,data=journal 0 0
none /dev/pts devpts rw,gid=5,mode=620 0 0
Its almost as if mount is just silently ignoring the "-t" option when I specify
ext2.
>
>
> Here's the fix for the data= handling on remount:
I'll try this when its safe to reboot the box.
Thanks very much for your help.
Sean
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/