Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Can I name a Raid 1?


  • Please log in to reply
25 replies to this topic

#1 Ravenbar

Ravenbar

  • Members
  • 125 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NY
  • Local time:09:01 AM

Posted 09 February 2016 - 10:29 PM

I typically label my disk partitions as to what's on them. Normally I use KDE Partition Editor to edit the labels. I have a RAID1 that I use for data storage that I would like to label but I can't figure out how to do it as the RAID1 Disks show up separately in the partition editor and those disk labels(Disk 1 & Disk 2) don't have an impact on the RAID  drive label. The Raid drive shows up in Dolphin as a 298Gb volume((2) 320Gb disks).


Desktops: "John2" Custom, Gigabyte F2A88Xm-D3H, AMD 6A-5400K Trinity 3.6Ghz Dual-Core APU, 16Gb DDR3  HyperX Fury 1866Mhz RAM, 120Gb Crucial Force LS SSD OS) Linux Mint 17.3, 320Gb Raid1 array consisting of (1) Seagate ST320LT020-9YG14 & (1) Fujitsu MZH2320B

Francisco: HP pavilion p7-1080t upgraded with 16Gb ram. Windows 7. Used only for Gaming

Server.GaltsGulch: HP Elite 8300 Small Form Factor, i7-3770, 16Gb ram, Kingston SSDNow 120Gb SSD, 3Tb storage HDD, Fedora Linux/Avahi, Headless

 


BC AdBot (Login to Remove)

 


#2 Gary R

Gary R

    MRU Admin


  • Malware Response Team
  • 803 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:02:01 PM

Posted 10 February 2016 - 01:17 AM

Never personally worked on a Raid array, however I did find this tutorial on the subject ... http://www.dedoimedo.com/computers/linux-raid.html ... which appears to be pretty comprehensive, and which may answer your question.



#3 Naught McNoone

Naught McNoone

  • Members
  • 307 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:The Great White North
  • Local time:09:01 AM

Posted 10 February 2016 - 10:52 AM

. . . I have a RAID1 . . . I would like to label . . . 

 

Ravenbar,

 

Did you check the mdadmn man page?

 

Look at http://linux.die.net/man/8/mdadm.

 

You are looking for the option --name= which is used when assembling the array.  It is used in "assemble" mode.

 

It is also a valid switch for the "create, build, or grow" modes as well.

 

You can also look here for help.  http://askubuntu.com/questions/63980/how-do-i-rename-an-mdadm-raid-array.

 

Cheers!

 

Naught



#4 wizardfromoz

wizardfromoz

  • Banned
  • 2,799 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:11:01 PM

Posted 10 February 2016 - 06:06 PM

@Naught McNoone, @Ravenbar:

 

I am mostly in the category (currently) of Gary R, except for a little work on RAID hardware 25 years ago with a government agency.

 

But the OP can tell us if this is a hardware RAID (sounds like it) or software RAID. I thought mdadm was for software?

 

Ravenbar are you able to provide a screenshot from your Partition Editor showing the setup?

man parted

... may provide assistance. The GNU Partition Editor "parted" ships as standard with most Distros - not to be confused with the Gnome Partition Editor GParted, which runs off parted.

 

<man parted> includes

 

 

 mklabel label-type
                     Create a new disklabel (partition table)  of  label-type.
                     label-type  should be one of "bsd", "dvh", "gpt", "loop",
                     "mac", "msdos", "pc98", or "sun".
 

 

 

but further down there is

 

 

  name partition name
                     Set the name of partition to name. This option works only
                     on  Mac, PC98, and GPT disklabels. The name can be placed
                     in quotes, if necessary.
 

 

... which might be of assistance?

 

Ravenbar are you on msdos/MBR or GPT? Or screenshot may reveal.

 

parted has inbuilt support for GPT and LVM.

 

 

:wizardball: Wizard



#5 Ravenbar

Ravenbar
  • Topic Starter

  • Members
  • 125 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NY
  • Local time:09:01 AM

