View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 11 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Extending LVM setup
PostPosted: Fri Dec 24, 2004 7:48 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
The wiki is a bit vague on this point of setting up LVM, namely, the "expand the filesystem to use the new space" part:

http://knoppmythwiki.homelinux.org/inde ... driveHowTo

Trying to use the old /dev/hda4 partition along with a new drive at /dev/hdb. I am very close: pvscan shows I've got 324 GB in the volume group. But only the external drive is showing up as usable space.

I found this page on using lvextend:

http://www.tldp.org/HOWTO/LVM-HOWTO/extendlv.html

but then wasn't sure how to proceed from there. Do I umount the vg and then resize2fs, then remount? Do I need to shut down mythbackend before doing so? Just don't want to screw anything up. Thanks for the assistance.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 24, 2004 8:25 am 
Offline
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location: Silicon Valley, CA
It sort of depends which filesystem you have on your LVM partition. I used XFS which can be resized without unmounting and remounting. I think ext2 has to be unmounted, but I'm not an expert on that. The LVM built into KnoppMyth is LVM1 so your HOWTO page describes it pretty well. Were you able to extend the LV to take up the additional space on the PV?

The steps are:
    * add space to the Physical Volume
    * extend the Logical Volume to use the PV space
    * extend the filesystem to use the LV space

_________________
Do you code to live, or live to code?
Search LinHES forum through Google


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 24, 2004 10:14 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Thanks for the quick reply liv2cod, and Merry Xmas to you.

I'm pretty sure both the new external drive and /dev/hda4 are both set up as ext3... the HOWTO had the line from the manual Knoppmyth install instructions, and that says it's ext3.

The lvextend definitely seemed to work (I got some backbone and tried it after I posted), so it seems the only step left is the last one (extend the filesystem). Tried to umount /dev/vg/myth and it didn't let me. I guess I might have to boot up in single user mode to do this?

Again, thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 24, 2004 10:33 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
If you have any doubts at all as to the filesystem type you can always use the mount command without any options to see the types for all your mounted partions. For example:
Code:
root@black:/myth/tv # mount
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
/dev/root.old on /initrd type ext2 (rw)
none on /proc type proc (rw)
/dev/hda3 on /cache type ext2 (rw)
/dev/hda4 on /myth type ext3 (rw)
/dev/hdb1 on /myth/tv type ext3 (rw)

If a FS isn't already mounted you can always mount it (say under "/mnt/test") to double check this.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 24, 2004 4:19 pm 
Offline
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location: Silicon Valley, CA
In general, I know you can't unmount a filesystem if there are any programs using it. Maybe mythbackend or mythfrontend was running and had open file handles? Either way, single-user mode would definitely work. But you can probably stop the backend and frontend and unmount the volume.

Merry Christmas everyone!

_________________
Do you code to live, or live to code?
Search LinHES forum through Google


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 25, 2004 5:49 pm 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Well, the good news is that I did manage to get everything under one volume group and it indeed reports 320GB of disk space.

Bad news is that I continued to see horrible performance on the new secondary drive via hdparm. Decided to check the cabling, etc. And guess what? Broken pin on the drive connector! Surprised it worked at all. Of course, my letter to Seagate will say it must have come that way. Install error? No way. :shock:

Now, if any LVM folk are still there over Xmas, how do I get the drive back out? This way:

http://tldp.org/HOWTO/LVM-HOWTO/removeadisk.html

apparently only works if my old partition is as big or bigger than the drive I'm removing. It's not. Can I (effectively) work backwards from the LVM howto on the wiki, and copy the files back from /dev/hdb1 to /dev/hda4?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 25, 2004 6:23 pm 
Offline
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location: Silicon Valley, CA
Bummer, dude!

You should be able to reverse the instructions on the wiki. Mount the "old" partition, copy all the files to it, then make it the default 'myth' partition.

Is that drive connector pin just sheared off? Did it get bent over and pushed into the connector? I've only seen a failure like that once or twice in my life. Did you get the drive at a place with a 30-day warranty (like Fry's)? Maybe you can go that route if the drive is new.

_________________
Do you code to live, or live to code?
Search LinHES forum through Google


Top
 Profile  
 
 Post subject:
PostPosted: Sat Dec 25, 2004 7:50 pm 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Sheared off. I thought maybe it was supposed to be missing, but then I heard it rattling around and managed to shake it out. I will send it along as evidence.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 30, 2004 6:00 pm 
Offline
Joined: Tue May 25, 2004 2:33 pm
Posts: 42
Yeah, to remove a physical volume from a volume group, you have to shrink the file system to the point where it'll fit on the space that remains after the removal of the physical volume. I've never done this. Theoretically, it should work...

_________________
Athlon 700 + PVR-350. KnoppMyth R5A16. ReiserFS on an LVM volume for myth data. Thanks to SnapperDragon, everything seems quite happy.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 30, 2004 8:56 pm 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Had I stopped and thought about it for a minute, I could have done that pmmove thing and moved the extents off of /dev/hda4 onto /dev/hdb1, THEN removed /dev/hda4, then set it up as it was before, out of the volume group, THEN copied everything back off of hdb1. I was paranoid to use hdb1 since it was so slow and had the broken pin, but it was working, so I could have made it work that way. Oh well, live and learn.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 10, 2005 12:21 pm 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Just a follow-up.

The return to Seagate was relatively painless. Go to their website, type in the model and serial number, and they generate an RMA for you. I mailed it in the week after Xmas and I had the replacement back the week after New Year's. No questions asked. Good thing. :)

Installed the new drive and THIS time checked it with hdparm -tT /dev/hdb BEFORE I did the LVM thing. Checked out fine.

I followed the wiki instructions and got it and the old /dev/hda4 partition both in the same volume group. All seems to be working great.

I updated the LVM HowTo on the wiki with the additional steps you have to take to add in the old /myth partition to the LVM mix.

As always, thanks to everyone for the help.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu