LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-06-2015, 05:08 AM   #1
steak1987
Member
 
Registered: Jan 2012
Posts: 130

Rep: Reputation: Disabled
Question mdadm, usb drives and uuid questions


Hey, im looking to make a RAID array on a raspberry pi, using a couple of cheap flash drives connected to a USB hub.

Now, I understand, the way disks are identified in linux are by UUID (Amongst other things), but flash disks dont have UUIDS.

I could use mdmadm to make a raid array using /dev/sdxx but what will happen upon reboot ? How can I be sure that the flash drives stay as in their respective /dev/sdx position as opposed to changing around?

Sorry if my terminology is a bit strange, but I hope you understand my predicament?
 
Old 01-06-2015, 12:01 PM   #2
yo8rxp
Member
 
Registered: Jul 2009
Location: Romania
Distribution: Ubuntu 10.04 Gnome 2
Posts: 102

Rep: Reputation: 31
Well it is tricky

1. creation time : all drives partitions including usb flash , got UUID , check that using root
Quote:
blkid
create raid using /dev/sdx names , wich actually writes UUID into matrix

If somehow drives seX names get mixed , no worry , coz mdadm is UUID based , not sdX

my server output

Quote:
blkid
/dev/sda1: UUID="497b820b-f46c-755f-8f04-07357fb4c431" TYPE="linux_raid_member"
Now , lets get some details about mdadm sda1


Quote:
mdadm --examine /dev/sda1


/dev/sda1:
Magic : a92b4efc
Version : 00.90.00
UUID : 497b820b:f46c755f:8f040735:7fb4c431
Creation Time : Fri Aug 15 10:04:28 2014
Raid Level : raid1
Used Dev Size : 976760768 (931.51 GiB 1000.20 GB)
Array Size : 976760768 (931.51 GiB 1000.20 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Please observe that mdadm sda1 UUID is identical with the one reported by blkid.


Let's insert an USB flash and run fdisk -l just to see it's dev name
Quote:
sudo fdisk -l
Disk /dev/sdg: 30.9 GB, 30943995904 bytes
32 heads, 20 sectors/track, 94433 cylinders, total 60437492 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003c6ae
Ok , got my flash in , it is partitioned otherwise there is no UUID
Quote:
sudo blkid
/dev/sdg1: UUID="be594716-681c-4fad-a71f-83c037666994" TYPE="xfs"
see ? even USB flash got it's own UUID , which indeed differ from one machine to another , and differ even on same PC if repartitioning

Did once a raid 0 but cannot reach more than 40-50 MB/s even with 4 x kingston datatraveller 20Mb/s read, ,mainly coz USB 2.0 is limited to 480 Mb/s, but LED's light is great ,

Last edited by yo8rxp; 01-06-2015 at 12:15 PM.
 
1 members found this post helpful.
Old 01-08-2015, 03:19 AM   #3
steak1987
Member
 
Registered: Jan 2012
Posts: 130

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yo8rxp View Post
Well it is tricky

1. creation time : all drives partitions including usb flash , got UUID , check that using root

.............

Did once a raid 0 but cannot reach more than 40-50 MB/s even with 4 x kingston datatraveller 20Mb/s read, ,mainly coz USB 2.0 is limited to 480 Mb/s, but LED's light is great ,
Ah cheers, I'll need to read up on it and start messing about with my own USB Raid array.
 
  


Reply

Tags
mdadm, raid, uuid



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mdadm: /dev/sdb1 has wrong uuid ysjdx Linux - Server 0 12-04-2011 11:02 AM
UUID not resetting with USB enclosured SATA hard drives brijam Linux - Hardware 1 01-11-2011 04:52 PM
Detailed questions about UUID's Cage47 Linux - Hardware 6 01-29-2010 09:39 AM
LXer: Today in 'Latest Ubuntu Karmic fails': USB drives automount with UUID instead o LXer Syndicated Linux News 0 11-17-2009 08:50 AM
A few grub questions / booting external usb drives Only_he_stands_here Linux - General 1 11-15-2008 04:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration