{"id":468,"date":"2011-01-28T00:30:38","date_gmt":"2011-11-24T21:51:50","guid":{"rendered":"http:\/\/kraftek.com\/blog\/resizing-on-oracle-enterprise-linux\/"},"modified":"2011-01-28T00:30:38","modified_gmt":"2011-11-24T21:51:50","slug":"resizing-on-oracle-enterprise-linux","status":"publish","type":"post","link":"\/blog\/index.php\/resizing-on-oracle-enterprise-linux\/","title":{"rendered":"resizing \/ on Oracle Enterprise Linux"},"content":{"rendered":"<p>i needed a bigger swap, its size was 2 Gb and we needed it to grow to 16gb, so we decided to shrink \/. A task anybody<br \/>\nwould say not possible.<br \/>\nSo we tuck in the first installation CD for oracle enterprise linux and when prompted for a kernel option we<br \/>\nissued<br \/>\n: linux recover<br \/>\nOnce asked to mount the root partition we said yes&#8230;<br \/>\nit ended up in \/dev\/VolGroup00\/LogVol00<br \/>\nwe checked a df -k, and it was mounted as \/mnt\/sysimage, and had a dev, proc and other directories<br \/>\nmounted inside, which were not evident in the df -k, so did a<br \/>\n# cat \/etc\/mtab<br \/>\nand found other dirs mounted, so for each entry in mtab inside \/mnt\/sysimage we unmounted it, and ended<br \/>\nup unmounting \/mnt\/sysimage<br \/>\n#umount \/mnt\/sysimage\/selinux<br \/>\n#umount \/mnt\/sysimage\/dev<br \/>\n#umount \/mnt\/sysimage\/sys<br \/>\n#umount \/mnt\/sysimage\/proc<br \/>\n#umount \/mnt\/sysimage\/boot<br \/>\n#umount \/mnt\/sysimage<br \/>\nTo reduce the filesystem, after unmounted and we issued:<br \/>\n# e2fsck -f \/dev\/VolGroup00\/LogVol00<br \/>\n# resize2fs \/dev\/VolGroup00\/LogVol00 110G<br \/>\nAfter that we needed to resize the volume, so we issued:<br \/>\n# lvm<br \/>\n&gt; lvreduce -L -16G \/dev\/VolGroup00\/LogVol00<br \/>\nAnd that did the trick to reduce the \/ filesystem<br \/>\nThen we booted up the server and resized the swap volume issuing:<br \/>\n# lvresize -L +16G \/dev\/VolGroup00\/LogVol01<br \/>\nHad to remake the swap area<br \/>\n190\/433<br \/>\n# swapoff \/dev\/VolGroup00\/LogVol01<br \/>\n# mkswap \/dev\/VolGroup00\/LogVol01<br \/>\nAnd remount it<br \/>\n# swapon -a<br \/>\nYou can verify the new swap size with a &#8220;top&#8221;<br \/>\n191\/433<\/p>\n","protected":false},"excerpt":{"rendered":"<p>i needed a bigger swap, its size was 2 Gb and we needed it to grow to 16gb, so we decided to shrink \/. A task anybody would say not possible. So we tuck in the first installation CD for oracle enterprise linux and when prompted for a kernel option we issued : linux recover [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-468","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=468"}],"version-history":[{"count":0,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/posts\/468\/revisions"}],"wp:attachment":[{"href":"\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=468"},{"taxonomy":"post_tag","embeddable":true,"href":"\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}