[HOWTO] Expanding RAID5 from the command line (TS 509)

Questions about SNMP, Power, System, Logs, disk, & RAID.

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby Turist » Sun Feb 12, 2012 4:56 pm

Hello there

same problem with adding 4-th disk to 3-disk RAID5 here.

tried to follow the guide, but failed to unmount md0
stopped all services through web interface (and services.sh stop)
killed transmission, apcupsd but no luck

help me please!

PS: can somebody confirm that the problem on TS509 is due to low memory?
Turist
Starting out
 
Posts: 38
Joined: Sun Aug 29, 2010 2:59 am
NAS Model: TS-439U-SP/-RP

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby fabsah » Mon Apr 23, 2012 12:03 am

This Howto made my day. I was stuck while expanding my RAID5, these instructions solved my problem. Thanks a bunch to the parents !

It's a pity to see QNAP adding gadgets (Music Station, really ?! WTF !) on every firmware upgrade while vital feature have been unstable for years. Reconstructing and expanding a RAID array should be a flawless experience. On my unit, it ** big time. And YES my data are backed up on several 2Tb USB2 HDD. But it would take days to delete/recreate an array and copy back the data.

(TS-659-Pro II with Western Digital RE4-2To, RAM : 3Gb, lastest firmware, UPS and the whole shebang).

Anyway, thanks again for saving my **.

edit : typos.
Last edited by fabsah on Mon Apr 23, 2012 3:38 am, edited 1 time in total.
fabsah
New here
 
Posts: 8
Joined: Mon Dec 26, 2011 1:51 am
NAS Model: TS-559 Pro+

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby fabsah » Mon Apr 23, 2012 12:11 am

Turist wrote:Hello there

same problem with adding 4-th disk to 3-disk RAID5 here.

tried to follow the guide, but failed to unmount md0
stopped all services through web interface (and services.sh stop)
killed transmission, apcupsd but no luck


I had the same problem. Turned out I still had a directory mounted as /share/Qdownload (from the rtorrent++ qpkg).
A simple umount /share/Qdownload solved my issue and I was able to follow this Howto to the letter afterward.

Check your fstab/mtab

It might help to terminate all services issuing /etc/init.d/services.sh stop , as mentioned on a previous post.
fabsah
New here
 
Posts: 8
Joined: Mon Dec 26, 2011 1:51 am
NAS Model: TS-559 Pro+

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby pwilson » Sat Jul 28, 2012 6:51 am

carolprincess wrote:My raid is in read only mode, because of a failed drive, I am trying to replace a disk, but my QNAP will not add disk, it just says Failed to add drive
website development
Any idea Whats the issue?


Have you tried using the "standard method": Hot-swapping the hard drives when the RAID crashes. Why is this even being attempted at the command line?

Patrick.

Patrick M. Wilson
Victoria, BC Canada
QNAP TS-419P+ w/ 4 * Seagate Barracuda 2TB 5900rpm (RAID5) - FW: 3.8.1 Build 20121205
Forums: View My Profile - Search My Posts - Send Private Message - View My Photo - Top Community Forum Posters
QNAP: Turbo NAS User Manual - QNAP Wiki - QNAP Tutorials - QNAP FAQs - HowTos - QNAP Video Library
User avatar
pwilson
Moderator
 
Posts: 3710
Joined: Fri Mar 06, 2009 11:20 am
Location: Victoria, BC, Canada
NAS Model: TS-419P+

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby lmolenaar » Mon Aug 13, 2012 3:25 pm

Thank you very much for this HowTo, the GUI expand button did not work for me and this resulted in success!!

I have a question remaining about the disk size, is this the expected size when using 3TB disks in raid 5? I found several online RAID configurators (link1 and link2) and both tell me the usable disk size should be 10410.39 and not the 10996.78 GB the GUI shows

My drives:
Image

[~] # df /dev/md0
Code: Select all
Filesystem                Size      Used Available Use% Mounted on
/dev/md0                 10.7T      6.7T      4.0T  63% /share/MD0_DATA
100Mb WAN <--> Asus RT-N56u <--> TS-509 Pro ultra (E7500, 4GB, 5x 3TB Seagate)
(Optware/Pure-ftpd/SSOT/SABNZBd/Sickbeard/Couchpotato)
What seems to be the officer problem?
lmolenaar
Know my way around
 
