LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-12-2005, 10:58 AM   #1
joshnya
Member
 
Registered: Feb 2003
Location: Boston, MA
Distribution: RedHat 9
Posts: 39

Rep: Reputation: 15
/dev/mapper directory


When I enter the df -H command I see I have a:

/dev/mapper/VolGroup00-LogVo100 partition of 19GB that is 100% used.

I'm not quite sure what this partition is and when I cd /deb/mapper/ I have 3 files....a control file, a VolGroup00-LogVo100 and a VolGroup00-LogVo101

Can anybody please explain how to make some available space on this partition? Is it safe to kill these 3 files or any of them?

Thanks very much for the help !!!
 
Old 09-14-2005, 08:49 AM   #2
pats
Member
 
Registered: Jul 2005
Distribution: Debian Sarge/Etch, (K)Ubuntu, FC6, AIX5.3, VMWare ESXServer
Posts: 159

Rep: Reputation: 30
wo wo wo. slow down you don't wanna start deleting these things.

a volume group is essentially a hard drive and a logical volume is a partition but its a bit more than that. i'll give a more in depth description later on if you wanna hear more about LVs a VGs

right if you give a full output of your df -h then it would be more helpful.

it depends on how you've got your volume group all set up as to what this logical volume is for. i might well be your swap partition and if thats the case then sometimes it will report to be at 100% usage but i doubt very much a default install gave you a 19Gig swap partition. if you look to the left ot the /dev/mapper/VolGro.... you'll see where its mounted. this might just say / or something else.

whatever this directory is will be where all the files are that are taking up 100% of the drive. most likely you've filled your drive up somehow unknowingly

just a small word everythign in the /dev directory is a device (well its a pointer to a device) so when at startup /dev/mapper/VolG..... will be mounted on / or /pat or wherever its set to mount.

this might seem quite strange because how can you mount something thats in /dev/mapper... onto / when thats inside it... (hope that makes sense) it does seem like a circular argument until you take into account the /proc file system.

/proc is where the devices really are. have a look arroun (not editing anyhting mind you) and see what you can find in /proc. plenty of info about all your hardware.

ok so now volume groups

you can 2 or more drives together an create a volume group out of them which essentially acts as one drive. not quite like raid but similar and done at a software level. logical volumes are the partitions you get when you carve you volume group up.
not the best explaination ever but hope you get the idea
 
Old 09-14-2005, 08:57 AM   #3
joshnya
Member
 
Registered: Feb 2003
Location: Boston, MA
Distribution: RedHat 9
Posts: 39

Original Poster
Rep: Reputation: 15
Thanks pats !!! Here are the outputs of my system. Is it better to leave the system with LV and VG rather than the traditional /dev/hd## business ??? All this machine is is a file server on the 2nd FAT32 drive. I don't do anything with the primary OS drive.


root@FTP etc]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00 18G 17G 0 100% /
/dev/hdb1 58G 37G 21G 64% /mnt/share
/dev/hda1 99M 13M 82M 13% /boot
none 315M 0 315M 0% /dev/shm
/dev/hdd1 58G 39G 19G 68% /mnt/backup


Here is the fdisk

[root@FTP boot]# fdisk -l

Disk /dev/hda: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 2434 19446682+ 8e Linux LVM

Disk /dev/hdb: 61.4 GB, 61492838400 bytes
255 heads, 63 sectors/track, 7476 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 7476 60050938+ c W95 FAT32 (LBA)

Disk /dev/hdd: 61.4 GB, 61492838400 bytes
16 heads, 63 sectors/track, 119150 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

Device Boot Start End Blocks Id System
/dev/hdd1 1 119150 60051568+ c W95 FAT32 (LBA)
 
Old 09-14-2005, 09:18 AM   #4
pats
Member
 
Registered: Jul 2005
Distribution: Debian Sarge/Etch, (K)Ubuntu, FC6, AIX5.3, VMWare ESXServer
Posts: 159

Rep: Reputation: 30
well as far as i know you can't convert a drive thats been formatted with volume groups back to plain old /dev/hdXX

just humour me by running du -ch /home and tell me what the total is at the end

then

umount /dev/hdb1
umount /dev/hdd1
du -ch /mnt
and tell me the total for that.

i suspect theres been a load of data dumped where it shouldn't be

how are you sharing this data as a file server??
samba ... nfs..ftp?

a default install of redhat shouldn't be 20 gig so something must have been put onto it somewhere
 
Old 09-14-2005, 09:26 AM   #5
joshnya
Member
 
Registered: Feb 2003
Location: Boston, MA
Distribution: RedHat 9
Posts: 39

Original Poster
Rep: Reputation: 15
#du -ch /home
2M

#du -ch /dev hdb1
26GB

#du -ch /dev hdd1
28GB

#du -ch /mnt
17GB


So this means the /mnt directory is holding all this data.

I do have a backup script that copies new data from hdb --> hdd. Perhaps the script tried to put the backup into the mnt directory instead.

All these drives are Samba shares.


I guess the root of my qutestion is...is it better to leave the sytem as LVG config'ed instead of trying to get it back to the hda "style". Does it matter one way or the other?
 
Old 09-14-2005, 09:49 AM   #6
pats
Member
 
Registered: Jul 2005
Distribution: Debian Sarge/Etch, (K)Ubuntu, FC6, AIX5.3, VMWare ESXServer
Posts: 159

