{"id":195,"date":"2012-06-09T13:57:52","date_gmt":"2012-06-09T13:57:52","guid":{"rendered":"https:\/\/shan.info\/new\/1and1-augement-volum\/"},"modified":"2012-06-09T13:57:52","modified_gmt":"2012-06-09T13:57:52","slug":"1and1-augement-volum","status":"publish","type":"post","link":"https:\/\/shan.info\/new\/1and1-augement-volum\/","title":{"rendered":"1and1 augement volum"},"content":{"rendered":"<h1 style=\"font-size: 24px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif; color: #0a328c;\">How can I increase a logical volume?<\/h1>\n<p>&nbsp;<\/p>\n<table cellpadding=\"4\" cellspacing=\"2\" border=\"0\" style=\"font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif; width: 100%;\">\n<tbody>\n<tr>\n<td align=\"left\" valign=\"top\" width=\"70\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\"><b>Step&nbsp;1<\/b><\/td>\n<td align=\"left\" valign=\"top\" width=\"*\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\">First, log into the server via SSH.<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" width=\"70\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\"><b>Step&nbsp;2<\/b><\/td>\n<td align=\"left\" valign=\"top\" width=\"*\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\">Once logged in, type&nbsp;<span style=\"background-color: #ffbb00; font-family: monospace;\">df &#8211; h<\/span>&nbsp;at the command prompt and hit&nbsp;<b>ENTER<\/b>. The partition and logical volume sizes will be listed including the used disk space. In the image below, the var logical volume is 4GB. Assume that ~9GB of web content will be uploaded to the \/var folder. The disk space needs to be increased before there is enough space to upload the content.<\/p>\n<p><b>Further Explanation:<\/b>&nbsp;<br \/><span style=\"background-color: #ffbb00; font-family: monospace;\">df<\/span>&nbsp;<img decoding=\"async\" alt=\"arrow image\" src=\"http:\/\/faq.1and1.co.uk\/image\/misc_pfeil.gif\" \/>&nbsp;This is the&nbsp;<b>d<\/b>isk&nbsp;<b>f<\/b>ree space command which will display disk usage information.<br \/><span style=\"background-color: #ffbb00; font-family: monospace;\">-h<\/span>&nbsp;<img decoding=\"async\" alt=\"arrow image\" src=\"http:\/\/faq.1and1.co.uk\/image\/misc_pfeil.gif\" \/>&nbsp;This option forces the output to be in&nbsp;<b>h<\/b>uman readable format. This will display sizes in KB, MB or GB.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/faq.1and1.co.uk\/image\/dedicated\/linux\/admin\/lvGrow1.png\" alt=\"lvGrow1.png\" title=\"lvGrow1.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" width=\"70\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\"><b>Step&nbsp;3<\/b><\/td>\n<td align=\"left\" valign=\"top\" width=\"*\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\">Next, type&nbsp;<span style=\"background-color: #ffbb00; font-family: monospace;\">fdisk -l<\/span>&nbsp;to view the total hard disk(s) size and partitions on the disk. It can also be noticed here that the physical partition \/dev\/sda3 is using Linux LVM.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/faq.1and1.co.uk\/image\/dedicated\/linux\/admin\/lvGrow2.png\" alt=\"lvGrow2.png\" title=\"lvGrow2.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" width=\"70\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\"><b>Step&nbsp;4<\/b><\/td>\n<td align=\"left\" valign=\"top\" width=\"*\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\">Type the&nbsp;<span style=\"background-color: #ffbb00; font-family: monospace;\">pvs<\/span>&nbsp;command and press&nbsp;<b>Enter<\/b>.<\/p>\n<p><b>Further Explanation:<\/b>&nbsp;<br \/><span style=\"background-color: #ffbb00; font-family: monospace;\">pvs<\/span>&nbsp;<img decoding=\"async\" alt=\"arrow image\" src=\"http:\/\/faq.1and1.co.uk\/image\/misc_pfeil.gif\" \/>&nbsp;<b>P<\/b>hysical&nbsp;<b>V<\/b>olume&nbsp;<b>S<\/b>how command.<br \/><b>PV<\/b>&nbsp;<img decoding=\"async\" alt=\"arrow image\" src=\"http:\/\/faq.1and1.co.uk\/image\/misc_pfeil.gif\" \/>&nbsp;<b>P<\/b>hysical&nbsp;<b>V<\/b>olume path<br \/><b>VF<\/b>&nbsp;<img decoding=\"async\" alt=\"arrow image\" src=\"http:\/\/faq.1and1.co.uk\/image\/misc_pfeil.gif\" \/>&nbsp;<b>V<\/b>olume&nbsp;<b>G<\/b>roup name.<br \/><b>Fmt<\/b>&nbsp;<img decoding=\"async\" alt=\"arrow image\" src=\"http:\/\/faq.1and1.co.uk\/image\/misc_pfeil.gif\" \/>&nbsp;LVM&nbsp;<b>F<\/b>or<b>m<\/b>a<b>t<\/b>&nbsp;<br \/><b>Attr<\/b>&nbsp;<img decoding=\"async\" alt=\"arrow image\" src=\"http:\/\/faq.1and1.co.uk\/image\/misc_pfeil.gif\" \/>&nbsp;Physical volume&nbsp;<b>attr<\/b>ibutes. The&nbsp;<b>a<\/b>&nbsp;attribute means that the physical volume is&nbsp;<b>a<\/b>llocatable and not read-only.<br \/><b>PSize<\/b>&nbsp;<img decoding=\"async\" alt=\"arrow image\" src=\"http:\/\/faq.1and1.co.uk\/image\/misc_pfeil.gif\" \/>&nbsp;<b>P<\/b>hysical&nbsp;<b>Size<\/b>&nbsp;of the physical volume.<br \/><b>PFree<\/b>&nbsp;<img decoding=\"async\" alt=\"arrow image\" src=\"http:\/\/faq.1and1.co.uk\/image\/misc_pfeil.gif\" \/>&nbsp;<b>P<\/b>hysical&nbsp;<b>Free<\/b>&nbsp;space left on the physical volume.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/faq.1and1.co.uk\/image\/dedicated\/linux\/admin\/lvGrow3.png\" alt=\"lvGrow3.png\" title=\"lvGrow3.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" width=\"70\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\"><b>Step&nbsp;5<\/b><\/td>\n<td align=\"left\" valign=\"top\" width=\"*\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\">As stated above, our scenario requires roughly 9GB of data to be uploaded to the \/var folder. Since the logical volume assigned to \/var is only 4GB, we will increase this to 10GB using the&nbsp;<b>lvextend<\/b>&nbsp;command.&nbsp;<span color=\"red\" style=\"color: red;\"><b>The command below is to be used as reference only as the parameters will be different depending on your scenario.<\/b>&nbsp;<\/span><\/p>\n<p>The format for the lvextend command is as follows:<br \/><span style=\"background-color: #ffbb00; font-family: monospace;\">lvextend -L +1G \/dev\/mapper\/vg00-var<\/span><\/p>\n<p><b>Further Explaination:<\/b>&nbsp;<br \/><span style=\"background-color: #ffbb00; font-family: monospace;\">lvextend<\/span>&nbsp;<img decoding=\"async\" alt=\"arrow image\" src=\"http:\/\/faq.1and1.co.uk\/image\/misc_pfeil.gif\" \/>&nbsp;This is the&nbsp;<b>l<\/b>ogical&nbsp;<b>v<\/b>olume&nbsp;<b>extend<\/b>&nbsp;command used to make a logical volume larger.<br \/><span style=\"background-color: #ffbb00; font-family: monospace;\">-L +6G<\/span>&nbsp;<img decoding=\"async\" alt=\"arrow image\" src=\"http:\/\/faq.1and1.co.uk\/image\/misc_pfeil.gif\" \/>&nbsp;It is specified using the&nbsp;<b>L<\/b>ogical volume size option, how much larger to make the volume. In this scenario, 6 gigabytes is added to the current 4 gigabyte volume to result in a 10 gigabyte volume.<br \/><span style=\"background-color: #ffbb00; font-family: monospace;\">\/dev\/mapper\/vg00-var<\/span>&nbsp;<img decoding=\"async\" alt=\"arrow image\" src=\"http:\/\/faq.1and1.co.uk\/image\/misc_pfeil.gif\" \/>&nbsp;The path to the logical volume is specified last. The path to the volume to be extended was taken from the output from the second step in this guide.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/faq.1and1.co.uk\/image\/dedicated\/linux\/admin\/lvGrow4.png\" alt=\"lvGrow4.png\" title=\"lvGrow4.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" width=\"70\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\"><b>Step&nbsp;6<\/b><\/td>\n<td align=\"left\" valign=\"top\" width=\"*\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\">Type&nbsp;<span style=\"background-color: #ffbb00; font-family: monospace;\">df -h<\/span>&nbsp;to display the&nbsp;<b>d<\/b>isk&nbsp;<b>f<\/b>ree space once again. The lvextend operation finished successfully in the last step however the \/dev\/mapper\/vg00-var size is still only showing 4.0G. This is because while the logical volume was increased successfully, the file system needs to be extended to take advantage of the full space of the logical volume.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/faq.1and1.co.uk\/image\/dedicated\/linux\/admin\/lvGrow5.png\" alt=\"lvGrow5.png\" title=\"lvGrow5.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" width=\"70\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\"><b>Step&nbsp;7<\/b><\/td>\n<td align=\"left\" valign=\"top\" width=\"*\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\">Type&nbsp;<span style=\"background-color: #ffbb00; font-family: monospace;\">lvs<\/span>&nbsp;to show the logical volume information once again. Here, we can confirm that the logical volume has successfully been extended to 10 gigabytes. In the next steps, we will increase the file system to match the logical volume size.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/faq.1and1.co.uk\/image\/dedicated\/linux\/admin\/lvGrow6.png\" alt=\"lvGrow6.png\" title=\"lvGrow6.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" width=\"70\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\"><b>Step&nbsp;8<\/b><\/td>\n<td align=\"left\" valign=\"top\" width=\"*\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\">Type&nbsp;<span style=\"background-color: #ffbb00; font-family: monospace;\">mount<\/span>&nbsp;and press&nbsp;<b>ENTER<\/b>&nbsp;to display the mounted file systems. From the output, we find that the \/dev\/mapper\/vg00-var logical volume is using&nbsp;<b>xfs<\/b>&nbsp;(with the introduction of CentOS 6, the default filesystem is&nbsp;<b>ext4<\/b>).<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/faq.1and1.co.uk\/image\/dedicated\/linux\/admin\/lvGrow7.png\" alt=\"lvGrow7.png\" title=\"lvGrow7.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" width=\"70\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\"><b>Step&nbsp;9<\/b><\/td>\n<td align=\"left\" valign=\"top\" width=\"*\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\">To increase the file system to match that of the logical volume, we will use the&nbsp;<b>xfs_growfs<\/b>&nbsp;command if the filesystem uses xfs or&nbsp;<b>resize2fs<\/b>&nbsp;if the filesystem is ext4.<\/p>\n<p>Typing&nbsp;<span style=\"background-color: #ffbb00; font-family: monospace;\">xfs_growfs \/var<\/span>&nbsp;or&nbsp;<span style=\"background-color: #ffbb00; font-family: monospace;\">resize2fs \/dev\/mapper\/vg00-var<\/span>&nbsp;(depending on which filesystem is used on your system) will extend the file system to the 10 gigabyte limit of the logical volume.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/faq.1and1.co.uk\/image\/dedicated\/linux\/admin\/lvGrow8.png\" alt=\"lvGrow8.png\" title=\"lvGrow8.png\" \/><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td align=\"left\" valign=\"top\" width=\"70\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\"><b>Step&nbsp;10<\/b><\/td>\n<td align=\"left\" valign=\"top\" width=\"*\" style=\"font-size: 12px; font-family: Arial, 'Lucida Grande', 'Lucida Sans Unicode', 'Bitstream Vera Sans', Helvetica, Verdana, Futura, sans-serif;\">Type&nbsp;<span style=\"background-color: #ffbb00; font-family: monospace;\">df -h<\/span>&nbsp;to display the&nbsp;<b>d<\/b>isk&nbsp;<b>f<\/b>ree space to confirm that the file system has been extended.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/faq.1and1.co.uk\/image\/dedicated\/linux\/admin\/lvGrow9.png\" alt=\"lvGrow9.png\" title=\"lvGrow9.png\" \/><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>How can I increase a logical volume? &nbsp; Step&nbsp;1 First, log into the server via SSH. Step&nbsp;2 Once logged in, type&nbsp;df &#8211; h&nbsp;at the command prompt and hit&nbsp;ENTER. The partition and logical volume sizes will be listed including the used disk space. In the image below, the var logical volume is 4GB. Assume that ~9GB [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"class_list":["post-195","post","type-post","status-publish","format-standard","hentry","category-centos-6"],"_links":{"self":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/comments?post=195"}],"version-history":[{"count":0,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/195\/revisions"}],"wp:attachment":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/media?parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/categories?post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/tags?post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}