Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


Incindre

117 posts

Master Geek


#189515 2-Jan-2016 19:31
Send private message

I've been having quite a lot of difficulty in creating a RAID 10 array in Ubuntu Server 14.04 with Webmin, mainly because of issues with the GPT tables on the HDD's and indeterminable Webmin foibles.

As per this thread I've deleted my RAID in Webmin and repaired the partition tables for each disk using gdisk.

Before I dive into MDADM and start throwing the --create command into play I'd like to put a few issues to bed. I'll post up different questions in this thread to keep it all neat and self-contained.

 

QUESTION: 1!

 


One of the things that's bugging the hell out of me is: while trying to fix an issue, I unplugged all the HDD's, and when reconnected they reordered themselves, as far as linux lists the devices.

So where I had /dev/sda/ as my bootdrive plugged into SATA-1, and /dev/sdb-sde (my data drives) all neatly mapped as per the SATA ports on the motherboard, now my bootdrive (separate from the raid business) is showing up as /dev/sdb and I've no idea which of the other drives is which! Therefore if I get a drive failure I won't be able to immediately identify the drive by correlating the missing /dev/sdx code to 'the second drive down' in my case.

Does anyone know how to assign these drive letters to specific devices? Or any system which will make it easy for me to identify which drive is the culprit and swap em' in case of a failure? I'm not just talking hard failure where it's obvious from the BIOS, I mean if I need to fail a drive because of SMART errors etc.

Any of your pro tips would be greatly appreciated!

Create new topic
Gozer
184 posts

Master Geek


  #1460360 2-Jan-2016 20:23
Send private message

This seems to be prevalent when mixing sata and pata devices.
Using UUID in /etc/fstab makes the system always mount the partitions as you want them mounted.
Another option is to give the partitions a label (can be done easily with gparted, of course from a live disk). Then you use the label in /etc/fstab.
https://help.ubuntu.com/community/Fstab



Incindre

117 posts

Master Geek


  #1460402 2-Jan-2016 21:52
Send private message

Gozer: This seems to be prevalent when mixing sata and pata devices.
Using UUID in /etc/fstab makes the system always mount the partitions as you want them mounted.
Another option is to give the partitions a label (can be done easily with gparted, of course from a live disk). Then you use the label in /etc/fstab.
https://help.ubuntu.com/community/Fstab


Bear with a noobie here, at the moment my drives have a GPT table but no partition. Therefore when I run <sudo blkid> the only UUID's I get are for the three partitions on my boot drive.
Am I right in thinking that, as per this, the correct thing to do is to create 'symlinks' for each piece of hardware rather than mess with UUID's?

Mark
1653 posts

Uber Geek


  #1460407 2-Jan-2016 21:57
Send private message

I'm not so great with Linux LVM, but you could make a few notes and stick them to the outside of the computer :-)

Once you've created something it'll look something like this :

 


 

root@127.0.0.1:/dev# cat /dev/mdstat

 

cat: /dev/mdstat: No such file or directory

 

root@127.0.0.1:/dev# mdadm --detail /dev/md1

 

/dev/md1:

 

        Version : 1.0

 

  Creation Time : Thu May 12 19:27:22 2011

 

     Raid Level : raid5

 

     Array Size : 5854396032 (5583.19 GiB 5994.90 GB)

 

  Used Dev Size : 1951465344 (1861.06 GiB 1998.30 GB)

 

   Raid Devices : 4

 

  Total Devices : 4

 

    Persistence : Superblock is persistent

 

 

 

    Update Time : Sat Jan  2 21:38:53 2016

 

          State : clean

 

 Active Devices : 4

 

Working Devices : 4

 

 Failed Devices : 0

 

  Spare Devices : 0

 

 

 

         Layout : left-symmetric

 

     Chunk Size : 128K

 

 

 

           Name : N4200PRO:1  (local to host N4200PRO)

 

           UUID : 4c987154:45a0e7d7:846bd7a4:75f94e10

 

         Events : 233796

 

 

 

    Number   Major   Minor   RaidDevice State

 

       5       8        2        0      active sync   /dev/sda2

 

       4       8       18        1      active sync   /dev/sdb2

 

       2       8       34        2      active sync   /dev/sdc2

 

       3       8       50        3      active sync   /dev/sdd2

 

 



The bottom few lines will show you what devices are in the setup, then pull the serial numbers of those devices with :

 


root@127.0.0.1:/dev# hdparm -i /dev/sda

/dev/sda:

Model=WDC WD20EZRX-00D8PB0 , FwRev=80.00A80, SerialNo= WD-WMC4N0L611U7
Config={ HardSect NotMFM HdSw>15uSec SpinMotCtl Fixed DTR>5Mbs FmtGapReq }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
BuffType=unknown, BuffSize=0kB, MaxMultSect=16, MultSect=?0?
CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=268435455
IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
PIO modes: pio0 pio3 pio4
DMA modes: mdma0 mdma1 mdma2
UDMA modes: udma0 udma1 udma2
AdvancedPM=no WriteCache=enabled
Drive conforms to: Unspecified: ATA/ATAPI-1 ATA/ATAPI-2 ATA/ATAPI-3 ATA/ATAPI-4 ATA/ATAPI-5 ATA/ATAPI-6 ATA/ATAPI-7

* signifies the current active mode

 



Then if/when a device fails just run the hdparm command again on the surviving members and don't pull them out :-)

Clunky... and there is bound to be a smarter way of doing it, but I'm a lazy storage admin and the arrays do it all for me now!





Incindre

117 posts

Master Geek


  #1460429 2-Jan-2016 23:34
Send private message

Nice Mark, slightly ghetto but it will work in a pinch!

Still, I'd like to hear people's opinion on symlinking, as it seems to be a more reliable way of having your drives do what you want them to do every single time... but the internets aren't providing definitive answers on whether or not this is even possible with MDADM. Does MDADM even support this functionality, or does it only speak in the language of '/dev/sdx'?

I'll be RAIDing the entire disks together rather than creating an array of partitions, which I didn't make clear in the first post sorry.



openmedia
3325 posts

Uber Geek

Trusted

  #1460432 2-Jan-2016 23:40
Send private message

MDADM software raid doesn't really care if the drives change name, as long as they have the correct UUID in their RAID meta information.

I personally always put a partition table down for raid or LVM.

GPT on disks + single partition correctly aligned + Raid (I'd use Raid 6 over Raid 10 for future expansion) then LVM.




Generally known online as OpenMedia, now working for Red Hat APAC as a Technology Evangelist and Portfolio Architect. Still playing with MythTV and digital media on the side.


Incindre

117 posts

Master Geek


  #1460568 3-Jan-2016 12:15
Send private message

openmedia: MDADM software raid doesn't really care if the drives change name, as long as they have the correct UUID in their RAID meta information.

I personally always put a partition table down for raid or LVM.

GPT on disks + single partition correctly aligned + Raid (I'd use Raid 6 over Raid 10 for future expansion) then LVM.


So MDADM will use UUID's automatically without any prompting/added configuration?

Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.