[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How does the superblock/mount -t auto work? (was: Synching volumes on logout -- tune2fs)



On Fri, 26 Dec 2003 18:04:14 -0700, Monique Y. Herman wrote:

> On Fri, 26 Dec 2003 at 23:59 GMT, Paul Morgan penned:
>> 
> 
> Thank you for taking the time to respond, but the above was already
> pretty clear to me.  What's not clear to me are the following points:
> 
Sorry, my fault.

> Since the 'auto' type for mount looks at the superblock, will an ext3
> partition mounted as 'auto' be used as ext2, ie, without journalling?
> (I'm guessing the answer is 'yes', but I'd still feel more warm and
> fuzzy with a confirmation.)

No.  If your kernel groks ext3, it will try ext3 before ext2.

> 
> Does the presence of the has_journal option imply that the driver in use
> is ext3, or only that the partition itself has ext3 features, regardless
> of whether they're being used?  I'm guessing the answer is "the latter,"
> and that the presence of the has_journal feature does not have any
> bearing on whether the ext2 or ext3 driver is being used, but again, a
> confirmation would make me feel better.
> 
> Or, as an experimental solution to both of the above questions, how
> would I go about determining whether an ext3 partition mounted as type
> 'auto' is using the ext2 or ext3 driver?
> 
Example:  I just changed my root fstab entry from:

/dev/hda2 / ext3 defaults,data=journal,errors=remount-ro 1 0
to:
/dev/hda2 / auto defaults,data=journal,errors=remount-ro 1 0

...and rebooted.

Before reboot, "mount" tells me:

/dev/ide/host0/bus0/target0/lun0/part2 on / type ext3
(rw,data=journal,errors=remount-ro)

After reboot:

/dev/ide/host0/bus0/target0/lun0/part2 on / type auto
(rw,data=journal,errors=remount-ro)

however, /var/log/syslog tells me that root was mounted as ext3:

Dec 27 05:12:05 pooh kernel: Mounted devfs on /dev
Dec 27 05:12:05 pooh kernel: Freeing unused kernel memory: 132k freed
Dec 27 05:12:05 pooh kernel: kjournald starting.  Commit interval 5 seconds
Dec 27 05:12:05 pooh kernel: EXT3-fs: mounted filesystem with journal data mode.

Another example:

pooh:~# mount
...
/dev/vgusr/lvsrc on /usr/src type ext3 (rw,data=journal)

...after unmounting /usr/src, changing fstab from ext3 to auto, and
remounting:

/dev/vgusr/lvsrc on /usr/src type ext3 (rw,data=journal)

>> 
>> I use exclusively ext3 but just for you I created an ext2 example :)
> 
> I have all of my partitions formatted as ext3, but in researching the
> original poster's question I discovered that I had for some reason put
> 'auto' in my fstab for the root partition (but not the others), leading
> to the above questions.

Here's a good place to start reading (I give the two links because there's
not a link from the first page to the second, at least I didn't see one. 
The second page describes ext3 journalling options.

http://www-106.ibm.com/developerworks/linux/library/l-fs7/
http://www-106.ibm.com/developerworks/linux/library/l-fs8/

-- 
....................paul

It's working as coded.




Reply to: