Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Move to LVM2 Possible?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
birdo
n00b
n00b


Joined: 09 Aug 2004
Posts: 23
Location: State College, PA

PostPosted: Fri Aug 13, 2004 12:26 pm    Post subject: Move to LVM2 Possible? Reply with quote

I have an installed gentoo system, using only 1 drive out of 5 in the machine. What I want to do is make the move to LVM, using the remaining four disks in one large volume group for now. I would like to just 'move' /usr onto that new volume, and probably /home as well.

I am wondering if this is possible with the system up and running. Here is my current partition layout:
Code:

/dev/sda1 (compaq partition utils...)
/dev/sda2 (/boot)
/dev/sda3 (/tmp) 1024M
/dev/sda4 (/) 7.4GB (1.6GB used)


I would even be happy with the volume group consisting of all 5 drives, if thats the only way.

Anyone know if I can do this while preserving the data?
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Fri Aug 13, 2004 12:56 pm    Post subject: Reply with quote

I'm sure it's possible. This is how I'd do it, anyway.

  1. Create the new logical volumes, and do everything necessary to mount them. (Do something like this for each one. In this example, I'll usr /usr.)

  2. Mount the volume somewhere like /mnt/usr

  3. cp -a /usr/* /mnt/usr
    1. The -a switch will preserve the permissions

  4. Change your /etc/fstab to mount your new volume in /usr

  5. Mount it as /usr and try running random commands to see if your system is still usable.

  6. If it is, unmount it, and delete everything in your current /usr directory, and then remount it.

I don't think I've made any glaring errors in there, but check it though to make sure it makes sense to you before trying it. :wink:
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
birdo
n00b
n00b


Joined: 09 Aug 2004
Posts: 23
Location: State College, PA

PostPosted: Fri Aug 13, 2004 1:28 pm    Post subject: Reply with quote

I will definetly give it a shot. It's not critical, the reason i ended up with this crappy partitioning scheme in the first place is because I was having hardware problems while installing gentoo, and did not expect this installation to work... So now that I have emerged X and KDE, I would like to try to fix it up, rather than spend another 3 days of wall time waiting for those to emerge again ;)

Thanks for the input, that helps me a lot!
Back to top
View user's profile Send private message
birdo
n00b
n00b


Joined: 09 Aug 2004
Posts: 23
Location: State College, PA

PostPosted: Sun Aug 15, 2004 4:26 pm    Post subject: Reply with quote

Maedhro, just wanted to let you know that your steps worked just perfectly. They worked especially well after I spelled reiserfs correctly in fstab...

Thanks for the help, I appreciate it. You are cool in my book now. Not that I have a book, nor where you ever not cool in it, so you really get nothing out of this. But thanks anyways!
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20421

PostPosted: Mon Aug 16, 2004 3:45 pm    Post subject: Reply with quote

Moved from Installing Gentoo.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum