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!
In other words, the /usr directory was not mounted in a separate partition, it was just a sub directory. So I thought the solution would be to simply create a separate partition on another disk drive, copy everything from /usr to the new partition, edit fstab to mount the new partition as /usr, rename the old /usr directory to something different like /usr_tmp, reboot and then delete the old /usr_tmp directory if everything worked OK, Delete after rebooting, not before. Yeah, I thought I said that, but guess I wasn't clear... I don't delete anything until I know it is safe to do so..
to get more space for /. Easy as pie right? WRONG! Things went badly haywire when I tried to reboot! Apparently something within the boot loader or early in the boot process/system startup phase (which I admit I poorly understand) is referencing /usr and got very unhappy about my attempt to move /usr to it's own partition. So much for the KISS principal... 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 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! 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 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 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... -- "The Truth is out there" - Spooky -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org