Posts: 162
Joined: Mon May 19, 2008 4:34 pm
Location: Geldrop
NAS Model: TS-509 Pro

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby Greenious » Thu Aug 23, 2012 10:21 am

lmolenaar wrote:Thank you very much for this HowTo, the GUI expand button did not work for me and this resulted in success!!

I have a question remaining about the disk size, is this the expected size when using 3TB disks in raid 5? I found several online RAID configurators (link1 and link2) and both tell me the usable disk size should be 10410.39 and not the 10996.78 GB the GUI shows


http://en.wikipedia.org/wiki/Hard_disk_drive#Capacity

You need to insert the correct numbers. Those calculators seem to be aligned with the capacity standard used by hdd manufacturers, and not the (actually correctly) size reported by QNAP.

Also, QNAP reserves some space on the drives for it's own purposes.
Greenious
Starting out
 
Posts: 18
Joined: Tue Sep 02, 2008 4:36 am
NAS Model: TS-659 Pro+

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby ForSSkieken » Sun Oct 14, 2012 9:09 pm

pwilson wrote:
carolprincess wrote:My raid is in read only mode, because of a failed drive, I am trying to replace a disk, but my QNAP will not add disk, it just says Failed to add drive
website development
Any idea Whats the issue?


Have you tried using the "standard method": Hot-swapping the hard drives when the RAID crashes. Why is this even being attempted at the command line?

Patrick.



Hi Patrick,

If you do it by command Line and you understand what is happening you can always repair your RAID.

Why rely on crappy soft if you can do it your self. QNAP doesn't support my TS-509 they don't even help me anymore with skype or via hotmail, even if they do You'll have to wait until they are available. This is of course normal, but when I can repair my system I don't have to wait.

I can always fall back on back-ups but rebuilding takes like forever with that amount of data
We have a saying...what you do yourself you're probably doing better.
============================================================================================
TS-509Pro [RAID 5] 3 Seagate ST2000DL003-9VT1CC32 2TB + WD20EARS-00J2GB080.0 2TB
3 PC's in Workgroup + 2 XBMC
============================================================================================
User avatar
ForSSkieken
Starting out
 
Posts: 39
Joined: Thu Sep 25, 2008 2:48 am
Location: Wijnegem
NAS Model: TS-439U-SP/-RP

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby ForSSkieken » Sun Oct 14, 2012 9:52 pm

patrickgraf wrote:
UnkyPhil wrote:Hi PK_TS509,

I am sad to report that I had to use your post to solve an Add Disk failure on my new TS-410. Happy to report that it fixed my problem... well nearly fixed it.

The array is now 4 disks and 4TB as expected, but in the Web Admin interface it still shows as 3 Disks with the 4th Disk Unmounted. This is obviously wrong, as I can certainly see the full disk space and the lights on the NAS flicker as I would expect when disk access happens i.e. all 4 disk lights flash as I am used to seeing with RAID5 arrays.

So, I am wondering if you know how to fix the Web Admin Interface to tell the truth?

You seem to know what is going on under the hood. I assume using Linux skills. Unfortunately, I'm a very techie Windows person with only limited Linux skills. I will be asking QNAP for support, but thought you might be able to help solve this problem faster than they do.

Thanks for the post and hopefully your help.

Regards Phil


Heyhey
had the same problem after expanding...
I'm new to this whole QNAP NAS THING but here something that worked for me.

I added a 5th disk to my 4disk RAID 5 following the first post. it worked, but also showed 4+1 disk in the web interface.

Solution:

1.In /etc/storage.conf delete the single disk record completely. (in my case the disk /dev/sde3)
2.Then add the disk number to the “raid disks=" line.(in my case I only added ",5" )
After that it should show the right config in your webinterface.


[VOLUME 1]
device name = /dev/sde3
raid level = -2
raid disks = 5
spare raid disks =
status = -3
record_time = Thu Feb 11 10:58:33 2010

filesystem = 103
[VOLUME 2]
device name = /dev/md0
raid level = 5
raid disks = 1,2,3,4
spare raid disks =
status = 0
record_time = Thu Feb 11 10:58:33 2010

filesystem = 103
[Global]
Available Disk = 5
[VOLUME 5]
status = -3
[~] #

Greetings from switzerland :) ( sorry about my english )



Hi I have the same problem:
My webpage is not aware when I mount my /dev/md0 /share/MD0_DATA -t ext4
In reality I can open my files, but it's anoying to do this everytime manualy

