How to label a RAID array?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
TrogdorMenoo
Level 1
Level 1
Posts: 24
Joined: Sun Nov 04, 2018 8:44 am

How to label a RAID array?

Post by TrogdorMenoo » Mon Nov 12, 2018 3:26 pm

I recently put new life into a 10 year old eMachines computer with several attached hard drives. It's my NAS computer :-)

I followed these instructions to successfully create a RAID array: https://www.digitalocean.com/community/ ... untu-18-04

The end result was a not so friendly name/file system reference called: /dev/md0
Also, Nautilus did not have a shortcut available to it in the GUI.

So I did:

Code: Select all

sudo mount /dev/md0 /media/lion/2TB-Internal/
And I had to get ownership of it:

Code: Select all

sudo chown -hR lion 2TB-Internal/
However I still cannot change the "label" that Nautilus presents in the GUI. The GUI calls it "2.0 TB Volume". I've tried changing the name under "Properties" but after I press "Close", it keeps the original label name. I would like to be able to identify it by the label I choose rather than the one it assigns. How do I do this?

User avatar
catweazel
Level 17
Level 17
Posts: 7770
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to label a RAID array?

Post by catweazel » Tue Nov 13, 2018 1:19 am

TrogdorMenoo wrote:
Mon Nov 12, 2018 3:26 pm
The end result was a not so friendly name/file system reference called: /dev/md0
What are the device identifiers for the disks in the array?
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

TrogdorMenoo
Level 1
Level 1
Posts: 24
Joined: Sun Nov 04, 2018 8:44 am

Re: How to label a RAID array?

Post by TrogdorMenoo » Tue Nov 13, 2018 10:49 am

catweazel wrote:
Tue Nov 13, 2018 1:19 am
TrogdorMenoo wrote:
Mon Nov 12, 2018 3:26 pm
The end result was a not so friendly name/file system reference called: /dev/md0
What are the device identifiers for the disks in the array?
Does this show you what you asked for?

Code: Select all

sdk            1.8T linux_raid_member disk  
└─md0          1.8T ext4              raid1 /media/albundy/2TB-Internal
sdl            1.8T linux_raid_member disk  
└─md0          1.8T ext4              raid1 /media/albundy/2TB-Internal
To clarify, I'd like to see an icon on the desktop called "2TB-internal" as well as being able to do command line paths referring to \media\2TB-internal.
  • Currently I did figure out how to use mount to get it to show up under "\media".
  • On the desktop, the RAID array appears as "2.0 TB Volume".

User avatar
catweazel
Level 17
Level 17
Posts: 7770
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to label a RAID array?

Post by catweazel » Wed Nov 14, 2018 12:56 am

TrogdorMenoo wrote:
Tue Nov 13, 2018 10:49 am
catweazel wrote:
Tue Nov 13, 2018 1:19 am
TrogdorMenoo wrote:
Mon Nov 12, 2018 3:26 pm
The end result was a not so friendly name/file system reference called: /dev/md0
What are the device identifiers for the disks in the array?
Does this show you what you asked for?

Code: Select all

sdk            1.8T linux_raid_member disk  
└─md0          1.8T ext4              raid1 /media/albundy/2TB-Internal
sdl            1.8T linux_raid_member disk  
└─md0          1.8T ext4              raid1 /media/albundy/2TB-Internal
To clarify, I'd like to see an icon on the desktop called "2TB-internal" as well as being able to do command line paths referring to \media\2TB-internal.
  • Currently I did figure out how to use mount to get it to show up under "\media".
  • On the desktop, the RAID array appears as "2.0 TB Volume".

Code: Select all

sudo mdadm --stop /dev/md0
sudo mdadm --remove /dev/md0
sudo mdadm --assemble /dev/md/0 --name=new_name --update=name /dev/sd[kl]
The code will rename the array from md0 to whatever you put for new_name. I would avoid spaces.

Cheers.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

TrogdorMenoo
Level 1
Level 1
Posts: 24
Joined: Sun Nov 04, 2018 8:44 am

Re: How to label a RAID array?

Post by TrogdorMenoo » Wed Nov 14, 2018 1:02 am

catweazel wrote:
Wed Nov 14, 2018 12:56 am
TrogdorMenoo wrote:
Tue Nov 13, 2018 10:49 am
catweazel wrote:
Tue Nov 13, 2018 1:19 am


What are the device identifiers for the disks in the array?
Does this show you what you asked for?

Code: Select all

sdk            1.8T linux_raid_member disk  
└─md0          1.8T ext4              raid1 /media/albundy/2TB-Internal
sdl            1.8T linux_raid_member disk  
└─md0          1.8T ext4              raid1 /media/albundy/2TB-Internal
To clarify, I'd like to see an icon on the desktop called "2TB-internal" as well as being able to do command line paths referring to \media\2TB-internal.
  • Currently I did figure out how to use mount to get it to show up under "\media".
  • On the desktop, the RAID array appears as "2.0 TB Volume".

Code: Select all

sudo mdadm --stop /dev/md0
sudo mdadm --remove /dev/md0
sudo mdadm --assemble /dev/md/0 --name=new_name --update=name /dev/sd[kl]
The code will rename the array from md0 to whatever you put for new_name. I would avoid spaces.

Cheers.
Thanks. Before I run this, will it cause data loss to an existing/in-use array? Also, what does that last part /dev/sd[k1] mean?

User avatar
catweazel
Level 17
Level 17
Posts: 7770
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to label a RAID array?

Post by catweazel » Wed Nov 14, 2018 1:07 am

TrogdorMenoo wrote:
Wed Nov 14, 2018 1:02 am
Thanks. Before I run this, will it cause data loss to an existing/in-use array? Also, what does that last part /dev/sd[k1] mean?
It worked fine just now on my production system. Nobody can guarantee against data loss. Regarding /dev/sd[..] that's k and lower case L as in [kl], which is what I asked for; the device identifiers. It tells mdadm to assemble the array using /dev/sdk and /dev/sdl.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

Post Reply

Return to “Installation & Boot”