Posted 10 February 2016 - 10:01 PM

 

. . . I have a RAID1 . . . I would like to label . . . 

 

Ravenbar,

 

Did you check the mdadmn man page?

 

Look at http://linux.die.net/man/8/mdadm.

 

You are looking for the option --name= which is used when assembling the array.  It is used in "assemble" mode.

 

It is also a valid switch for the "create, build, or grow" modes as well.

 

You can also look here for help.  http://askubuntu.com/questions/63980/how-do-i-rename-an-mdadm-raid-array.

 

Cheers!

 

Naught

 

Sounds like I'd have to recreate the array to set a label which isn't something I want to do.

 

 

 

@Naught McNoone, @Ravenbar:

 

I am mostly in the category (currently) of Gary R, except for a little work on RAID hardware 25 years ago with a government agency.

 

But the OP can tell us if this is a hardware RAID (sounds like it) or software RAID. I thought mdadm was for software?

 

Ravenbar are you able to provide a screenshot from your Partition Editor showing the setup?

man parted

... may provide assistance. The GNU Partition Editor "parted" ships as standard with most Distros - not to be confused with the Gnome Partition Editor GParted, which runs off parted.

 

<man parted> includes

 

 

 mklabel label-type
                     Create a new disklabel (partition table)  of  label-type.
                     label-type  should be one of "bsd", "dvh", "gpt", "loop",
                     "mac", "msdos", "pc98", or "sun".
 

 

 

but further down there is

 

 

  name partition name
                     Set the name of partition to name. This option works only
                     on  Mac, PC98, and GPT disklabels. The name can be placed
                     in quotes, if necessary.
 

 

... which might be of assistance?

 

Ravenbar are you on msdos/MBR or GPT? Or screenshot may reveal.

 

parted has inbuilt support for GPT and LVM.

 

 

:wizardball: Wizard

 

Software Raid. Supposedly my motherboard supports hardware raids but I couldn't figure out how to get it to work so I went with the software option.

 

I think it's an MBR.

 

 

The RAID drives are sdd & sde. sda is the boot drive and sdb and sdc are other operating systems and such. sdf, sdg, & sdh are just flash drive that are plugged in. tumblr_o2d494bVbX1u130qco1_1280.png


Desktops: "John2" Custom, Gigabyte F2A88Xm-D3H, AMD 6A-5400K Trinity 3.6Ghz Dual-Core APU, 16Gb DDR3  HyperX Fury 1866Mhz RAM, 120Gb Crucial Force LS SSD OS) Linux Mint 17.3, 320Gb Raid1 array consisting of (1) Seagate ST320LT020-9YG14 & (1) Fujitsu MZH2320B

Francisco: HP pavilion p7-1080t upgraded with 16Gb ram. Windows 7. Used only for Gaming

Server.GaltsGulch: HP Elite 8300 Small Form Factor, i7-3770, 16Gb ram, Kingston SSDNow 120Gb SSD, 3Tb storage HDD, Fedora Linux/Avahi, Headless

 


#6 wizardfromoz

wizardfromoz

  • Banned
  • 2,799 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:11:01 PM

Posted 11 February 2016 - 01:10 AM

@Ravenbar:

 

 

I think it's an MBR.

 

There are a number of ways to check in Terminal, and one of them is with "parted" mentioned earlier.

 

Mine looks like this:

 

GNWutRo.png

 

After the first bracketed instance of parted, you just type print and enter. You see the line with mine "Partition Table: gpt". Another dead giveaway with mine is at Line Number 1 but I won't go off-Topic with why.

 

The absence of a graphical representation similar to my Line 1 in your KDE Partition Manager screenshot would seem to indicate you are on msdos/MBR.

 

So my knowlege on RAID is exhausted, and I will butt out and leave you in more capable hands, Naught et al.

 

Thanks for allowing my input, and the screenshot, & I will watch with interest, and learn.

 

Good luck

 

:wizardball: Wizard



#7 Naught McNoone

Naught McNoone

  • Members
  • 307 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:The Great White North
  • Local time:09:01 AM

Posted 11 February 2016 - 11:15 AM

. . . I'd have to recreate the array to set a label . . . Software Raid . . . my motherboard supports hardware raids . . . couldn't figure out how to get it to work . . .

 

OK.  Lets sit back and take a breath.

 

Do you have a backup of your data?  If we are playing with volumes, partitions, and arrays, then there is a chance, no matter how careful we are, that you could loose your data.

 

What version of mdadm did you use?  "mdadm -V" will answer that.

 

Can you also run "mdadm --detail /dev/mdx" where x is the numeric assigned to your raid device?  Most likely md0 if you only have one.

 

We need to know what name is stored in the superblock.

 

Cheers!

 

Naught.



#8 Ravenbar

Ravenbar
  • Topic Starter

  • Members
  • 125 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NY
  • Local time:09:01 AM

Posted 11 February 2016 - 06:45 PM

@Ravenbar:

 

 

I think it's an MBR.

 

There are a number of ways to check in Terminal, and one of them is with "parted" mentioned earlier.

 

Mine looks like this:

 

GNWutRo.png

 

After the first bracketed instance of parted, you just type print and enter. You see the line with mine "Partition Table: gpt". Another dead giveaway with mine is at Line Number 1 but I won't go off-Topic with why.

 

The absence of a graphical representation similar to my Line 1 in your KDE Partition Manager screenshot would seem to indicate you are on msdos/MBR.

 

So my knowlege on RAID is exhausted, and I will butt out and leave you in more capable hands, Naught et al.

 

Thanks for allowing my input, and the screenshot, & I will watch with interest, and learn.

 

Good luck

 

:wizardball: Wizard

tumblr_o2eps6lUPq1u130qco1_500.png

 

 

 

 

. . . I'd have to recreate the array to set a label . . . Software Raid . . . my motherboard supports hardware raids . . . couldn't figure out how to get it to work . . .

 

OK.  Lets sit back and take a breath.

 

Do you have a backup of your data?  If we are playing with volumes, partitions, and arrays, then there is a chance, no matter how careful we are, that you could loose your data.

 

What version of mdadm did you use?  "mdadm -V" will answer that.

 

Can you also run "mdadm --detail /dev/mdx" where x is the numeric assigned to your raid device?  Most likely md0 if you only have one.

 

We need to know what name is stored in the superblock.

 

Cheers!

 

Naught.

 

tumblr_o2eps6lUPq1u130qco2_540.png

 

tumblr_o2epx635Uz1u130qco1_400.png

 

Data is backed up to another 320Gb drive on the system as well. There is another system, that's not hooked up, around that has the majority of the data on it although not very organized. I recently built a new system and copied all the data over since I don't like how loud that system is and all attempts to quiet it have failed(also an old Pentium 4 system so needed an upgrade anyway.)


Edited by Ravenbar, 11 February 2016 - 06:48 PM.

Desktops: "John2" Custom, Gigabyte F2A88Xm-D3H, AMD 6A-5400K Trinity 3.6Ghz Dual-Core APU, 16Gb DDR3  HyperX Fury 1866Mhz RAM, 120Gb Crucial Force LS SSD OS) Linux Mint 17.3, 320Gb Raid1 array consisting of (1) Seagate ST320LT020-9YG14 & (1) Fujitsu MZH2320B

Francisco: HP pavilion p7-1080t upgraded with 16Gb ram. Windows 7. Used only for Gaming

Server.GaltsGulch: HP Elite 8300 Small Form Factor, i7-3770, 16Gb ram, Kingston SSDNow 120Gb SSD, 3Tb storage HDD, Fedora Linux/Avahi, Headless

 


#9 Naught McNoone

Naught McNoone

  • Members
  • 307 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:The Great White North
  • Local time:09:01 AM

Posted 13 February 2016 - 01:15 PM

Ravenbar,

 

Good!  You have a backup in case something goes wrong.

 

mdadm 3.2.5 (2012) is not the latest, but should do for what you want.  The latest version is 3.4 (2016).

 

You need to re-read the mdadmn man page at http://linux.die.net/man/8/mdadm.  The instructions are there, but unfortunately, they don't jump out at you.

 

Here are the sections that apply:

 

For create, build, or grow:

-N, --name= Set a name for the array. This is currently only effective when creating an array with a version-1 superblock, or an array in a DDF container. The name is a simple textual string that can be used to identify array components when assembling. If name is needed but not specified, it is taken from the basename of the device that is being created. e.g. when creating /dev/md/home the name will default to home.  

For assemble:

-N, --name= Specify the name of the array to assemble. This must be the name that was specified when creating the array. It must either match the name stored in the superblock exactly, or it must match with the current homehost prefixed to the start of the given name.

 

 

Read this link, which explains what you need to do with a little more detail.  http://askubuntu.com/questions/63980/how-do-i-rename-an-mdadm-raid-array .

 

Essentially what you have to do is disassemble the array, and re-assemble it using the --name=newname switch.

 

You then have to update initramfs, and finally update your mdadm.conf.

 

This should permanently assign a text string name to your raid array.  It would then appear as /dev/newname instead of the default /dev/md0.

 

 

BEFORE YOU PROCEED

 

You should not have to format or reconfigure your sdd1 or sde1 partitions.  When you reassemble, they should automatically resync.

 

I have never done this with and existing array.  I have always specified the array name at the start. It should work, but . . .

 

I would test in on another non critical array first.

 

Cheers!

 

Naught



#10 Ravenbar

Ravenbar
  • Topic Starter

  • Members
  • 125 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NY
  • Local time:09:01 AM

Posted 13 February 2016 - 02:49 PM

Problem:

 

I'm getting an error when I attempt to reassemble the array:

 

tumblr_o2i4cpo50K1u130qco1_1280.jpg

 

I the array isn't lost as I can have mdadm find and assemble the array automatically.


Desktops: "John2" Custom, Gigabyte F2A88Xm-D3H, AMD 6A-5400K Trinity 3.6Ghz Dual-Core APU, 16Gb DDR3  HyperX Fury 1866Mhz RAM, 120Gb Crucial Force LS SSD OS) Linux Mint 17.3, 320Gb Raid1 array consisting of (1) Seagate ST320LT020-9YG14 & (1) Fujitsu MZH2320B

Francisco: HP pavilion p7-1080t upgraded with 16Gb ram. Windows 7. Used only for Gaming

Server.GaltsGulch: HP Elite 8300 Small Form Factor, i7-3770, 16Gb ram, Kingston SSDNow 120Gb SSD, 3Tb storage HDD, Fedora Linux/Avahi, Headless

 


#11 Ravenbar

Ravenbar
  • Topic Starter

  • Members
  • 125 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NY
  • Local time:09:01 AM

Posted 13 February 2016 - 04:45 PM

OK, solved the error. I have to run the command:

sudo mdadm --assemble /dev/md/Storage --name=Storage --update=name /dev/sd[de]1
instead of

sudo mdadm --assemble /dev/md/Storage --name=Storage --update=name /dev/sd[de]

Desktops: "John2" Custom, Gigabyte F2A88Xm-D3H, AMD 6A-5400K Trinity 3.6Ghz Dual-Core APU, 16Gb DDR3  HyperX Fury 1866Mhz RAM, 120Gb Crucial Force LS SSD OS) Linux Mint 17.3, 320Gb Raid1 array consisting of (1) Seagate ST320LT020-9YG14 & (1) Fujitsu MZH2320B

Francisco: HP pavilion p7-1080t upgraded with 16Gb ram. Windows 7. Used only for Gaming

Server.GaltsGulch: HP Elite 8300 Small Form Factor, i7-3770, 16Gb ram, Kingston SSDNow 120Gb SSD, 3Tb storage HDD, Fedora Linux/Avahi, Headless

 


#12 Ravenbar

