Hi Joao,I am trying to create a RAID5 system with three 3TB drives on a DNS-320 A1A2.Per my prior experience with creating a RAID5 array, I started with two 3TB drives in theDNS320 and created a degraded RAID5.
Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
sgdisk --zap-all /dev/sdc # destroy the disk partition table, both MBR and GPTsgdisk --set-alignment=8 --new=1:64:+512M --typecode=1:8200 /dev/sdc # 1st partition of 512MB, type swapsgdisk --set-alignment=8 --new=2:0:0 --typecode=2:fd00 /dev/sdc # the rest of the disk, type RAIDsgdisk -p /dev/sdc # print partition table
sfdisk -R /dev/sdc # make the kernel reread the partition table
Stopping disk sda... done.
Partitioning disk sda... failed
Could not create partition 2 from 732558328 to 732558327 Could not change partition 2's type code to fd00! Error encountered; not saving changes.
Hi Joao,
Thanks for your concise response. When I first created the degraded raid 5 with just the internal disks, I did it manually because I wanted to allocate only 300MB on each internal drive as swap.
As for the three possible solutions below, all have failed. I have recorded as much detail as I can for each step.
Solution 1 - Copy Partition table from sda to sdc. Failed. Drive sizes are different, however, I did it just to see what would happen. First I erased sdc partition table.
See "Erase Partition Table sdc 2016-03-24_15-34-57"Then I used the copy partition function and it indicated success when I ran it, see "Copy Partition Table sda to sdc 2016-03-24_15-36-00"However, when I went to Disk Partitioner again, it showed something completely different, see "After Copy Parittion Table sda to sdc 2016-03-24_15-36-54"
Solution 2 - Use Disk Wizard on just the USB drive to create a degraded raid 1. Failed. See attached "Disk Wizard Fail 2016-03-24_16-03-01" image capture. I checked Disk Partitioner after the wizard failure and captured the screen. Please see "Disk Partitioner after Disk Wizard failure 2016-03-24_16-31-38" Some actions were performed, but not exactly as expected.
Solution 3 - Commandline sgdisk. Commands successful, see below. However, when I go back to Disk Partitioner, it reads completely different. See "Disk Partitioner vs sgdisk -p 2016-03-24_15-52-55"I executed the commands substituting 512M for 200M for the size of the first partition. When I compare what I see from Disk Partitioner and sgdisk -p output, the drive size is completely different.
I do not understand how or why.
[root@NAS3]# sgdisk --zap-all /dev/sdcCreating new GPT entries.GPT data structures destroyed! You may now partition the disk using fdisk orother utilities.[root@NAS3]# sgdisk --set-alignment=8 --new=1:64:+200M --typecode=1:8200 /dev/sdcCreating new GPT entries.The operation has completed successfully.[root@NAS3]# sgdisk --set-alignment=8 --new=2:0:0 --typecode=2:fd00 /dev/sdcThe operation has completed successfully.[root@NAS3]# sgdisk -p[root@NAS3]# sgdisk -p /dev/sdcDisk /dev/sdc: 732558336 sectors, 2.7 TiBLogical sector size: 4096 bytes
sgdisk -p /dev/sda | grep Logical
sgdisk -p /dev/sdb | grep Logical
cat /sys/block/sd*/queue/hw_sector_size
cat /sys/block/sd*/queue/physical_block_size
cat /sys/block/sd*/queue/logical_block_size
Disk identifier (GUID): 22464954-D485-4FD2-9F43-2C9DA8704069Partition table holds up to 128 entriesFirst usable sector is 6, last usable sector is 732558330Partitions will be aligned on 64-sector boundariesTotal free space is 58 sectors (232.0 KiB)Number Start (sector) End (sector) Size Code Name1 64 51263 200.0 MiB 82002 51264 732558330 2.7 TiB FD00[root@NAS3]# sfdisk -R /dev/sdcAfter attempting all three solutions, I can see that Disk Partitioner reports 3000.559 GB available, but some other programs (maybe sgdisk?) do not see that same amount of space available. When I attempt to manually create partition 1 with 500M swap in Disk Partitioner, it reports success, however, upon returning to disk partitioner, it reports only 375.07 swap created. Next I attempted to create a 1000M raid partition 2, Disk Partitioner reported failure (see below).Stopping disk sda... done.
Partitioning disk sda... failed
Could not create partition 2 from 732558328 to 732558327 Could not change partition 2's type code to fd00! Error encountered; not saving changes.ErrorIf there is other data logs which you need, let me know. I have an abundance of free time currently to work out this issue. Thanks! Al
Hi Joao,
I have some updates which I'd like to share with you.
I started reading about the 4k sector sizes and came across the WD Quick Formatter utility. WD's description stated that the tool would reformat the drive to NTFS to work with Vista and above.
and then stopped.
I saw that the light on the USB drive stop blinking.I went to the CLI and tried:[root@NAS3]# sfdisk -R /dev/sdc/dev/sdc: No such file or directorycannot open /dev/sdc for readingSo I downloaded all the logs via SYSTEM - UTILTIES and they are attached this email.I have two of these 3TB WD Passport Ultra drives (Drive A was reformatted with WD Quick Formatter which changed the 4k sectors to 512 byte sectors and Drive B is original state with 4k sectors).I am not sure how to proceed, as it appears I have TWO problems for my one requirement (partition and add 3TB to my RAID5 array). The original problem with 4k sector size external 3TB drive and the new problem which I described in this email.
I am available to work on either or both with you. Just let me know how you'd like to proceed.
Hi Joao,
FYI, currently, I have two DNS-323 running Alt-F with Raid5. First one is 3 x 1TB RAID5 and the second one is a 3 x 2TB RAID5. Both of them use WD Elements drives that are only USB powered. I have had ZERO issues with the RAID5 arrays, the arrays remain clean even after sudden power outages. The DNS-320 will be my third RAID5 installation with ALT-F.All my data was stored on the two 3TB USB drives (WD Passport Ultra Metal - "http://www.amazon.com/Blue-Black-Passport-Ultra-Portable-External/dp/B0150O8K2U/ref=sr_1_5?s=pc&ie=UTF8&qid=1458969962&sr=1-5&keywords=passport+ultra+metal") .So when I created the degraded RAID5 on the DNS-320 with the two 3TB internal drives, I restored the data from the 3TB USB drives (both of them) to the DNS-320 via the NAS USB port. I was successful in restoring the data (it took about 5 days of operation, but completed without problems). Hopefully this gives you some hints regarding the drive disconnecting from the DNS-320 during RAID resync.Both drives have been used successfully on my computer for a few days without any problems prior to connecting to the DNS-320.
I am not sure if that helps in narrowing down there the problem lies.
FYI, I will refer to DriveA as the WD Quick Formatted Drive (512 sectors) and DriveB as the original factory condition (4096 sectors).I wanted to attempt to partition DriveB and add it to the array via CLI. I know how to partition it correctly now, but I do not know how to properly add it to the array.I found this "mdadm --add /dev/md0 /dev/sdc2" on a wiki, is this sufficient to add DriveB to the array and start a resync?
Yesterday I thought maybe this new 3TB USB drive has an aggressive spindown policy for power saving.Since I had two partitions on DriveA512, I formatted partition 1 (sdc1) with ext4 and made it available as a network share. Subsequently, I ran a program on my laptop to write a file to partition1 every 1 minute so that the drive will continue spinning.Next via the WebUI, I went to DISK - RAID and added sdc2 to my degraded RAID5 array. The resync started and ran for 20-30 min. After that, I noticed that the LED light on DriveA512 did not blink anymore and was a steady state ON.
RAID recovery started,18:06:48 NAS3 user.info kernel: md: recovery of RAID array md0...and ~20 minutes later18:24:51 NAS3 user.info kernel: usb 1-1: reset high-speed USB device number 3 using orion-ehci...18:27:31 NAS3 user.err kernel: usb 1-1: device not accepting address 3, error -11018:27:31 NAS3 user.info kernel: usb 1-1: USB disconnect, device number 318:27:31 NAS3 user.info kernel: sd 3:0:0:0: Device offlined - not ready after error recovery...And the driver errorcode :18:27:31 NAS3 user.info kernel: sd 3:0:0:0: [sdc] Unhandled error code18:27:31 NAS3 user.warn kernel: Result: hostbyte=0x01 driverbyte=0x0018:27:31 NAS3 user.info kernel: sd 3:0:0:0: [sdc] CDB:18:27:31 NAS3 user.warn kernel: cdb[0]=0x8a: 8a 00 00 00 00 00 03 3d c9 f0 00 00 00 f0 00 0018:27:31 NAS3 user.err kernel: end_request: I/O error, dev sdc, sector 54381040...and the raid acknowledge the drive error and continuing18:27:31 NAS3 user.alert kernel: md/raid:md0: Disk failure on sdc2, disabling device.18:27:31 NAS3 user.alert kernel: md/raid:md0: Operation continuing on 2 devices.
...
later on, the drive reappears, and the kernel tries to use it, but it does not accept commands:18:27:32 NAS3 user.info kernel: usb 1-1: new high-speed USB device number 418:28:02 NAS3 user.err kernel: usb 1-1: device descriptor read/64, error -11018:28:02 NAS3 user.info kernel: usb 1-1: new high-speed USB device number 518:28:33 NAS3 user.err kernel: usb 1-1: device descriptor read/64, error -11018:28:33 NAS3 user.info kernel: usb 1-1: new high-speed USB device number 68:28:43 NAS3 user.err kernel: usb 1-1: device not accepting address 6, error -11018:28:43 NAS3 user.info kernel: usb 1-1: new high-speed USB device number 718:28:54 NAS3 user.err kernel: usb 1-1: device not accepting address 7, error -11018:28:54 NAS3 user.err kernel: hub 1-0:1.0: unable to enumerate USB device on port 1and at this point the kernel give up
The lights on the DNS-320 were also steady state ON orange (both drive lights and USB light were orange no blink).
I could still access the NAS WebUI and CLI. In the WebUI, under Status, sdc had disappeared. I have attached some logs which may help.The problem can reproduced quite easily. I determined it was not the DriveA512 spindown policy that is causing the disconnect.
My next step will be to take one of my DNS-323 off line and move the 3TB drives over and attempt to get the RAID5 running there. If it works, I suspect there is a problem with the DNS-320 and how it talks to USB drives in a RAID 5 resync.
Hi Joao,
My DNS-323 finally finished the RAID recovery this evening and it was completed successfully. I taken the liberty to attach the DNS323 logs (Kernel and System) but I think they indicate that all functions performed normally.
Tomorrow I will move the 3TB drives back to the DNS-320.
I believe there is some sort of communication bug in the DNS-320 when it comes to working with RAID5.
I have attached DriveB4096 to the DNS-320 and copied over 1TB of files back and forth without any comms problems popping up. DriveB4096 never gets disconnected, it goes to sleep when idle, it wakes up when requested, and continues to function normally.
Do you have any suggestion on how to monitor for the communications problem on the DNS-320 with RAID5?
ThanksAl
...
...
Hi Joao,
This morning, I placed the 3x3TB RAID5 into the DNS-320 and booted the system. The DNS-320 booted up fine, I do not think you'll find anything unusual in the logs here but I have attached them anyways.Subsequently, I started adding a bunch of files to the DNS-320. Midway through, sdc stopped responding again. I have attached the logs also.
Once I start seeing these messages in the log (user.info kernel: usb 1-1: reset high-speed USB device number 2 using orion-ehci) the USB drive will become disconnected soon.I can only think there is something hardware wise wrong with my DNS-320, perhaps the USB interface is defective in some way.
The 3x3TB RAID5 worked flawlessly in my DNS323 so I do not believe there is a problem with the USB drive.As of this point I am completely out of ideas on how to further diagnose the problem further.
If any one has suggestions, I'm open to hearing them.
...
...
...
Hi Joao,
Interesting update here. So the DNS-320 has 3x1TB raid5 (using an older WD Elements 1TB USB drive). I finished moving around a bunch of files to accommodate the new size for the DNS-320 (5 days straight of moving files in and out of the DNS-320).I took a dump of the systemconfig log and noticed a whole bunch of resets on the USB bus and the old 1TB Elements drive handled all the resets without disconnecting from the DNS-320.
I think it is weird that I have so many of these messages in the log...maybe the DNS-320 has some problem?
During the past 5 days, I have monitored the status of the 3x1TB raid5 via the webUI and it has always remained clean and stable (no rebuilds at all).FYI, the 3x3TB raid 5 has been sitting on a DNS-323 and that has been rock solid without any errors reported at all and the raid5 array has maintained stability without any rebuilds.Since the 3x1TB raid5 continues to function on the DNS-320 and the 3x3TB raid5 works well on the DNS-323, I will leave the setup as is.If you have any final thoughts on this matter, I'm all ears.
...
...