On Thu, 17 Feb 2005 15:29:54 -0800, Gregory K. Ruiz-Ade
<[EMAIL PROTECTED]> wrote:
> On Thursday 17 February 2005 03:08 pm, Carl Lowenstein wrote:
> > I painfully went through the process to rename VolGroup00-LogVol00 to
> > VG00-LV00, etc., just to make the names shorter, but this did not
> > help.
> >
> > So shell scripts that parse df(1) output by looking for lines that
> > begin with /dev no longer work as intended.  The data that belongs to
> > the /dev/xxx name is now on the following line, if it's a partition
> > managed by LVM.
> 
> I'm guessing your shorter names are still beyond the threshold that df uses
> to keep the data on a single line.  df seems to do that only with devices
> with long names...
> 
> My other question is why LVM devices were showing up
> as /dev/mapper/<vg>-<lv>, unless you specifically created them that way.
> I'm accustomed to the /dev/<volumegroup>/<logicalvolume> naming scheme,
> which still lets you be nice and short:
> 
> /dev/SysVol/boot
> /dev/SysVol/root
> /dev/SysVol/swap
> /dev/SysVol/tmp
> 
> etc.
> 
> for a time I used HPUX's convention of just numbers, i.e.,
> 
> /dev/vg00/lv01
> 
> but found that naming things made it easier for me.
> 
> And yes, I realize that I have been mostly unhelpful.

The names are set up as /dev/VG00/LV00 etc, with lines in /etc/fstab such as:
/dev/VG00/LV06 /data                   ext3    defaults        1 2
It is df(1) that reformats the information to look like:
/dev/mapper/VG00-LV06

A quick look through the source for coreutils-5.2.0 which I have here
online makes me believe that this special treatement of logical
volumes must have started in coreutils-5.2.1.  Current version is
5.2.1-31.

I'm heading off to look for those sources.  Just now I tried df from
coreutils-5.0, and it does the same two-line thing.  So I must have
missed it in my quick source scan.  Bah.

Meanwhile, a potential workaround  is some variety of script (awk by
my choice) that finds a line with only one field, and tacks the next
line onto its end.

    carl
-- 
    carl lowenstein         marine physical lab     u.c. san diego
                                                 [EMAIL PROTECTED]
-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to