Ravenbar
  • Topic Starter

  • Members
  • 125 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NY
  • Local time:09:01 AM

Posted 13 February 2016 - 05:12 PM

Doing all this hasn't achieved my goal. The name of the raid is set to Storage, yet it's still listed as 320Gib Hard Drive in my file manager.


Desktops: "John2" Custom, Gigabyte F2A88Xm-D3H, AMD 6A-5400K Trinity 3.6Ghz Dual-Core APU, 16Gb DDR3  HyperX Fury 1866Mhz RAM, 120Gb Crucial Force LS SSD OS) Linux Mint 17.3, 320Gb Raid1 array consisting of (1) Seagate ST320LT020-9YG14 & (1) Fujitsu MZH2320B

Francisco: HP pavilion p7-1080t upgraded with 16Gb ram. Windows 7. Used only for Gaming

Server.GaltsGulch: HP Elite 8300 Small Form Factor, i7-3770, 16Gb ram, Kingston SSDNow 120Gb SSD, 3Tb storage HDD, Fedora Linux/Avahi, Headless

 


#13 Naught McNoone

Naught McNoone

  • Members
  • 307 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:The Great White North
  • Local time:09:01 AM

Posted 13 February 2016 - 07:42 PM

. . . hasn't achieved my goal . . . name . . . is set to Storage . . . still listed as 320Gib Hard Drive in my file manager.

 

Yes it would be!  Because it is Raid1.  Mirror.  The operating system sees the raid array as a single drive.  The two drives are synced with the same data.

 

If you want it to be seen as a single 640GB drive, you need to use Raid0.  Stripe.

 

Cheers!

 

Naught



#14 Naught McNoone

Naught McNoone

  • Members
  • 307 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:The Great White North
  • Local time:09:01 AM

Posted 13 February 2016 - 07:54 PM

 

 . . . solved the error . . .

 

Glad to see that you are on the way.  If you need more help, just ask.

 

Cheers!

 

Naught



#15 Ravenbar

Ravenbar
  • Topic Starter

  • Members
  • 125 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NY
  • Local time:09:01 AM

Posted 13 February 2016 - 08:47 PM

 

. . . hasn't achieved my goal . . . name . . . is set to Storage . . . still listed as 320Gib Hard Drive in my file manager.

 

Yes it would be!  Because it is Raid1.  Mirror.  The operating system sees the raid array as a single drive.  The two drives are synced with the same data.

 

If you want it to be seen as a single 640GB drive, you need to use Raid0.  Stripe.

 

Cheers!

 

Naught

 

 

That wasn't the problem. What I want to do is to chance the way the drive is displayed in my file manager.  In other words, the file manager isn't using the name of the raid when it lists the raid drive. I'm wondering it there's a difference between "label" and name" and if there is a way to set the label for a raid drive. The other HDD's in the system have labels set and they are what the file manager refers to the drives as.

 

Under devices in this picture, you can see all the devices have labels except the 298GiB drive, which is the Raid, after I've set the name to Storage. What I want is for it to be listed as "Storage" where it says "298GiB Hard Drive".

tumblr_o2ildwVHTF1u130qco1_400.jpg


Edited by Ravenbar, 13 February 2016 - 08:59 PM.

Desktops: "John2" Custom, Gigabyte F2A88Xm-D3H, AMD 6A-5400K Trinity 3.6Ghz Dual-Core APU, 16Gb DDR3  HyperX Fury 1866Mhz RAM, 120Gb Crucial Force LS SSD OS) Linux Mint 17.3, 320Gb Raid1 array consisting of (1) Seagate ST320LT020-9YG14 & (1) Fujitsu MZH2320B

Francisco: HP pavilion p7-1080t upgraded with 16Gb ram. Windows 7. Used only for Gaming

Server.GaltsGulch: HP Elite 8300 Small Form Factor, i7-3770, 16Gb ram, Kingston SSDNow 120Gb SSD, 3Tb storage HDD, Fedora Linux/Avahi, Headless

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users