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.




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
168 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



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?

 
 
 
 


1546 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!





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.



2223 posts

Uber Geek

Trusted
Subscriber

  #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 a Technology Evangelist and Product Manager. Still playing with MythTV and digital media on the side.




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



Twitter and LinkedIn »



Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

National Institute for Health Innovation develops treatment app for gambling
Posted 6-Jul-2020 16:25


Nokia 2.3 to be available in New Zealand
Posted 6-Jul-2020 12:30


Menulog change colours as parent company merges with Dutch food delivery service
Posted 2-Jul-2020 07:53


Techweek2020 goes digital to make it easier for Kiwis to connect and learn
Posted 2-Jul-2020 07:48


Catalyst Cloud launches new Solutions Hub to support their kiwi Partners and Customers
Posted 2-Jul-2020 07:44


Microsoft to help New Zealand job seekers acquire new digital skills needed for the COVID-19 economy
Posted 2-Jul-2020 07:41


Hewlett Packard Enterprise introduces new HPE GreenLake cloud services
Posted 24-Jun-2020 08:07


New cloud data protection services from Hewlett Packard Enterprise
Posted 24-Jun-2020 07:58


Hewlett Packard Enterprise unveils HPE Ezmeral, new software portfolio and brand
Posted 24-Jun-2020 07:10


Apple reveals new developer technologies to foster the next generation of apps
Posted 23-Jun-2020 15:30


Poly introduces solutions for Microsoft Teams Rooms
Posted 23-Jun-2020 15:14


Lenovo launches new ThinkPad P Series mobile workstations
Posted 23-Jun-2020 09:17


Lenovo brings Linux certification to ThinkPad and ThinkStation Workstation portfolio
Posted 23-Jun-2020 08:56


Apple introduces new features for iPhone iOS14 and iPadOS 14
Posted 23-Jun-2020 08:28


Apple announces Mac transition to Apple silicon
Posted 23-Jun-2020 08:18



Geekzone Live »

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


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



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.

Alternatively, you can receive a daily email with Geekzone updates.