<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: extend a ext3 partition in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558318#M39256</link>
    <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;If you'd used LVM&lt;BR /&gt;&lt;BR /&gt;pvcreate&lt;BR /&gt;vgextend&lt;BR /&gt;lvextend&lt;BR /&gt;rsize2fs&lt;BR /&gt;&lt;BR /&gt;All, hot, don't even have to umount the filesystem.&lt;BR /&gt;&lt;BR /&gt;Not using LVM, you need to create a new parition and then use dd to copy the data from old to new.&lt;BR /&gt;&lt;BR /&gt;I would not have the filesystem mounted while doing the dd copy.&lt;BR /&gt;&lt;BR /&gt;Possible, but much less fun.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Tue, 05 Jan 2010 15:25:16 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2010-01-05T15:25:16Z</dc:date>
    <item>
      <title>extend a ext3 partition</title>
      <link>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558312#M39250</link>
      <description>Hello Gurus,&lt;BR /&gt;&lt;BR /&gt;I have RHEL5 server on which i have to resize a ext3 partition.&lt;BR /&gt;&lt;BR /&gt;fdisk -l /dev/sda&lt;BR /&gt;&lt;BR /&gt;Disk /dev/sda: 147.1 GB, 147114180608 bytes&lt;BR /&gt;255 heads, 63 sectors/track, 17885 cylinders&lt;BR /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;BR /&gt;&lt;BR /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;BR /&gt;/dev/sda1   *           1         127     1020096   83  Linux&lt;BR /&gt;/dev/sda2             128        3314    25599577+  83  Linux&lt;BR /&gt;/dev/sda3            3315        5864    20482875   83  Linux&lt;BR /&gt;/dev/sda4            5865       17885    96558682+   5  Extended&lt;BR /&gt;/dev/sda5            5865        8414    20482843+  83  Linux&lt;BR /&gt;/dev/sda6            8415        8733     2562336   82  Linux swap / Solaris&lt;BR /&gt;&lt;BR /&gt;Model: MAXTOR ATLAS10K5_147SCA (scsi)&lt;BR /&gt;Disk /dev/sda: 147GB&lt;BR /&gt;Sector size (logical/physical): 512B/512B&lt;BR /&gt;Partition Table: msdos&lt;BR /&gt;&lt;BR /&gt;Number  Start   End     Size    Type      File system  Flags&lt;BR /&gt; 1      32.3kB  1045MB  1045MB  primary   ext3         boot&lt;BR /&gt; 2      1045MB  27.3GB  26.2GB  primary   ext3&lt;BR /&gt; 3      27.3GB  48.2GB  21.0GB  primary   ext3&lt;BR /&gt; 4      48.2GB  147GB   98.9GB  extended&lt;BR /&gt; 5      48.2GB  69.2GB  21.0GB  logical   ext3&lt;BR /&gt; 6      69.2GB  71.8GB  2624MB  logical   linux-swap&lt;BR /&gt;&lt;BR /&gt;From the above partition table i see i have enought unused space on the disk. I want to expand /dev/sda2 partition; however there is no unused space immediately after sda2.&lt;BR /&gt;How should i proceed in this scenario?&lt;BR /&gt;&lt;BR /&gt;Will i have to move the start and end points of sda3,sda4....sda6 in order to expand sda2?&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;Sunny&lt;BR /&gt;</description>
      <pubDate>Tue, 05 Jan 2010 07:26:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558312#M39250</guid>
      <dc:creator>Sunny Jaisinghani</dc:creator>
      <dc:date>2010-01-05T07:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: extend a ext3 partition</title>
      <link>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558313#M39251</link>
      <description>&lt;!--!*#--&gt;fdisk -l /dev/sda&lt;BR /&gt;&lt;BR /&gt;Disk /dev/sda: 147.1 GB, 147114180608 bytes&lt;BR /&gt;255 heads, 63 sectors/track, 17885 cylinders&lt;BR /&gt;Units = cylinders of 16065 * 512 = 8225280 bytes&lt;BR /&gt;&lt;BR /&gt;   Device Boot      Start         End      Blocks   Id  System&lt;BR /&gt;/dev/sda1   *           1         127     1020096   83  Linux&lt;BR /&gt;/dev/sda2             128        3314    25599577+  83  Linux&lt;BR /&gt;/dev/sda3            3315        5864    20482875   83  Linux&lt;BR /&gt;/dev/sda4            5865       17885    96558682+   5  Extended&lt;BR /&gt;/dev/sda5            5865        8414    20482843+  83  Linux&lt;BR /&gt;/dev/sda6            8415        8733     2562336   82  Linux swap / Solaris&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Model: MAXTOR ATLAS10K5_147SCA (scsi)&lt;BR /&gt;Disk /dev/sda: 147GB&lt;BR /&gt;Sector size (logical/physical): 512B/512B&lt;BR /&gt;Partition Table: msdos&lt;BR /&gt;&lt;BR /&gt;Number  Start   End     Size    Type      File system  Flags&lt;BR /&gt; 1      32.3kB  1045MB  1045MB  primary   ext3         boot&lt;BR /&gt; 2      1045MB  27.3GB  26.2GB  primary   ext3&lt;BR /&gt; 3      27.3GB  48.2GB  21.0GB  primary   ext3&lt;BR /&gt; 4      48.2GB  147GB   98.9GB  extended&lt;BR /&gt; 5      48.2GB  69.2GB  21.0GB  logical   ext3&lt;BR /&gt; 6      69.2GB  71.8GB  2624MB  logical   linux-swap</description>
      <pubDate>Tue, 05 Jan 2010 07:27:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558313#M39251</guid>
      <dc:creator>Sunny Jaisinghani</dc:creator>
      <dc:date>2010-01-05T07:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: extend a ext3 partition</title>
      <link>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558314#M39252</link>
      <description>&amp;gt; Will i have to move the start and end points of sda3,sda4....sda6 in order to expand sda2?&lt;BR /&gt;&lt;BR /&gt;Yes, that would be required if you have to keep the other partitions the same.&lt;BR /&gt;&lt;BR /&gt;But there may be another option:&lt;BR /&gt;1.) create a new partition 7 with the same size as partition 3&lt;BR /&gt;2.) copy the contents of partition 3 to partition 7&lt;BR /&gt;3.) unmount partition 3 and mount 7 in its place (editing /etc/fstab appropriately)&lt;BR /&gt;4.) verify everything works; if not, undo step 3 to roll back.&lt;BR /&gt;5.) you can now delete partition 3 and use its space to extend partition 2. &lt;BR /&gt;&lt;BR /&gt;If you don't need all of it, you may also be able to extend partition 5 later, by moving the start of extended partition 4 towards the beginning of the disk.&lt;BR /&gt;&lt;BR /&gt;The problem is that your free space is now split in two parts, which may be more difficult to manage.&lt;BR /&gt;&lt;BR /&gt;You might also make a (partial) migration to LVM to avoid troubles like this in the future. A simple solution would be to migrate everything except /boot and root filesystems to LVM. Migrating an existing system to LVM-based root filesystem would be trickier; /boot must always be on a non-LVM partition on a regular x86 system, to allow the BIOS to understand it. &lt;BR /&gt;(If your /boot directory is within the root filesystem, you have two good reasons to keep it as a non-LVM partition.)&lt;BR /&gt;&lt;BR /&gt;You currently have plenty of free disk space to do the migration; later it will be more difficult. It's more work now, but will allow for much easier administration later.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://tldp.org/HOWTO/LVM-HOWTO/" target="_blank"&gt;http://tldp.org/HOWTO/LVM-HOWTO/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;In short: begin by creating a partition that occupies all your current free space, set its type to Linux LVM and use pvcreate to make it a LVM Physical Volume (PV). Create your Volume Group using that PV.&lt;BR /&gt;&lt;BR /&gt;Now convert all the partitions you want:&lt;BR /&gt;1.) create a Logical Volume (LV) that matches the size of the partition you wish to convert&lt;BR /&gt;2.) Create a filesystem on the LV and mount it to a temporary location.&lt;BR /&gt;3.) Copy everything from the old partition to the new LV.&lt;BR /&gt;4.) Unmount the old partition and the temporarily-mounted LV; mount the LV to the mount point where the old partition used to be. Edit /etc/fstab.&lt;BR /&gt;5.) Test that it works.&lt;BR /&gt;6.) Change the type of the old partition to "Linux LVM", pvcreate it and use vgextend to add it to your Volume Group.&lt;BR /&gt;&lt;BR /&gt;Repeat these steps 1-6 for all partitions you wish to convert to LVM.&lt;BR /&gt;&lt;BR /&gt;For a swap partition, step 2 would be "mkswap", step 3 would be "run swapon for the new partition and swapoff for the old one" and step 4 just "edit /etc/fstab".&lt;BR /&gt;&lt;BR /&gt;In your situation, if you don't migrate partition 2 to LVM, just delete partition 3 after migrating it to LVM and leave it as free space for extending partition 2. &lt;BR /&gt;&lt;BR /&gt;If you later run out of disk space in the LVM, you can use the free space for another LVM PV... until then, that space will be your reserve for future extensions of partition 2.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Tue, 05 Jan 2010 08:41:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558314#M39252</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-01-05T08:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: extend a ext3 partition</title>
      <link>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558315#M39253</link>
      <description>Thanks Matti.&lt;BR /&gt;That was very informative</description>
      <pubDate>Tue, 05 Jan 2010 08:58:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558315#M39253</guid>
      <dc:creator>Sunny Jaisinghani</dc:creator>
      <dc:date>2010-01-05T08:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: extend a ext3 partition</title>
      <link>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558316#M39254</link>
      <description>Matti,&lt;BR /&gt;&lt;BR /&gt;As seen in the partition table, i have 3 primary partitions.&lt;BR /&gt;When i proceed to create a new Linux LVM partition what will it be... primary or extended?&lt;BR /&gt;&lt;BR /&gt;Sunny</description>
      <pubDate>Tue, 05 Jan 2010 09:03:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558316#M39254</guid>
      <dc:creator>Sunny Jaisinghani</dc:creator>
      <dc:date>2010-01-05T09:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: extend a ext3 partition</title>
      <link>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558317#M39255</link>
      <description>Background:&lt;BR /&gt;In a PC partition table, there are only 4 primary partition slots. If one of them (and only one) is used as an extended partition, you can create logical partitions within the extended partition "container". With this, the total number of partitions can extend beyond 4.&lt;BR /&gt;&lt;BR /&gt;The standard PC Master Boot Record in the first block of the disk can only boot from a primary partition: otherwise there is no functional difference between primary and logical partitions. The logical partitions must always be within an extended partition: an extended partition with no logical partitions in it is not useful. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In Linux, with a traditional x86 PC partition table, the primary partitions are always numbered 1-4: the numbers 5 and above are logical partitions. If another partition table format (like EFI GPT) is used, this rule no longer applies.&lt;BR /&gt;&lt;BR /&gt;LVM does not care about the partition type: it can use both primary and logical partitions as LVM PVs. If you migrate to LVM, the LVM PVs sda5-sda7 will be logical partitions, and sda3 (if/when you choose to use it as a LVM PV will be a primary partition).&lt;BR /&gt;&lt;BR /&gt;LVM can even use whole disks as PVs with no partition table at all: this may be useful on RAID sets larger than 2 TB, which cannot be handled with the traditional PC partition tables (the partition size field does not have enough bits to indicate more than 2 TB).&lt;BR /&gt;&lt;BR /&gt;LVM logical volumes are not bootable with the common combination of firmware and boot loader (i.e. x86 BIOS and GRUB). It would be possible to create a BIOS-based bootloader that understands LVM, but so far nobody seems to have done this. In this sense, the LVM logical volumes are like logical partitions.&lt;BR /&gt;&lt;BR /&gt;MK</description>
      <pubDate>Tue, 05 Jan 2010 11:56:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558317#M39255</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-01-05T11:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: extend a ext3 partition</title>
      <link>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558318#M39256</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;If you'd used LVM&lt;BR /&gt;&lt;BR /&gt;pvcreate&lt;BR /&gt;vgextend&lt;BR /&gt;lvextend&lt;BR /&gt;rsize2fs&lt;BR /&gt;&lt;BR /&gt;All, hot, don't even have to umount the filesystem.&lt;BR /&gt;&lt;BR /&gt;Not using LVM, you need to create a new parition and then use dd to copy the data from old to new.&lt;BR /&gt;&lt;BR /&gt;I would not have the filesystem mounted while doing the dd copy.&lt;BR /&gt;&lt;BR /&gt;Possible, but much less fun.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 05 Jan 2010 15:25:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558318#M39256</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2010-01-05T15:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: extend a ext3 partition</title>
      <link>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558319#M39257</link>
      <description>Thanks Steven and Matti.&lt;BR /&gt;&lt;BR /&gt;I migrated the concerned partition to LVM.&lt;BR /&gt;&lt;BR /&gt;Thanks. Got back to LVM after 3 months. Feeling good :-)&lt;BR /&gt;&lt;BR /&gt;Sunny</description>
      <pubDate>Mon, 11 Jan 2010 08:48:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/extend-a-ext3-partition/m-p/4558319#M39257</guid>
      <dc:creator>Sunny Jaisinghani</dc:creator>
      <dc:date>2010-01-11T08:48:43Z</dc:date>
    </item>
  </channel>
</rss>

