LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-10-2010, 04:07 PM   #1
Rameses
LQ Newbie
 
Registered: Jul 2010
Posts: 13

Rep: Reputation: 0
Missing Logical Volume


At first, we were getting:
/etc/init.d/mysql[19729]: ERROR: The partition with /var/lib/mysql is too full!
When we took a look at the df -h, one of the logical volumes were full. We extended the logical volume using:
lvextend -L30G /dev/VolGroup00/(name)
As the file system needs to be increased, we unmounted the partition using:
umount -l /dev/VolGroup00/(name)

We can't find the partition anymore. It cannot be mounted because it gives us the message:
mount: can't find /dev/VolGroup00/(name) in /etc/fstab or /etc/mtab

/etc/fstab already have the partition listed:
# /dev/mapper/VolGroup00-name
UUID=e894252d-fbe3-4441-8595-09d8a3f1965d / ext3 relatime,errors=remount-ro 0 1

Any LVM command gives the following message:
/proc/mounts: fopen %s failed: No such file or directory
/proc/devices: fopen failed: No such file or directory
What can be done to recover the lost Logical Volume? Any help is appreciated.

Last edited by Rameses; 08-10-2010 at 04:47 PM.
 
Old 08-11-2010, 10:41 AM   #2
tlowk
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Slackware
Posts: 184

Rep: Reputation: 36
1) try to find out if the LV still exists with the command

lvs


the entry in fstab if ok for the root, but maybe the database for mysql is in another LV so if you find something relevant with the lvs command you could try to mount it at the right place. See also 2 for the proc filesystem

for example

mount /dev/VolGroup00/(name) /var/lib/mysql

2) the errors you got could be cause by the fact that proc is not mounted
this could solve it

mount none /proc -t proc


3) Could you resize the filesystem already? in that case a reboot might fix it also.
 
Old 08-11-2010, 10:56 AM   #3
Rameses
LQ Newbie
 
Registered: Jul 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tlowk View Post
1) try to find out if the LV still exists with the command

lvs


the entry in fstab if ok for the root, but maybe the database for mysql is in another LV so if you find something relevant with the lvs command you could try to mount it at the right place. See also 2 for the proc filesystem

for example

mount /dev/VolGroup00/(name) /var/lib/mysql

2) the errors you got could be cause by the fact that proc is not mounted
this could solve it

mount none /proc -t proc


3) Could you resize the filesystem already? in that case a reboot might fix it also.
Thank you, reboot did fix the issue but the logical size still remains the same. The size hasn't changed. How can I resize the logical volume without losing any data?
 
Old 08-11-2010, 11:32 AM   #4
tlowk
Member
 
Registered: Nov 2003
Location: Belgium
Distribution: Slackware
Posts: 184

Rep: Reputation: 36
is there only a single LV mounted at / ?

In this case the problem can bethat you need software from /bin or /sbin which is on the umounted LV.

If this is the problem I see 2 solutions.

1) the most simple one : use a livecd

2) a bit more adventure?

Do this from a text screen (ALT-F3 or whatever and stop as much as possible all services, for instance 'init 2')

mount / -o remount,ro
lvs
lvresize
resize_filesystem (depends on which you use here0
mount / -o remount,rw
shutdown -h now

by remounting the filesystem readonly it remains readable and the changes by the filesystem_resize commands have exclusive write access)

restarting afterwards will make sure everything starts correct and there is nothing cached from before the resize. It shouldn't be needed, but lets play a bit safe here
 
  


Reply



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
How to rename a logical volume name tom_sawyer70 Linux - Server 2 07-17-2009 01:37 PM
Extending logical volume LogVol01 Insufficient allocatable logical exte swap space umeshsharma Linux - Newbie 4 06-22-2009 12:26 PM
Mounting logical volume? jdege Linux - General 3 12-15-2007 05:39 PM
Logical Volume Management 2 XaViaR Linux - General 5 08-20-2005 07:48 AM
resizing a logical volume nicentral AIX 2 06-11-2005 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:44 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration