|
From: Bruce S. <bw...@ar...> - 2003-12-23 21:42:36
|
> >>I thought of transforming the /etc/sysconfig/lvmtab to /etc/fstab format > >>in memory, merging it with the /etc/fstab there, sorting it according to > >>the depth of the mountpoints and then running the mount. But have not > >>found a clever way of doing it yet. > > > > I have a slightly different idea of how to handle it. > > How? I was afraid you were going to ask that ... :-) Here's the new default /etc/sysconfig/lvmtab: (first column is the lv name under vg devil-linux) swap swap swap defaults 0 0 home /home auto defaults 0 0 opt /opt auto defaults 0 0 log /var/log auto defaults 0 0 spool /var/spool auto defaults 0 0 squid /var/squid auto defaults 0 0 tmp /var/tmp auto defaults 0 0 data /var/data auto defaults 0 0 imap /var/imap auto defaults 0 0 mail /var/mail auto defaults 0 0 Left as-is, the mountfs script will function exactly the same as it does now, using the lvmtab file for it's mount parameters (instead of being hard coded). LV's that don't exist will be silently skipped (as opposed to error messages if they were in fstab). As far as sorting by depth, it's not going to happen. The file will be read sequentially and people will have to add nested mounts in the correct order in lvmtab. This simply gives people the ability the add/change LV's, plus adding the ability so specify mount options (like "quota"). - BS |