How to move /usr from LVM back to non-LVM?
Hello,
Ok, resizing my /var partition was without incident, so thanks much to the replies I got for reassurance...
Now, I have another thing I'd like to do, but it is only incidentally LVM related...
When this system was first set up - not by me - they put /home, /usr and /var on LVM partitions.
I'm fine with /home and /var, but I'd like to put /usr back as part of the / partition...
Has anyone ever done something like this before?
I'm thinking something along the lines of:
1. Boot off of livecd
2. mount /
3. Mount /usr
4. cp /usr to /usr2 on /
5. umount /usr
6. mv /usr2 /usr
?
Thanks for any comments/suggestions/how-to pointers...
Signature · 3 lines
Best regards, Charles
Charles Marcus a �crit :
Quoted 22 lines
Hello,
Ok, resizing my /var partition was without incident, so thanks much to the replies I got for reassurance...
Now, I have another thing I'd like to do, but it is only incidentally LVM related...
When this system was first set up - not by me - they put /home, /usr and /var on LVM partitions.
I'm fine with /home and /var, but I'd like to put /usr back as part of the / partition...
Has anyone ever done something like this before?
I'm thinking something along the lines of:
1. Boot off of livecd
2. mount /
3. Mount /usr
4. cp /usr to /usr2 on /
Quoted 8 lines
5. umount /usr
6. mv /usr2 /usr
?
Thanks for any comments/suggestions/how-to pointers...
Hi !
As file rights and protection are important on /usr,
Consider replacing #4 with :
(cd /usr && tar cf - . ) | (cd /usr2 && tar xpf -) as root
or if you prefer
still as root
dump 0uaf - /usr | (cd /usr2 && restore -rf -)
In this second way, you do not need to mount the original /usr (but in this case you've to give the device file to dump instead of /usr) But some people will question the reason you will move from LVM to plain filesystem/partitioning....
Signature · 3 lines
Ce message est constitu� d'au moins 50 % d'�lectrons recycl�s. S'il vous pla�t, aidez nous � conserver nos ressources, recyclez vos �lectrons !
Quoted 1 line · Georges Giralt
But some people will question the reason you will move from LVM to plain filesystem/partitioning....
Good point... and maybe my reason is not a 'good one'... ;)
My thinking is, since /usr is a critical system partition, it should be on the main system drive - which I always set up as a simple 2 drive mirror.
So, I'm now curious how/what other people generally use LVM for?
Signature · 3 lines
Best regards, Charles
Quoted 8 lines · Charles Marcus
Quoted 2 lines · Georges Giralt
But some people will question the reason you will move from LVM to plain filesystem/partitioning....
Good point... and maybe my reason is not a 'good one'... ;)
My thinking is, since /usr is a critical system partition, it should be on the main system drive - which I always set up as a simple 2 drive mirror.
I made that mistake on one system.
Quoted 1 line
So, I'm now curious how/what other people generally use LVM for?
And now I regret it because I can't use snapshots to take backups of the system. The only drawback to LVM is that initrd is trickier. And a good LiveCD makes it possible to recover from boot problems - even remotely.
Signature · 4 lines
Stuart D. Gathman <[email protected]> Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial.
Quoted 6 lines · Stuart D. Gathman
Quoted 1 line
So, I'm now curious how/what other people generally use LVM for?
And now I regret it because I can't use snapshots to take backups of the system. The only drawback to LVM is that initrd is trickier. And a good LiveCD makes it possible to recover from boot problems - even remotely.
Good point...
Actually my question was incomplete... it should have read:
I'm curious what partitions/directories other people use LVM for?
Signature · 3 lines
Best regards, Charles
I usually set up three partitions:
/boot
/
LVM
I don't use an initrd. I give '/boot' a partition -- the first partition -- to avoid any possibility of problems with the BIOS being able to find secondary loaders, kernels, and the like. So little goes here that I can be very generous and never have to think about resizing, and it'll still be tiny w.r.t. modern drive sizes.
The root volume is a partition because I don't do initrd. Mostly it's just mount points, critical libraries, kernel modules, and ~root. Again, I can size it generously without significant waste.
Everything else, even swap, goes into LVM so it's easy to resize. I've not yet found time to play with snapshotting.
If the box maker provides a diagnostic partition image, it goes in between '/boot' and '/'.
On a server box, this is all atop hardware RAID.
Signature · 3 lines
Mark H. Wood, Lead System Programmer [email protected] Typically when a software vendor says that a product is "intuitive" he means the exact opposite.
Quoted 2 lines · Mark H. Wood
If the box maker provides a diagnostic partition image, it goes in between '/boot' and '/'.
Yes, I wish more "box makers" did that. Too many provide hardware diagnostics that require Windows. I don't care what OS the diagnostics use if they actually *provide* a stripped down version of that OS in a diagnostic partition (which thankfully a large discount "box maker" does).
Signature · 4 lines
Stuart D. Gathman <[email protected]> Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial.
Charles Marcus a �crit :
Quoted 9 lines · Georges Giralt
Quoted 1 line
But some people will question the reason you will move from LVM to plain filesystem/partitioning....
Good point... and maybe my reason is not a 'good one'... ;)
My thinking is, since /usr is a critical system partition, it should be on the main system drive - which I always set up as a simple 2 drive mirror.
So, I'm now curious how/what other people generally use LVM for?
Just my 2 � here. I do not pretend to have the TRUTH ....
Said you've 2 identical drives for the system.
Set up 2 partitions onto them exactly the same.
The fisrt one, small will be used for /boot
The second one for everything else using LVM.
Set up software raid to make a first mirror of the two /boot
and another one for the LVM.
This way, you can boot and run your machine from any disk and you can even do a backup by splitting the raid....
IT has always worked except on my home machine where I was unable to insatall a Fedora system using software mirror AND lvm ..; Go figure ;-)
Signature · 3 lines
Ce message est constitu� d'au moins 50 % d'�lectrons recycl�s. S'il vous pla�t, aidez nous � conserver nos ressources, recyclez vos �lectrons !
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 1 line · Georges Giralt
insatall a Fedora system using software mirror AND lvm ..; Go figure ;-)
Was this because you were using text mode for configuration (the curses UI doesn't allow this), or did you hit some other problem?
Regards,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFIFgg36YSQoMYUY94RAhzxAKDCTdQSdZZQpQmdHz99w6Tprw+PzACfQS4T f4qgGE9KTGp4+9nkB2W+8Ek=
=1wLG
-----END PGP SIGNATURE-----
Quoted 2 lines · Georges Giralt
The fisrt one, small will be used for /boot
The second one for everything else using LVM.
Actually, I should have gone ahead and mention how I usually do it...
/boot (100MB)
/ (10GB - I know, but disks are cheap these days)
swap (1GB)
/tmp (1GB)
Then LVM for:
/home
/var
Signature · 3 lines
Best regards, Charles