LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   df not displaying logical volumes (https://www.linuxquestions.org/questions/linux-newbie-8/df-not-displaying-logical-volumes-941157/)

dthaler 04-22-2012 02:15 PM

df not displaying logical volumes
 
oel 5.7 64bit, created directories /u01-/u06, when i issued a df /u02 it displays the same information as /u03 /u04 or /u05... my fstab file has these entries:
/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0
/dev/usb1 /mnt/cdrom auto defaults 0 0
/dev/VolGroup01/u02 /u02 ext3 default 0 2
/dev/VolGroup02/u03 /u03 ext3 default 0 2
/dev/VolGroup03/u04 /u04 ext3 default 0 2
/dev/VolGroup03/u05 /u05 ext3 default 0 2
--------------------------------------------------------

i can add directories and files under each of the mount points, if i do a df /dev/VolGroup03/u05 it returns the same information as /dev/VolGroup01/u02 and i know that /u02 has my oracle database files while /u03 has no data ?

-------------------------------------

my pvcreate was /dev/sdb.sdc,sdd
vgcreate volgroup01 /dev/sdb
volgroup02 /dev/sdc
volgroup03 /dev/sdd
lvcreate -L 150G --name /u02 volgroup01
-L 100G --name /u03/ volgorup02

i ran a mkfs.ext3 on all the volgroups
mount /dev/volgroup01/u02
mount /dev/volgroup02/u03
---------------------------------
did i miss a step thats preventing the df command from returing the correct information ???

jschiwal 04-22-2012 03:38 PM

Use lvscan and use those device nodes. Check for a file system with "file -s" as root.

dthaler 04-22-2012 05:15 PM

[root@PHOENIX ~]# lvscan
ACTIVE '/dev/VolGroup03/u04' [100.00 GB] inherit
ACTIVE '/dev/VolGroup03/u05' [100.00 GB] inherit
ACTIVE '/dev/VolGroup03/u06' [100.00 GB] inherit
ACTIVE '/dev/VolGroup02/u03' [100.00 GB] inherit
ACTIVE '/dev/VolGroup01/u02' [150.00 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol00' [448.56 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [16.00 GB] inherit

don't see "file -s" as root ??

chrism01 04-22-2012 09:29 PM

I don't know if this is the problem, but all the lvcreates I've seen eg https://www.redhat.com/magazine/009jul05/features/lvm2/ specify the logvol name as just a string, without any '/'s.
Maybe that's what's confusing it?

jschiwal 04-22-2012 09:32 PM

Like this:
sudo file -s /dev/VolGroup02/u03

That will tell you if there is a filesystem, or a partition table, etc.

dthaler 04-23-2012 07:22 AM

the sudo command return this

/dev/VolGroup02/u03: symbolic link to `/dev/mapper/VolGroup02-u03'

having never done this before, do i need to recreate the the volgroups..if so could you give me a quick example using the one of the volgroups that i specified ??

acid_kewpie 04-23-2012 07:31 AM

can you SHOW us the df output?

catkin 04-23-2012 07:35 AM

What's the output from
Code:

/bin/ls -l /dev/VolGroup*/*
/bin/ls -l /dev/mapper/
/bin/ls -l /dev/dm-*

EDIT: and
Code:

/bin/df
cat /proc/mounts


dthaler 04-23-2012 07:39 AM

the lvcreate statement i used was lvcreate -L 100G --name /u03 volgroup02..

are you saying it should be lvcreate -L 110G --name u03 volgroupe02 ?

dthaler 04-23-2012 07:46 AM

[root@PHOENIX ~]# /bin/ls -l /dev/VolGroup*/*
lrwxrwxrwx 1 root root 31 Apr 16 07:31 /dev/VolGroup00/LogVol00 -> /dev/mapper/VolGroup00-LogVol00
lrwxrwxrwx 1 root root 31 Apr 16 07:31 /dev/VolGroup00/LogVol01 -> /dev/mapper/VolGroup00-LogVol01
lrwxrwxrwx 1 root root 26 Apr 16 11:31 /dev/VolGroup01/u02 -> /dev/mapper/VolGroup01-u02
lrwxrwxrwx 1 root root 26 Apr 16 11:31 /dev/VolGroup02/u03 -> /dev/mapper/VolGroup02-u03
lrwxrwxrwx 1 root root 26 Apr 16 11:31 /dev/VolGroup03/u04 -> /dev/mapper/VolGroup03-u04
lrwxrwxrwx 1 root root 26 Apr 16 11:31 /dev/VolGroup03/u05 -> /dev/mapper/VolGroup03-u05
lrwxrwxrwx 1 root root 26 Apr 16 11:31 /dev/VolGroup03/u06 -> /dev/mapper/VolGroup03-u06
[root@PHOENIX ~]# /bin/ls -l /dev/mapper/
total 0
crw------- 1 root root 10, 62 Apr 16 07:31 control
brw-rw---- 1 root disk 253, 0 Apr 16 11:31 VolGroup00-LogVol00
brw-rw---- 1 root disk 253, 1 Apr 16 07:31 VolGroup00-LogVol01
brw-rw---- 1 root disk 253, 6 Apr 16 11:31 VolGroup01-u02
brw-rw---- 1 root disk 253, 5 Apr 16 11:31 VolGroup02-u03
brw-rw---- 1 root disk 253, 2 Apr 16 11:31 VolGroup03-u04
brw-rw---- 1 root disk 253, 3 Apr 16 11:31 VolGroup03-u05
brw-rw---- 1 root disk 253, 4 Apr 16 11:31 VolGroup03-u06
[root@PHOENIX ~]# /bin/ls -l /dev/dm-*
brw-rw---- 1 root root 253, 0 Apr 16 07:31 /dev/dm-0
brw-rw---- 1 root root 253, 1 Apr 16 07:31 /dev/dm-1

[root@PHOENIX ~]# /bin/df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
455620456 181624492 250478372 43% /
/dev/sda1 147764 59608 80527 43% /boot
tmpfs 12363088 9940 12353148 1% /dev/shm
[root@PHOENIX ~]# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,relatime,errors=continue,user_xattr,acl,data=ordered 0 0
/dev /dev tmpfs rw,relatime,mode=755 0 0
/proc /proc proc rw,relatime 0 0
/sys /sys sysfs rw,relatime 0 0
/proc/bus/usb /proc/bus/usb usbfs rw,relatime 0 0
devpts /dev/pts devpts rw,relatime,gid=5,mode=620,ptmxmode=000 0 0
/dev/sda1 /boot ext3 rw,relatime,errors=continue,user_xattr,acl,data=ordered 0 0
tmpfs /dev/shm tmpfs rw,relatime 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
/etc/auto.misc /misc autofs rw,relatime,fd=7,pgrp=5318,timeout=300,minproto=5,maxproto=5,indirect 0 0
-hosts /net autofs rw,relatime,fd=13,pgrp=5318,timeout=300,minproto=5,maxproto=5,indirect 0 0
nfsd /proc/fs/nfsd nfsd rw,relatime 0 0

acid_kewpie 04-23-2012 07:47 AM

the LV's aren't mounted at all there...

dthaler 04-23-2012 07:47 AM

[root@PHOENIX ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
455620456 181624492 250478372 43% /
/dev/sda1 147764 59608 80527 43% /boot
tmpfs 12363088 9940 12353148 1% /dev/shm
[root@PHOENIX ~]# df -a
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
455620456 181624492 250478372 43% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
devpts 0 0 0 - /dev/pts
/dev/sda1 147764 59608 80527 43% /boot
tmpfs 12363088 9940 12353148 1% /dev/shm
none 0 0 0 - /proc/sys/fs/binfmt_misc
sunrpc 0 0 0 - /var/lib/nfs/rpc_pipefs
nfsd 0 0 0 - /proc/fs/nfsd

acid_kewpie 04-23-2012 07:48 AM

and that's no better

dthaler 04-23-2012 07:57 AM

[root@PHOENIX ~]# vgdisplay -A
--- Volume group ---
VG Name VolGroup03
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 2.27 TB
PE Size 4.00 MB
Total PE 594853
Alloc PE / Size 76800 / 300.00 GB
Free PE / Size 518053 / 1.98 TB
VG UUID j3swXv-Y9Ho-Yr4A-rpkC-Qr7c-J8hD-14QXAJ

--- Volume group ---
VG Name VolGroup02
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 2.27 TB
PE Size 4.00 MB
Total PE 594853
Alloc PE / Size 25600 / 100.00 GB
Free PE / Size 569253 / 2.17 TB
VG UUID mTCrk5-XwLc-gQ9X-DZ8S-Uu8L-G1XU-5pSLxI

--- Volume group ---
VG Name VolGroup01
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 2.27 TB
PE Size 4.00 MB
Total PE 594853
Alloc PE / Size 38400 / 150.00 GB
Free PE / Size 556453 / 2.12 TB
VG UUID Vm9duj-QEy2-UwEl-DLUy-mCCA-akeM-U16bj3

--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 464.56 GB
PE Size 32.00 MB
Total PE 14866
Alloc PE / Size 14866 / 464.56 GB
Free PE / Size 0 / 0
VG UUID pTNc9x-y1dm-f9Bk-zVgp-ZSEg-1mMm-l4w1IX

dthaler 04-23-2012 07:59 AM

so what should the mount command look like, i did this "mount /dev/volgroup01/u02", is this not correct ??


All times are GMT -5. The time now is 01:42 PM.