On 04/07/2017 06:18 PM, Carlos E. R. wrote:
On 2017-04-08 02:43, Marc Chamberlin wrote:
On 04/07/2017 03:45 PM, Carlos E. R. wrote:
On 2017-04-07 22:03, Marc Chamberlin wrote:
Well this is one of those times I wish software designers would have followed the KISS principal, and design the Linux system in a way that is easily understandable, sigh... A recent set of updates broke, on one of my OpenSuSE Leap 42.2 x64 servers because of lack of disk space in the partition for the root partition for /. My investigations showed that the contents of /usr was taking up the lion's share of space (8GB) of the partition on which / is mounted, which only had 10GB of total space allocated to it. My /usr contains 32 GB of files. Wow! I will make a big partition for future growth! Mine is a bit extreme :-)
And it is not in a single partition, but three. One of them YaST said was too small today during an update.
Once the change is activated (fstab), you need to run mkinitrd to change the boot ramdisk.
Thanks Carlos for your guidance, just to be clear, (the devil is in the details as always...) the steps I think you are saying that I need to follow is - ?
1. Use Yast2 Partitioner to create a new partition and mount it as /usr_new
2. su root
3. cd /usr
4. cp -a * /usr_new This step I do with "mc". I'm lazy to remember all the proper switches. You have to ensure that hard/soft links stay. Also that sparse files remain sparse. The proper tool is rsync, but having a good look at the options. I use:
OPTIONS="--archive --acls --xattrs --hard-links --stats --human-readable "
5. Edit fstab so as to change the mount my new partition from /usr_new to /usr
now I am a bit unsure, I think I want to rename /usr to something else so that later I can delete it and recover the space, but the moment I do, I break a whole lot of the system!
6. mv /usr /usr_tmp
You say I need to activate the new fstab but at this point I would not be able to execute a mount command! Good point. I forgot that. You can try see what happens, perhaps. Try call "/usr_tmp/bin/mount", perhaps it works.
Or do much else for that matter. So should I perhaps just mount the new partition instead, on top of /usr and not rename it? What happens to the contents of my old /usr if I now do a mount -a and how would I eventually recover the space it occupies?
6. mount /usr Yes, you can certainly mount usr partition on top of /usr, yes. Nothing happens to it, simply it becomes not accessible.
Assuming I can get past step 6 somehow, which seems like a Catch22, and got /usr back, I think you are saying my next steps are -
7. mkinitrd If new partition is mounted on top of /usr, we need an extra step here. Halt computer, boot rescue system, rename /usr to /old_usr, create empty /usr.
8. reboot
9. Pray all goes well....
10. If all goes well and system boots up successfully and I have /usr_tmp then
11. su root
12. rm -rf /usr_tmp
Easy Piezzy eh? ;-) Well only if I can grok what step 6 should be... Marc... Last time I did this was over a year or two ago.
Another possibility of doing it all, is booting a rescue system, doing the partition-copy-move-fstab-edit thing, then chroot it all to run mkinitrd.
Thanks so much everyone for all the help and commentary! I managed to move /usr to a new partition following Carlos's instructions and for the most part all seems not bad although there is one anomaly that is occurring in the new version of my system. Launching Konsole from the KDE application menu launcher is taking an extraordinarily long time (3 to 5 minutes) before the Konsole window appears. But if I launch it from a command line, the window appears almost immediately. So far this is the only oddity I have noticed and launching any other KDE application seems to work just fine with windows appearing quickly. Only Konsole and the Terminal Super User Mode, when launched from the KDE application menu takes so long to respond. Weird! Anton - I really appreciated all your deep IN-Depth knowledge about /usr and I will incorporate some of your suggestions in breaking up /usr into separate partitions shortly. In particular /usr/share sounds like a good idea and it is almost 3GB. /usr/lib64 is the other big hog and seems like a good candidate to move to a separate partition. I am not a gamer and could care less about what is in there, I use my systems either for running servers or developing software for where I work. I only wish that the deep knowledge that you have about, the Linux filesystem, was better captured somewhere and easily discoverable by us poor mere users. But that is a whole nother subject that you don't want to get me started on! Perhaps when I retire I will work on creating a more user friendly OS where such knowledge can be easily shared and made discoverable/understandable by mere mortals! I do have a few ideas on how to do that, just need a lot of time and resources! LOL As for file system type of my new /usr partition, I chose to stay with Ext4. I got badly bit a while ago with using XFS and BtrFS, trying to figure out how to recover from file corruption issues with partitions using those file system types. I figure I will wait until they are more mature and perhaps integrated into fsck better. ReiserFS use to be offered in the YaST2 Partitioner but it no longer is, so I drew the conclusion (perhaps falsely) that OpenSuSE must not be supporting it for some reason, and I want to stick within the framework of tools that this distro wants to use, as best as I can.. David, L A Walsh, John - I will let you and others hash out the details of how the file system should be modeled, structured, and implemented. That is way beyond my abilities to grok at the moment! But I appreciate hearing your discussions and will follow along from the sideline as best as I can.. Marc... -- "The Truth is out there" - Spooky -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org