{"id":378,"date":"2012-10-09T13:22:18","date_gmt":"2012-10-09T11:22:18","guid":{"rendered":"http:\/\/songoku.homelinux.com\/wordpress\/?p=378"},"modified":"2012-10-09T13:22:18","modified_gmt":"2012-10-09T11:22:18","slug":"lvm-resizing","status":"publish","type":"post","link":"https:\/\/ndk.sytes.net\/wordpress\/?p=378","title":{"rendered":"LVM Resizing"},"content":{"rendered":"<p>\n\tHi,\n<\/p>\n<p>\n\t<strong>IMPORTANT: PLEASE ALWAYS BACKUP YOUR DATA FIRST BEFORE TOUCHING PARTITION TABLES ETC<\/strong>\n<\/p>\n<p>\n\tfirst there are a few tools we need to accomplish this: resize2fs, lvscan, lvresize. Use &quot;lvscan&quot; to show your LVM group(s).\n<\/p>\n<p>\n\tHere the steps to extend your LV:\n<\/p>\n<ol>\n<li>\n\t\t<em># lvscan<\/em><br \/>\n\t\tScans for available LV\n\t<\/li>\n<li>\n\t\t<em># fschk.ext3&nbsp;\/dev\/VolGroup00\/LogVol00<\/em><br \/>\n\t\tDoes a sanity check and corrections on the filesystem before further manipulation. Here the type is Ext3.\n\t<\/li>\n<li>\n\t\t<em># lvresize -L 15G&nbsp;\/dev\/VolGroup00\/LogVol00<\/em><br \/>\n\t\tSets capacity of the concerned LV (here LogVol00) to 15 GB\n\t<\/li>\n<li>\n\t\t<em># resize2fs&nbsp;\/dev\/VolGroup00\/LogVol00 15G<\/em><br \/>\n\t\tResizes the partition inside the LV to a capacity of 15 GB\n\t<\/li>\n<\/ol>\n<p>\n\tHere are the steps to shrink your LV:\n<\/p>\n<ol>\n<li>\n\t\t<em># lvscan<\/em><br \/>\n\t\tScans for available LV\n\t<\/li>\n<li>\n\t\t<em># fschk.ext3&nbsp;\/dev\/VolGroup00\/LogVol00<\/em><br \/>\n\t\tDoes a sanity check and corrections on the filesystem before further manipulation. Here the type is Ext3.\n\t<\/li>\n<li>\n\t\t<em># resize2fs&nbsp;\/dev\/VolGroup00\/LogVol00 15G<\/em><br \/>\n\t\tSets capacity of the concerned LV (here LogVol00) to 15 GB\n\t<\/li>\n<li>\n\t\t<em># lvresize -L 15G&nbsp;\/dev\/VolGroup00\/LogVol00<\/em><br \/>\n\t\tSets capacity of the concerned LV (here LogVol00) to 15 GB\n\t<\/li>\n<\/ol>\n<p>\n\tAll these steps can be done with the disk online, except for the root partition. If you want to modify this, you have to boot into a live cd. Also note that step 3 and 4 are inverted. If you want to increase your capacity you first need to grow your LV then the partition, if you want to shrink your capacity first shrink your partition then the LV. PLEASE TAKE CARE that your LV is NOT smaller than your partition! In this case DATA LOSS is almost sure.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, IMPORTANT: PLEASE ALWAYS BACKUP YOUR DATA FIRST BEFORE TOUCHING PARTITION TABLES ETC first there are a few tools we need to accomplish this: resize2fs, lvscan, lvresize. Use &quot;lvscan&quot; to show your LVM group(s). Here the steps to extend your LV: # lvscan Scans for available LV # fschk.ext3&nbsp;\/dev\/VolGroup00\/LogVol00 Does a sanity check and corrections [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,7],"tags":[],"class_list":["post-378","post","type-post","status-publish","format-standard","hentry","category-linuxunix","category-servers"],"_links":{"self":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=378"}],"version-history":[{"count":0,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/378\/revisions"}],"wp:attachment":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=378"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=378"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}