2009/1/22 Duncan <[email protected]>: > Beso <[email protected]> posted > [email protected], excerpted > below, on Thu, 22 Jan 2009 20:03:55 +0100: > >> as for the / i'm considering using / + /boot on a usb disk (nowadays >> booting from usb devices is no pain) and would prevent me from >> exposing ciphered luks data. it's true that loosing the key would >> mean a total disaster, but it's simpler to have 2-3 2gb usb keys (which >> mean about 20-30€) as root and have an entire luks+raided partition. > > Something I found out the hard way, and why I have everything that > portage touches on the same partition, is the trouble one goes thru when > the /var/db/pkg database doesn't match what's actually installed, due to > say /, /usr, and /var being on different partitions/volumes, then losing > one and having to revert to a backup, while still having the others at > "current". > i'm using /var/ mounted on a lvm2 partition and never had any issues with it. this is due to the fact that /var and /usr is mounted right after dm-crypt+lvm2 have started, and if the mount fails then i have services not starting since the /var on the / partition is not available for services to write in it.
> So here, that's all on the same partition. I break off /usr/src, > /usr/local and /var/log, and have the Gentoo tree living somewhere other > than on /usr as well, but anything that portage touches including its > database is all on the same partition, so it all stays in sync if I have > to revert to a backup. > /usr also is mounted on another lvm2 partition (this helped me a lot with oracle and kde installations) but i had to do some hacks since actually i need some /usr/lib/ files at boot on the / partition before lvm2 is started and this is really a bug, since the /usr shouldn't be read at startup. > When I setup this system, since / and its backup are not in LVM, I wanted > to give them even more room for growth than I thought I'd need, so I > doubled what I was using for growth, and then nearly doubled that again, > 10 gig partition size. I currently have both kde3 and kde4 installed so > am running rather more than I would otherwise, but I'm running 4.3 gig > on /. So a 4 gig USB stick would do it in most cases, an 8-gig stick > would be plenty and to spare, but a 2 gig stick wouldn't cut it. > with everything stripped from / i found out that it requires less than a 2gb disk. and i really think that you could move out /usr/kde to an lvm partition since it would be mounted (if fstab knows about it) before xorg is started. the problem with my configuration is that you'd have sometimes to reboot on a lvm2 capable environment to resize /usr or /var if something is on use (/var could be resized after shutting down all processes accessing it, but i think it's faster to boot in a simple stripped down terminal distro with lvm2 capabilities to have it resized. what i'm now considering is moving from rsync to git for the backup (this would help me out understanding more into detail git). > Not that anyone else necessarily needs to use my "everything portage > touches on one partition" strategy, but I certainly learned /my/ lesson, > and don't intend on screwing /that/ one up here again. It's worth > considering, anyway. YMMV. > i really don't really understand how you could have had this issue if you'd mount the lvm partition at boot via fstab. it's most likely to not happen anything. -- dott. ing. beso
