How to label a RAID array?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
TrogdorMenoo
Level 2
Level 2
Posts: 99
Joined: Sun Nov 04, 2018 8:44 am

How to label a RAID array?

Post by TrogdorMenoo »

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?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to label a RAID array?

Post by catweazel »

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?
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
TrogdorMenoo
Level 2
Level 2
Posts: 99
Joined: Sun Nov 04, 2018 8:44 am

Re: How to label a RAID array?

Post by TrogdorMenoo »

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 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to label a RAID array?

Post by catweazel »

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.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
TrogdorMenoo
Level 2
Level 2
Posts: 99
Joined: Sun Nov 04, 2018 8:44 am

Re: How to label a RAID array?

Post by TrogdorMenoo »

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 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: How to label a RAID array?

Post by catweazel »

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.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Locked

Return to “Installation & Boot”