Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Merging LVM /usr back into / - don't want an initramfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
libertytrek
Apprentice
Apprentice


Joined: 18 Jul 2007
Posts: 258

PostPosted: Sun Dec 08, 2013 7:37 pm    Post subject: Merging LVM /usr back into / - don't want an initramfs Reply with quote

Hello all,

This is probably really basic stuff for most of you, but I was more than a little nervous about doing this on a live server.

That said, it was pretty much the most anti-climactic thing I've ever done on a server...

After much googling and reading and bugging people on both the gentoo user and rsync lists, I finally took the plunge, and it took all of about 6 minutes, the longest part being the rsync of /usr...

Ok, here are the steps that I took to merge my /usr (which was on a separate LVM partition) back into /...

1. cd /

2. mkdir tmp-usr

3. rsync -avHP --numeric-ids /usr/ /tmp-usr/

4. Reboot into single user mode

5. cd /

5. ls -al /usr and confirm it is empty (since it isn't mounted) - I like to be sure/safe

6. mv usr OLD-usr (I mounted the old LVM usr partition to OLD-usr)

7. mv tmp-usr usr

8. edit /etc/fstab, comment out the /usr line:

#/dev/vg/usr /usr reiserfs noatime 0 0

9. reboot

It was that simple...

Thanks to all who patiently answered my questions while I was prepping myself for this...
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Sun Dec 08, 2013 9:57 pm    Post subject: Reply with quote

You need a huuuge / partition for this. Usually when you start out with separate partitions for everything, / is not large enough to hold /usr.

I merged it in the other direction (/ to /usr instead of /usr to /) for that reason; of course it wouldn't have solved your problem then as with / on LVM you still need initramfs.
Back to top
View user's profile Send private message
libertytrek
Apprentice
Apprentice


Joined: 18 Jul 2007
Posts: 258

PostPosted: Sun Dec 08, 2013 10:26 pm    Post subject: Reply with quote

frostschutz wrote:
You need a huuuge / partition for this. Usually when you start out with separate partitions for everything, / is not large enough to hold /usr.

Depends on what you mean by 'huge'...

My / is 20GB, my /usr was 3.3GB (after eliminating unnecessary old kernels and moving /usr/portage)...

So, plenty of room. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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