Rep: Reputation: 30
Quote:
Originally posted by joshnya
#du -ch /home
2M

#du -ch /dev hdb1
26GB

#du -ch /dev hdd1
28GB

#du -ch /mnt
17GB


So this means the /mnt directory is holding all this data.
seems that way

if with hdb and hdd unmounted you do a ls /mnt and see what comes about

you did do these commands in this order didn't you?


umount /dev/hdb1
umount /dev/hdd1
du -ch /mnt

and that gave you the 17Gig after du -ch /mnt ?


Quote:

I do have a backup script that copies new data from hdb --> hdd. Perhaps the script tried to put the backup into the mnt directory instead.
would be a fair assumption. do you mind posting the script?

Quote:

I guess the root of my qutestion is...is it better to leave the sytem as LVG config'ed instead of trying to get it back to the hda "style". Does it matter one way or the other?
leave it as it is. its not gonna cause any harm. its just a different way of doing things
 
Old 09-14-2005, 10:46 AM   #7
joshnya
Member
 
Registered: Feb 2003
Location: Boston, MA
Distribution: RedHat 9
Posts: 39

Original Poster
Rep: Reputation: 15
and that gave you the 17Gig after du -ch /mnt ?




would be a fair assumption. do you mind posting the script?

it's a cronjobs script:

the /mnt/backup is mounted with /dev/hdd1 device.


45 20 * * 1-5 cp -Ru /mnt/share/Share /mnt/backup

would it be better / possible to:

cp -Ru /dev/hdb1 /dev/hdd1 instead?

Last edited by joshnya; 09-14-2005 at 10:47 AM.
 
Old 09-14-2005, 11:20 AM   #8
pats
Member
 
Registered: Jul 2005
Distribution: Debian Sarge/Etch, (K)Ubuntu, FC6, AIX5.3, VMWare ESXServer
Posts: 159

Rep: Reputation: 30
Quote:
Originally posted by joshnya
and that gave you the 17Gig after du -ch /mnt ?




would be a fair assumption. do you mind posting the script?

it's a cronjobs script:

the /mnt/backup is mounted with /dev/hdd1 device.


45 20 * * 1-5 cp -Ru /mnt/share/Share /mnt/backup

would it be better / possible to:

cp -Ru /dev/hdb1 /dev/hdd1 instead?
ok firstly cp -Ru /dev/hdb1 /dev/hdd1 will not be good. they are the linkers to the devices (read my earlier post.) you mount the device in a certain place ie /mnt/backup in order to access it. this is why you can't do cd /dev/hdd1 and see all your files.

right. the cron job looks ok but again can you just do these commands and tell me what you get.

umount /dev/hdb1
umount /dev/hdd1
df -ch /mnt

and also
ls /mnt to see whats there
and
ls /mnt/share
and
ls /mnt/backup

if you've unmounted those 2 drives and theres nothing else mounted in /mnt then it shouldn't contain any data

if you copy the exact output of the above commands then i should be able to help a bit more
 
Old 09-14-2005, 11:47 AM   #9
joshnya
Member
 
Registered: Feb 2003
Location: Boston, MA
Distribution: RedHat 9
Posts: 39

Original Poster
Rep: Reputation: 15
Okay. I figured it out. Thanks for the help Pats. I really appreciate it.

The copy command copied the hdb1 image to the /mnt/backup directory when the /deb/hdd1 was not mounted so it copied files to the primary hard drive instead of the 3rd hard drive.

Thanks again Pats !!
 
Old 09-14-2005, 11:50 AM   #10
pats
Member
 
Registered: Jul 2005
Distribution: Debian Sarge/Etch, (K)Ubuntu, FC6, AIX5.3, VMWare ESXServer
Posts: 159

Rep: Reputation: 30
thats what i suspected but good on you for working it out
 
Old 09-14-2005, 12:12 PM   #11
joshnya
Member
 
Registered: Feb 2003
Location: Boston, MA
Distribution: RedHat 9
Posts: 39

Original Poster
Rep: Reputation: 15
Would it be safe to assume I could ensure /dev/hdd1 is mounted by adding to my cronjob task by doing this?

45 20 * * 1-5 mount /dev/hdd1 /mnt/backup cp -Ru /mnt/share/Share /mnt/backup

or would I have to add a second line like this to run a few minutes earlier ?

43 20 * * 1-5 mount /dev/hdd1 /mnt/backup
45 20 * * 1-5 cp -Ru /mnt/share/Share /mnt/backup
 
Old 09-15-2005, 04:09 AM   #12
pats
Member
 
Registered: Jul 2005
Distribution: Debian Sarge/Etch, (K)Ubuntu, FC6, AIX5.3, VMWare ESXServer
Posts: 159

Rep: Reputation: 30
nope you need to add it to your fstab so it mounts at boot

/dev/hde1 /mnt/hde1 vfat users 0 0

something like that
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Managing the /dev directory Woodsman Slackware 7 10-18-2005 09:44 PM
/dev directory Dave-Bowskill Programming 0 09-20-2004 12:52 AM
/dev directory class_struggle Linux - Newbie 2 07-13-2004 01:30 PM
/dev directory nny0000 Slackware 3 02-03-2004 07:37 PM
/dev directory phishman3579 Slackware 3 12-02-2003 05:18 PM


All times are GMT -5. The time now is 05:21 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration