E
E
Egor Ginzburg2020-07-27 09:57:28
linux
Egor Ginzburg, 2020-07-27 09:57:28

Is it possible (or is it necessary) to set the raid (md0) mount to fstab via uuid?

Good day.
I assembled a home NAS and I want to transfer it to an Ubuntu server in an adult way. Therefore, I am just learning to live in a Linux system.
I ordered mounting all disks in fstab via UUID, but raid is not registered.
Registered it so far through the name md0.
Question: is it possible (and is it necessary) to register raid through UUID?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
hint000, 2020-07-27
@Gosha_G

I ordered mounting all disks in fstab via UUID, but raid is not registered
There is a suspicion that you are setting the wrong UUID. Here is an example from one of my servers:
[email protected]:~$ lsblk -o TYPE,NAME,SIZE,FSTYPE,MOUNTPOINT,UUID
disk  sda       931.5G                                                
part  ├─sda1      865G linux_raid_member          2fad6184-451a-6e98-bcf0-20369cb2adb8
raid1 │ └─md127 864.9G ext4          /mnt/raid    adc37e0f-fb23-41e0-9fa5-d4da4c06fefb
...
disk  sdb       931.5G                                                
part  ├─sdb1      865G linux_raid_member          2fad6184-451a-6e98-bcf0-20369cb2adb8
raid1 │ └─md127 864.9G ext4          /mnt/raid    adc37e0f-fb23-41e0-9fa5-d4da4c06fefb
...

[email protected]:~$ cat /etc/fstab
...
UUID=adc37e0f-fb23-41e0-9fa5-d4da4c06fefb /mnt/raid ext4 defaults 0 0

Those. in fstab, the UUID corresponding to the device with the file system is written. If everything is so, but mounting from fstab does not occur, then show this line to fstab.
Can (or should)
Well, I'm prescribing. And so it's the master's business. Maybe someone has a reason not to prescribe. Or just laziness.

V
Vladimir, 2020-07-27
@MechanID

1 is it possible - yes it is possible
2 is it necessary - it is desirable, since you may have more hard drives and more arrays and one day your system will be updated, and it may happen that the numbers md[0-9] are mixed up. The UUID in fstab will avoid problems if the numbers get mixed up.

D
Dmitry Aleksandrov, 2020-07-27
@jamakasi666

in an adult way, transfer it to Ubuntu server

dyaaa. Sorry, couldn't resist)
Question: is it possible (and is it necessary) to register raid through UUID?

can.
Registered it so far through the name md0.

That's also possible.
I ordered mounting all disks in fstab via UUID, but raid is not registered.

Wrong UUID or hello from systemd. As for systemd, I advise you to carefully look.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question