LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-08-2005, 04:58 AM   #1
WeirdLabs
LQ Newbie
 
Registered: Jun 2004
Location: Copenhagen, Denmark.
Distribution: Ubuntu, Debian
Posts: 5

Rep: Reputation: 0
Unhappy Bad Harddrive on LVM group.


Oh, dear... Im' in trouble.

At my school we (a bunch of Linux-newbies) set up an Ubuntu(Debian) box for filesharing and printserver. And it works like a charm.

-Until a harddrive died...

/hda is the system-disk,
/hdb and /hdc are put together in a LVM-group and mounted as /home for user files and filesharing.
But /hdb is seriously unstable and tends to go dead within a day or two..

-So it needs to be thrown out, and a nother one installet. Yes, but what about the data ?
There is room enough on /hdc for all our data but the LVM-group is allocated 'Non-contiguous' -whatever that means....

So, dear nerds and Guru's, what do I do now ?
 
Old 09-14-2005, 04:12 AM   #2
WeirdLabs
LQ Newbie
 
Registered: Jun 2004
Location: Copenhagen, Denmark.
Distribution: Ubuntu, Debian
Posts: 5

Original Poster
Rep: Reputation: 0
Sigh...

No help found here..........
 
Old 09-14-2005, 04:59 AM   #3
lurker79
Member
 
Registered: Jan 2005
Location: UK
Posts: 55

Rep: Reputation: 16
you need to migrate the data of off /dev/hdb to do this you the following command assuming here that partition /dev/hdb1 is being used in the lvm setup and that you have enough space on your other physical volumes. run
pvmove /dev/hdb1
which will ensure that none of your lvm data is still stored on it
then you run
vgreduce vg0 /dev/hdb1
where vg0 is the name of your volume group (you can get this info from vgdisplay) this will remove partition /dev/hdb1 from that volume group if all goes well you can then remove you faulty drive
 
Old 09-14-2005, 05:35 AM   #4
WeirdLabs
LQ Newbie
 
Registered: Jun 2004
Location: Copenhagen, Denmark.
Distribution: Ubuntu, Debian
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks.

Thankyou Thankyou Thankyou Thankyou ....

I'll do that ASAP and get the box up and running again.
 
Old 09-14-2005, 05:43 AM   #5
lurker79
Member
 
Registered: Jan 2005
Location: UK
Posts: 55

Rep: Reputation: 16
The LVM howto is also a good resource
http://www.tldp.org/HOWTO/LVM-HOWTO/index.html
 
Old 09-15-2005, 06:48 AM   #6
WeirdLabs
LQ Newbie
 
Registered: Jun 2004
Location: Copenhagen, Denmark.
Distribution: Ubuntu, Debian
Posts: 5

Original Poster
Rep: Reputation: 0
Hmm... There seems to be a problem..

-----------
root@3e:~ # pvdisplay /dev/hdb1
--- Physical volume ---
PV Name /dev/hdb1
VG Name lager
PV Size 19,16 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 4905
Free PE 0
Allocated PE 4905
PV UUID iwKrdc-k1RA-cHhz-kzc4-q90U-Qe1o-HF6oTS
-------------
root@3e:~ # pvdisplay /dev/hdc1
--- Physical volume ---
PV Name /dev/hdc1
VG Name lager
PV Size 37,28 GB / not usable 0
Allocatable yes (but full)
PE Size (KByte) 4096
Total PE 9543
Free PE 0
Allocated PE 9543
PV UUID 48MiUC-d6Zl-J4XL-AMhx-3A1o-foMY-rxEWpg
-------------

root@3e:~ # pvmove /dev/hdb1
No extents available for allocation
------------

root@3e:~ # vgreduce lager /dev/hdb1
Physical volume "/dev/hdb1" still in use
-----------



I even tried to do it in Webmin
----------
Failed to remove physical volume :
File descriptor 8 left open
File descriptor 9 left open
No extents available for allocation
-----------


I don't get it......
According to the HOWTO that should do the trick, but my box refuses...
The entire VG was formatted as reiserfs after creation, if that the reason ?
I tried to use [resize_reiserfs], but I can't umount /home (VG mounted as /home).
 
Old 10-03-2005, 09:59 AM   #7
lurker79
Member
 
Registered: Jan 2005
Location: UK
Posts: 55

Rep: Reputation: 16
>root@3e:~ # pvmove /dev/hdb1
>No extents available for allocation

This appears to be your problem, you have no more room in your volume group, take a look at the output from vgdisplay.
You may need to add in more physical volumes if you do not have enough extents available.

When you have enough room left in your volume group pvmove will work fine.

Hope this helps.
 
  


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 do I resize LVM volume group? rconan Fedora 5 04-22-2009 07:45 PM
Partitions under LVM Volume Group won't mount after install jimisola Mandriva 4 11-16-2005 04:17 PM
Second Harddrive - LVM wazzujoel Linux - Newbie 2 06-30-2005 11:09 PM
LVM- 1 harddrive crashed =( daromer82 Linux - General 0 03-06-2004 06:14 PM
LVM Problem - vgimport - wrong number of physical volumes to import volume group Anything1 Linux - Software 0 09-06-2003 07:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 02:32 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