This is my config but it seems it's rewritten (I loose the [VOLUME 6]) if I do a refresh of the webpage

Does anybody has a clue?

[VOLUME 1]
device name = /dev/sda3
raid level = -2
raid disks = 1
spare raid disks =
status = -3
record_time = Sun Oct 14 14:59:25 2012

filesystem = 104
[VOLUME 2]
device name = /dev/sdb3
raid level = -2
raid disks = 2
spare raid disks =
status = -3
record_time = Sun Oct 14 14:59:25 2012

filesystem = 104
[VOLUME 3]
device name = /dev/sdc3
raid level = -2
raid disks = 3
spare raid disks =
status = -3
record_time = Sun Oct 14 14:59:25 2012

filesystem = 104
[VOLUME 4]
device name = /dev/sdd3
raid level = -2
raid disks = 4
spare raid disks =
status = -3
record_time = Sun Oct 14 14:59:25 2012

filesystem = 104
[VOLUME 5]
device name = /dev/sde3
raid level = -2
raid disks = 5
spare raid disks =
status = -5
record_time = Sun Oct 14 14:59:25 2012

filesystem = 104

[VOLUME 6]
device name = /dev/md0
raid level = 5
raid disks = 1,2,3,4
spare raid disks =
status = 0
record_time = Sun Oct 14 14:59:25 2012

filesystem = 104
[Global]
Available Disk = 4
============================================================================================
TS-509Pro [RAID 5] 3 Seagate ST2000DL003-9VT1CC32 2TB + WD20EARS-00J2GB080.0 2TB
3 PC's in Workgroup + 2 XBMC
============================================================================================
User avatar
ForSSkieken
Starting out
 
Posts: 39
Joined: Thu Sep 25, 2008 2:48 am
Location: Wijnegem
NAS Model: TS-439U-SP/-RP

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby ForSSkieken » Sun Oct 14, 2012 11:09 pm

It seems my /etc/config/raidtab was empty

this is how it should be
raiddev /dev/md0
raid-level 5
nr-raid-disks 4
nr-spare-disks 0
chunk-size 4
persistent-superblock 1
device /dev/sda3
raid-disk 0
device /dev/sdb3
raid-disk 1
device /dev/sdc3
raid-disk 2
device /dev/sdd3
raid-disk 3
============================================================================================
TS-509Pro [RAID 5] 3 Seagate ST2000DL003-9VT1CC32 2TB + WD20EARS-00J2GB080.0 2TB
3 PC's in Workgroup + 2 XBMC
============================================================================================
User avatar
ForSSkieken
Starting out
 
Posts: 39
Joined: Thu Sep 25, 2008 2:48 am
Location: Wijnegem
NAS Model: TS-439U-SP/-RP

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby chrispage » Fri Dec 07, 2012 4:20 am

Hello QNAPPERS

Its been just on a WEEK since i started the long long long process of migrating my raid 5 ext4 from 6x2tb to 6x3tb on my TS-659 Pro II.

