LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Resize RAID Partitions (https://www.linuxquestions.org/questions/linux-general-1/resize-raid-partitions-608078/)

gsoft 12-20-2007 05:23 AM

Resize RAID Partitions
 
I am wanting to resize a RAID partition which holds the root directory. My RAID is setup as RAID 1 ( For Root) and RAID 5.

Below is my mdadm --detail view of both RAIDs

Code:

/dev/md0:
        Version : 00.90.03
  Creation Time : Wed Sep 19 18:18:57 2007
    Raid Level : raid1
    Array Size : 2931712 (2.80 GiB 3.00 GB)
    Device Size : 2931712 (2.80 GiB 3.00 GB)
  Raid Devices : 4
  Total Devices : 6
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Thu Dec 20 22:15:01 2007
          State : clean
 Active Devices : 4
Working Devices : 6
 Failed Devices : 0
  Spare Devices : 2

          UUID : b5789933:392d5807:f79800c4:327fc928
        Events : 0.16

    Number  Major  Minor  RaidDevice State
      0      8        1        0      active sync  /dev/sda1
      1      8      17        1      active sync  /dev/sdb1
      2      8      33        2      active sync  /dev/sdc1
      3      8      49        3      active sync  /dev/sdd1

      4      8      81        -      spare  /dev/sdf1
      5      8      65        -      spare  /dev/sde1

Code:

/dev/md1:
        Version : 00.90.03
  Creation Time : Wed Sep 19 18:19:35 2007
    Raid Level : raid5
    Array Size : 1456356288 (1388.89 GiB 1491.31 GB)
    Device Size : 485452096 (462.96 GiB 497.10 GB)
  Raid Devices : 4
  Total Devices : 6
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Thu Dec 20 22:16:18 2007
          State : active
 Active Devices : 4
Working Devices : 6
 Failed Devices : 0
  Spare Devices : 2

        Layout : left-symmetric
    Chunk Size : 64K

          UUID : 5162e23c:0d3e2e0b:49c779db:0b5f41d6
        Events : 0.21

    Number  Major  Minor  RaidDevice State
      0      8        2        0      active sync  /dev/sda2
      1      8      18        1      active sync  /dev/sdb2
      2      8      34        2      active sync  /dev/sdc2
      3      8      50        3      active sync  /dev/sdd2

      4      8      82        -      spare  /dev/sdf2

What do I need to do exactly ? ive seen an article about resize2fs (i think) that then requires you to remove the partition using fdisk then re-add using the exact cylinder start or something like that.

This doesn't quite sound right as Ive setup the raid with LVM as well. lvmdiskscan gives me this

Code:

  /dev/md0                  [        2.80 GB]
  /dev/DDD/DDD_Var  [      16.00 GB]
  /dev/md1                  [        1.36 TB] LVM physical volume
  /dev/DDD/DDD_Tmp  [        4.00 GB]
  /dev/DDD/DDD_Swp  [        8.00 GB]
  /dev/DDD/DDD_Home [        1.33 TB]
  4 disks
  17 partitions
  0 LVM physical volume whole disks
  1 LVM physical volume


trickykid 12-23-2007 07:20 AM

If you have LVM, it's usually as easy as:

vgdisplay # to see how much disk space is actually free if any

lvextend # command used to expand your LVM partition

ext2online # grow the disk. later versions of LVM that come with Linux don't require to umount the disks, you can do it on the fly.

And if you don't have any space available, you can most likely shrink a disk to then add to another that you want to grow.

stella123 09-11-2008 04:23 AM

raid partition
 
There are various combinations of these approaches giving different trade offs of protection against data loss, capacity, and speed. RAID levels 0, 1, and 5 are the most commonly found, and cover most requirements.

RAID 0 (striped disks) distributes data across several disks in a way which gives improved speed and full capacity, but all data on all disks will be lost if any one disk fails.

RAID 1 (mirrored disks) uses two (possibly more) disks which each store the same data, so that data is not lost as long as one disk survives. Total capacity of the array is just the capacity of a single disk. The failure of one drive, in the event of a hardware or software malfunction, does not increase the chance of a failure nor decrease the reliability of the remaining drives (second, third, etc).

RAID 5 (striped disks with parity) combines three or more disks in a way that protects data against loss of any one disk; the storage capacity of the array is reduced by one disk. The less common RAID 6 can recover from the loss of two disks.

You can see more information at this website: http://www.softpedia.com/get/System/...-Manager.shtml


All times are GMT -5. The time now is 07:38 AM.