Author Topic: Is the RAID expandable?  (Read 4148 times)

cirion

  • Guru
  • ****
  • Posts: 353
    • View Profile
Re: Is the RAID expandable?
« Reply #15 on: February 25, 2008, 01:37:34 pm »
The LinuxMCE Webadmin is still showing:
34     CORE     Software Raid 5     Software Raid 5     /dev/md1     4     2093.08GiB     OK     

But I have used 1390GB and have only 5GB free... Before growing I had 1395GB total...
Do I need to run a diskcheck?

Anyone know the command to do a diskcheck in Kubuntu?
Is there a different command for RAID?

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2420
    • View Profile
    • ago control
Re: Is the RAID expandable?
« Reply #16 on: February 25, 2008, 05:28:20 pm »
the file system check command depends on the file system used. You may have to extend that, too.

best regards,
Hari
rock your home - http://www.agocontrol.com home automation

cirion

  • Guru
  • ****
  • Posts: 353
    • View Profile
Re: Is the RAID expandable?
« Reply #17 on: February 25, 2008, 08:01:50 pm »
LOL, I forgot all about checking the partition...
But I thought the growing of the RAID did mean the partition too...

I installed gparted and had a look...
It shows a partition with a ext3 volume at 2.04TiB.
It also has a Waring on it:

Code: [Select]
e2label: No such file or directory while trying to open /dev/md1p1
Couldnt find valid superblock.

Unable to read the contents of this filesystem!
Because of this som operations may be unavailable.

royw

  • Guru
  • ****
  • Posts: 261
    • View Profile
Re: Is the RAID expandable?
« Reply #18 on: February 25, 2008, 08:06:30 pm »
I haven't used linux software RAID, but do have one LVM volume on a kubuntu system.  Here's what LVM says on extending logical volume (http://www.tldp.org/HOWTO/LVM-HOWTO/extendlv.html):
Code: [Select]
After you have extended the logical volume it is necessary to increase the file system size to match. how you do this depends on the file system you are using.

By default, most file system resizing tools will increase the size of the file system to be the size of the underlying logical volume so you don't need to worry about specifying the same size for each of the two commands.

   1.

      ext2/ext3

      Unless you have patched your kernel with the ext2online patch it is necessary to unmount the file system before resizing it. (It seems that the online resizing patch is rather dangerous, so use at your own risk)

         # umount /dev/myvg/homevol/dev/myvg/homevol
         # resize2fs /dev/myvg/homevol
         # mount /dev/myvg/homevol /home
                 

      If you don't have e2fsprogs 1.19 or later, you can download the ext2resize command from ext2resize.sourceforge.net and use that:

         # umount /dev/myvg/homevol/dev/myvg/homevol
         # ext2resize /dev/myvg/homevol
         # mount /dev/myvg/homevol /home
 

HTH,
Roy

cirion

  • Guru
  • ****
  • Posts: 353
    • View Profile
Re: Is the RAID expandable?
« Reply #19 on: February 25, 2008, 10:37:58 pm »
Thanks for the info :)

From what I can see, I have to run 2 commands...
This is running now:
Code: [Select]
sudo e2fschk -f /dev/md1
When that is done, I will try running:
Code: [Select]
sudo resize2fs /dev/md1
I am trying without unmounting for now. I'll post results...

hari

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 2420
    • View Profile
    • ago control
Re: Is the RAID expandable?
« Reply #20 on: February 25, 2008, 10:50:44 pm »
Thanks for the info :)

From what I can see, I have to run 2 commands...
This is running now:
Code: [Select]
sudo e2fschk -f /dev/md1
When that is done, I will try running:
Code: [Select]
sudo resize2fs /dev/md1
I am trying without unmounting for now. I'll post results...
ouch
rock your home - http://www.agocontrol.com home automation

cirion

  • Guru
  • ****
  • Posts: 353
    • View Profile
Re: Is the RAID expandable?
« Reply #21 on: February 26, 2008, 08:12:57 am »
First one:
Code: [Select]
linuxmce@dcerouter:~$ sudo e2fsck -f /dev/md1
[sudo] password for linuxmce:
e2fsck 1.40.2 (12-Jul-2007)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/md1: 3832/182910976 files (9.9% non-contiguous), 346034004/365791968 blocks

Second one:
Code: [Select]
linuxmce@dcerouter:~$ sudo resize2fs /dev/md1
[sudo] password for linuxmce:
resize2fs 1.40.2 (12-Jul-2007)
Filesystem at /dev/md1 is mounted on /mnt/device/34; on-line resizing required
old desc_blocks = 88, new_desc_blocks = 131
Performing an on-line resize of /dev/md1 to 548687952 (4k) blocks.
The filesystem on /dev/md1 is now 548687952 blocks long

Free disk space: 657.5GB out of 2.0 TB (69% used)

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Is the RAID expandable?
« Reply #22 on: February 26, 2008, 12:26:31 pm »
you should put this in the wiki

cirion

  • Guru
  • ****
  • Posts: 353
    • View Profile
Re: Is the RAID expandable?
« Reply #23 on: February 26, 2008, 01:45:27 pm »
I will put it in the Wiki as soon as I am shure everything is working great.
I have to fill the RAID past the 1395GB to se that everything works.

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Is the RAID expandable?
« Reply #24 on: February 26, 2008, 06:35:55 pm »
Since you used e2resizefs on a mounted filesystem you might also want to run e2fschk (probably with the -f flag) on it again to make sure it didn't got corrupted.
"Change is inevitable. Progress is optional."
-- Anonymous


cirion

  • Guru
  • ****
  • Posts: 353
    • View Profile
Re: Is the RAID expandable?
« Reply #25 on: February 28, 2008, 09:23:25 am »
Check done.... No data corruption, and everything works :)
I have now also filled in 400GB of data on top of the 1395GB which was the limit.

So I can confirm that Growing+Expanding the RAID in LinuxMCE works!
I'll add this to the wiki.

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Is the RAID expandable?
« Reply #26 on: September 08, 2008, 06:10:54 pm »
I have recently expanded my RAID successfully as well and wrote a wiki article. I tried to take a "safe" approach and have the RAID unmounted in single-user mode to reduce the risk of something going wrong.

http://wiki.linuxmce.org/index.php/Grow_Raid

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Is the RAID expandable?
« Reply #27 on: September 08, 2008, 06:31:17 pm »
Thanks jondecker76, looks very thorough.
"Change is inevitable. Progress is optional."
-- Anonymous