The 6 drive replacements went fine, all showing up and synced. But i did not know about the problems with capacity migrations so I started the expansion process 40hours ago and its just been sitting on 50%! I want to try the expansion from the shell but now that i have started it this way, can i stop it??
(Expansion via shell cmd http://forum.qnap.com/viewtopic.php?f=25&t=12109&start=30#p56331)

I didn't stop any services, i didnt unmount .. nadda. I figured it would just do what it had to do.

Ok after i realized it MAY not be actually working, i checked the forums and here i am. I ssh'ed into the box and stopped all the services by issuing /etc/init.d/Qthttph.sh stop and /etc/init.d/services and the disabling in the GUI.

(service stopping hangs at trying to stop sickbeard)

HELP!


Do i have to let this expand job finish or can i unmount it and follow these steps?? Will it even finish ??

http://forum.qnap.com/viewtopic.php?f=25&t=12109&start=30#p56331
Last edited by chrispage on Fri Dec 07, 2012 4:50 am, edited 2 times in total.
QNAP TS-659 Pro II
FW 3.8.0 Build 20121114
Raid 5 - 6x2TB Baracuta Green (Migrating to 6x3TB WD Red)
QPKGs
-SABnzbd 0.7.0
-Sickbeard 120925
-CouchPotato2 120501
-AirVideoServer Alpha.6-r8
-CrashPlan 3.2.1_24
-PlexMediaServer 0.9.7.3.31
User avatar
chrispage
Starting out
 
Posts: 29
Joined: Sun May 01, 2011 1:53 am
NAS Model: TS-559 Pro II

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby doktornotor » Fri Dec 07, 2012 4:28 am

chrispage wrote: PLEASE HELP!!!


QNAP Customer Service
QNAP, why is your homework still not done?
3.8.2 Build0301 - Codename "Titanic" - Dear customer, GTFO! NOT acceptable once again!
QTS 4.0 - Codename "Leaky Snail" - Slower than ever. Yes, we can!
QNAP's new logo competition
User avatar
doktornotor
Experience counts
 
Posts: 2598
Joined: Tue Apr 24, 2012 5:44 am
NAS Model: Not Selected

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby searcher1 » Sun Dec 16, 2012 1:47 pm

Hello firstly thank you for an excellent guide, I have been in contact with QNAP support for numerous days to no avail. I used to have 4 x 2TB drives in my QNAP and recently I purchased 2 x 4TB drives and swapped out two of the 2TB. The QNAP rebuilt the RAID fine. Only thing the expand volume is greyed out.

When I went through these instructions the final step advises The filesystem is already 1463959200 blocks long. Nothing to do!

I am confused I thought the RAID 5 wastes one of the largest drives hence I should have 4tb plus the 2 2tbs?

urrent Configuration : Physical Disks
Disk Model Capacity Status Bad Blocks Scan SMART Information
Drive 1 Hitachi HDS5C4040ALE630 MPAO 3726.02 GB Ready Scan now Good
Drive 2 Hitachi HDS5C4040ALE630 MPAO 3726.02 GB Ready Scan now Good
Drive 3 Hitachi HDS722020ALA330 JKAO 1863.02 GB Ready Scan now Good
Drive 4 Hitachi HDS722020ALA330 JKAO 1863.02 GB Ready Scan now Good

Hence I still have the same space as before the swap and the QNAP techinician asdvise it is because the new drives are not supported someone please help as I have spent a lot of money on the new drives. Thanking you in advance Michael
searcher1
New here
 
Posts: 2
Joined: Sun Dec 16, 2012 1:41 pm
NAS Model: TS-239 Pro

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby doktornotor » Sun Dec 16, 2012 5:22 pm

searcher1 wrote:I am confused I thought the RAID 5 wastes one of the largest drives hence I should have 4tb plus the 2 2tbs?


Uhm... This is NOT possible. The capacity for RAID-5 is

Code: Select all
(N - 1) * size of smallest HDD in array

IOW, you need to replace ALL the drives with bigger ones to get more space.
QNAP, why is your homework still not done?
3.8.2 Build0301 - Codename "Titanic" - Dear customer, GTFO! NOT acceptable once again!
QTS 4.0 - Codename "Leaky Snail" - Slower than ever. Yes, we can!
QNAP's new logo competition
User avatar
doktornotor
Experience counts
 
Posts: 2598
Joined: Tue Apr 24, 2012 5:44 am
NAS Model: Not Selected

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby searcher1 » Sun Dec 16, 2012 6:47 pm

Thank you, Doktornotor, if I buy another 2 x 4TB Hitachi's to match the ones I have would that suffice, or are they incompatible as the QNAP technicians are telling me. As far as I know I have replaced drives and they have handled the raid and all is well, so buying the other 2 should fix my problem? Cheers
searcher1
New here
 
Posts: 2
Joined: Sun Dec 16, 2012 1:41 pm
NAS Model: TS-239 Pro

Re: [HOWTO] Expanding RAID5 from the command line (TS 509)

Postby doktornotor » Sun Dec 16, 2012 7:28 pm

Well, since you already bought two and do not have problems with that. Still lot better than that Seagate chirp-and-click junk. :D
QNAP, why is your homework still not done?
3.8.2 Build0301 - Codename "Titanic" - Dear customer, GTFO! NOT acceptable once again!
QTS 4.0 - Codename "Leaky Snail" - Slower than ever. Yes, we can!
QNAP's new logo competition
User avatar
doktornotor
Experience counts
 
Posts: 2598
Joined: Tue Apr 24, 2012 5:44 am
NAS Model: Not Selected

PreviousNext

Return to System & Disk Volume Management

Who is online

Users browsing this forum: No registered users and 6 guests