MDADM: automount only works with dev, not UUID
I am using Arch Linux. I have three functioning RAID arrays via MDADM:
~ cat /etc/mdadm.conf
ARRAY /dev/md0 metadata=1.2 name=beast:0 UUID=564fbbac:07f9bbeb:07ef9229:1d8fd77e
ARRAY /dev/md1 metadata=1.2 name=beast:1 UUID=7559b085:3b4715cc:59205fdd:12c0db08
ARRAY /dev/md2 metadata=1.2 name=beast:2 UUID=2dddbf33:26249617:ef8f8b65:c9670bdb
I have three directories in /run/media
that I try to automount these mdadm arrays via fstab:
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=564fbbac:07f9bbeb:07ef9229:1d8fd77e /run/media/tcarpent/MDADM_SYSRAID ntfs-3g auto,user,rw,exec,nofail 0 0
/dev/md0 /run/media/tcarpent/MDADM_SYSRAID ntfs-3g auto,user,rw,exec,nofail 0 0
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=7559b085:3b4715cc:59205fdd:12c0db08 /run/media/tcarpent/MDADM_MISCRAID ext4 auto,user,rw,exec,nofail 0 0
/dev/md1 /run/media/tcarpent/MDADM_MISCRAID ext4 auto,user,rw,exec,nofail 0 0
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=2dddbf33:26249617:ef8f8b65:c9670bdb /run/media/tcarpent/MDADM_MEDIARAID ext4 auto,user,rw,exec,nofail 0 0
/dev/md2 /run/media/tcarpent/MDADM_MEDIARAID ext4 auto,user,rw,exec,nofail 0 0
Using the commented out UUID lines, automount does not work. I see the drive as 'active but not mounted' in webmin, but am required to mount it, and enter my password, then the drive mounts. However, with the /dev/,,,
lines, automount works, no password required.
What gives? I've been told to ALWAYS fstab with UUIDs and never device names so I want to fix this.
fstab mdadm
add a comment |
I am using Arch Linux. I have three functioning RAID arrays via MDADM:
~ cat /etc/mdadm.conf
ARRAY /dev/md0 metadata=1.2 name=beast:0 UUID=564fbbac:07f9bbeb:07ef9229:1d8fd77e
ARRAY /dev/md1 metadata=1.2 name=beast:1 UUID=7559b085:3b4715cc:59205fdd:12c0db08
ARRAY /dev/md2 metadata=1.2 name=beast:2 UUID=2dddbf33:26249617:ef8f8b65:c9670bdb
I have three directories in /run/media
that I try to automount these mdadm arrays via fstab:
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=564fbbac:07f9bbeb:07ef9229:1d8fd77e /run/media/tcarpent/MDADM_SYSRAID ntfs-3g auto,user,rw,exec,nofail 0 0
/dev/md0 /run/media/tcarpent/MDADM_SYSRAID ntfs-3g auto,user,rw,exec,nofail 0 0
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=7559b085:3b4715cc:59205fdd:12c0db08 /run/media/tcarpent/MDADM_MISCRAID ext4 auto,user,rw,exec,nofail 0 0
/dev/md1 /run/media/tcarpent/MDADM_MISCRAID ext4 auto,user,rw,exec,nofail 0 0
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=2dddbf33:26249617:ef8f8b65:c9670bdb /run/media/tcarpent/MDADM_MEDIARAID ext4 auto,user,rw,exec,nofail 0 0
/dev/md2 /run/media/tcarpent/MDADM_MEDIARAID ext4 auto,user,rw,exec,nofail 0 0
Using the commented out UUID lines, automount does not work. I see the drive as 'active but not mounted' in webmin, but am required to mount it, and enter my password, then the drive mounts. However, with the /dev/,,,
lines, automount works, no password required.
What gives? I've been told to ALWAYS fstab with UUIDs and never device names so I want to fix this.
fstab mdadm
add a comment |
I am using Arch Linux. I have three functioning RAID arrays via MDADM:
~ cat /etc/mdadm.conf
ARRAY /dev/md0 metadata=1.2 name=beast:0 UUID=564fbbac:07f9bbeb:07ef9229:1d8fd77e
ARRAY /dev/md1 metadata=1.2 name=beast:1 UUID=7559b085:3b4715cc:59205fdd:12c0db08
ARRAY /dev/md2 metadata=1.2 name=beast:2 UUID=2dddbf33:26249617:ef8f8b65:c9670bdb
I have three directories in /run/media
that I try to automount these mdadm arrays via fstab:
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=564fbbac:07f9bbeb:07ef9229:1d8fd77e /run/media/tcarpent/MDADM_SYSRAID ntfs-3g auto,user,rw,exec,nofail 0 0
/dev/md0 /run/media/tcarpent/MDADM_SYSRAID ntfs-3g auto,user,rw,exec,nofail 0 0
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=7559b085:3b4715cc:59205fdd:12c0db08 /run/media/tcarpent/MDADM_MISCRAID ext4 auto,user,rw,exec,nofail 0 0
/dev/md1 /run/media/tcarpent/MDADM_MISCRAID ext4 auto,user,rw,exec,nofail 0 0
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=2dddbf33:26249617:ef8f8b65:c9670bdb /run/media/tcarpent/MDADM_MEDIARAID ext4 auto,user,rw,exec,nofail 0 0
/dev/md2 /run/media/tcarpent/MDADM_MEDIARAID ext4 auto,user,rw,exec,nofail 0 0
Using the commented out UUID lines, automount does not work. I see the drive as 'active but not mounted' in webmin, but am required to mount it, and enter my password, then the drive mounts. However, with the /dev/,,,
lines, automount works, no password required.
What gives? I've been told to ALWAYS fstab with UUIDs and never device names so I want to fix this.
fstab mdadm
I am using Arch Linux. I have three functioning RAID arrays via MDADM:
~ cat /etc/mdadm.conf
ARRAY /dev/md0 metadata=1.2 name=beast:0 UUID=564fbbac:07f9bbeb:07ef9229:1d8fd77e
ARRAY /dev/md1 metadata=1.2 name=beast:1 UUID=7559b085:3b4715cc:59205fdd:12c0db08
ARRAY /dev/md2 metadata=1.2 name=beast:2 UUID=2dddbf33:26249617:ef8f8b65:c9670bdb
I have three directories in /run/media
that I try to automount these mdadm arrays via fstab:
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=564fbbac:07f9bbeb:07ef9229:1d8fd77e /run/media/tcarpent/MDADM_SYSRAID ntfs-3g auto,user,rw,exec,nofail 0 0
/dev/md0 /run/media/tcarpent/MDADM_SYSRAID ntfs-3g auto,user,rw,exec,nofail 0 0
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=7559b085:3b4715cc:59205fdd:12c0db08 /run/media/tcarpent/MDADM_MISCRAID ext4 auto,user,rw,exec,nofail 0 0
/dev/md1 /run/media/tcarpent/MDADM_MISCRAID ext4 auto,user,rw,exec,nofail 0 0
#THE FOLLOWING SHOULD WORK BUT AUTOMOUNT FAILS!!!!!
#UUID=2dddbf33:26249617:ef8f8b65:c9670bdb /run/media/tcarpent/MDADM_MEDIARAID ext4 auto,user,rw,exec,nofail 0 0
/dev/md2 /run/media/tcarpent/MDADM_MEDIARAID ext4 auto,user,rw,exec,nofail 0 0
Using the commented out UUID lines, automount does not work. I see the drive as 'active but not mounted' in webmin, but am required to mount it, and enter my password, then the drive mounts. However, with the /dev/,,,
lines, automount works, no password required.
What gives? I've been told to ALWAYS fstab with UUIDs and never device names so I want to fix this.
fstab mdadm
fstab mdadm
edited Aug 14 '16 at 12:08
Tommy
asked Aug 14 '16 at 1:38
TommyTommy
1658
1658
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
The UUID
seen in mdadm.conf
are related to the MD drivers.
The UUID
used in fstab
are related to filesytems.
What you need are the filesystem UUID numbers. You can get them with a command line
sudo dumpe2fs /dev/md0 | grep UUID
So in my case:
$ grep md/0 /etc/mdadm/mdadm.conf
ARRAY /dev/md/0 metadata=1.2 UUID=d634adc8:69deedd8:d491a79e:69aeff78
$ sudo dumpe2fs /dev/md0 | grep UUID
dumpe2fs 1.42.12 (29-Aug-2014)
Filesystem UUID: 195237da-8825-45fb-abf7-a62895bd0967
$ grep boot /etc/fstab
UUID=195237da-8825-45fb-abf7-a62895bd0967 /boot ext4 defaults 0 2
So we can see the UUID used is the filesystem UUID and not the MD UUID.
So this command works for md1 and md2, but gives tjhe followinfg for md0: 'sudo dumpe2fs /dev/md0 | grep UUID 28.6s Sun 14 Aug 2016 08:10:57 AM EDT dumpe2fs 1.43.1 (08-Jun-2016) dumpe2fs: Bad magic number in super-block while trying to open /dev/md0'
– Tommy
Aug 14 '16 at 12:19
/dev/md0 is an ntfs-3g partition, whereas md1 and md2 are not, does that have to do with it?
– Tommy
Aug 14 '16 at 12:22
Yes, I don't know if ntfs-3g had a UUID you can use this way. If there is a UUID then you'll need to find another way of finding it;dumpe2fs
only works with ext2/3/4 filesystems.
– Stephen Harris
Aug 14 '16 at 12:40
add a comment |
Thank you, Stephen Harris !! You just saved me some headaches
New contributor
Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review
– RalfFriedl
5 hours ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f303286%2fmdadm-automount-only-works-with-dev-not-uuid%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
The UUID
seen in mdadm.conf
are related to the MD drivers.
The UUID
used in fstab
are related to filesytems.
What you need are the filesystem UUID numbers. You can get them with a command line
sudo dumpe2fs /dev/md0 | grep UUID
So in my case:
$ grep md/0 /etc/mdadm/mdadm.conf
ARRAY /dev/md/0 metadata=1.2 UUID=d634adc8:69deedd8:d491a79e:69aeff78
$ sudo dumpe2fs /dev/md0 | grep UUID
dumpe2fs 1.42.12 (29-Aug-2014)
Filesystem UUID: 195237da-8825-45fb-abf7-a62895bd0967
$ grep boot /etc/fstab
UUID=195237da-8825-45fb-abf7-a62895bd0967 /boot ext4 defaults 0 2
So we can see the UUID used is the filesystem UUID and not the MD UUID.
So this command works for md1 and md2, but gives tjhe followinfg for md0: 'sudo dumpe2fs /dev/md0 | grep UUID 28.6s Sun 14 Aug 2016 08:10:57 AM EDT dumpe2fs 1.43.1 (08-Jun-2016) dumpe2fs: Bad magic number in super-block while trying to open /dev/md0'
– Tommy
Aug 14 '16 at 12:19
/dev/md0 is an ntfs-3g partition, whereas md1 and md2 are not, does that have to do with it?
– Tommy
Aug 14 '16 at 12:22
Yes, I don't know if ntfs-3g had a UUID you can use this way. If there is a UUID then you'll need to find another way of finding it;dumpe2fs
only works with ext2/3/4 filesystems.
– Stephen Harris
Aug 14 '16 at 12:40
add a comment |
The UUID
seen in mdadm.conf
are related to the MD drivers.
The UUID
used in fstab
are related to filesytems.
What you need are the filesystem UUID numbers. You can get them with a command line
sudo dumpe2fs /dev/md0 | grep UUID
So in my case:
$ grep md/0 /etc/mdadm/mdadm.conf
ARRAY /dev/md/0 metadata=1.2 UUID=d634adc8:69deedd8:d491a79e:69aeff78
$ sudo dumpe2fs /dev/md0 | grep UUID
dumpe2fs 1.42.12 (29-Aug-2014)
Filesystem UUID: 195237da-8825-45fb-abf7-a62895bd0967
$ grep boot /etc/fstab
UUID=195237da-8825-45fb-abf7-a62895bd0967 /boot ext4 defaults 0 2
So we can see the UUID used is the filesystem UUID and not the MD UUID.
So this command works for md1 and md2, but gives tjhe followinfg for md0: 'sudo dumpe2fs /dev/md0 | grep UUID 28.6s Sun 14 Aug 2016 08:10:57 AM EDT dumpe2fs 1.43.1 (08-Jun-2016) dumpe2fs: Bad magic number in super-block while trying to open /dev/md0'
– Tommy
Aug 14 '16 at 12:19
/dev/md0 is an ntfs-3g partition, whereas md1 and md2 are not, does that have to do with it?
– Tommy
Aug 14 '16 at 12:22
Yes, I don't know if ntfs-3g had a UUID you can use this way. If there is a UUID then you'll need to find another way of finding it;dumpe2fs
only works with ext2/3/4 filesystems.
– Stephen Harris
Aug 14 '16 at 12:40
add a comment |
The UUID
seen in mdadm.conf
are related to the MD drivers.
The UUID
used in fstab
are related to filesytems.
What you need are the filesystem UUID numbers. You can get them with a command line
sudo dumpe2fs /dev/md0 | grep UUID
So in my case:
$ grep md/0 /etc/mdadm/mdadm.conf
ARRAY /dev/md/0 metadata=1.2 UUID=d634adc8:69deedd8:d491a79e:69aeff78
$ sudo dumpe2fs /dev/md0 | grep UUID
dumpe2fs 1.42.12 (29-Aug-2014)
Filesystem UUID: 195237da-8825-45fb-abf7-a62895bd0967
$ grep boot /etc/fstab
UUID=195237da-8825-45fb-abf7-a62895bd0967 /boot ext4 defaults 0 2
So we can see the UUID used is the filesystem UUID and not the MD UUID.
The UUID
seen in mdadm.conf
are related to the MD drivers.
The UUID
used in fstab
are related to filesytems.
What you need are the filesystem UUID numbers. You can get them with a command line
sudo dumpe2fs /dev/md0 | grep UUID
So in my case:
$ grep md/0 /etc/mdadm/mdadm.conf
ARRAY /dev/md/0 metadata=1.2 UUID=d634adc8:69deedd8:d491a79e:69aeff78
$ sudo dumpe2fs /dev/md0 | grep UUID
dumpe2fs 1.42.12 (29-Aug-2014)
Filesystem UUID: 195237da-8825-45fb-abf7-a62895bd0967
$ grep boot /etc/fstab
UUID=195237da-8825-45fb-abf7-a62895bd0967 /boot ext4 defaults 0 2
So we can see the UUID used is the filesystem UUID and not the MD UUID.
answered Aug 14 '16 at 1:49
Stephen HarrisStephen Harris
26.8k35181
26.8k35181
So this command works for md1 and md2, but gives tjhe followinfg for md0: 'sudo dumpe2fs /dev/md0 | grep UUID 28.6s Sun 14 Aug 2016 08:10:57 AM EDT dumpe2fs 1.43.1 (08-Jun-2016) dumpe2fs: Bad magic number in super-block while trying to open /dev/md0'
– Tommy
Aug 14 '16 at 12:19
/dev/md0 is an ntfs-3g partition, whereas md1 and md2 are not, does that have to do with it?
– Tommy
Aug 14 '16 at 12:22
Yes, I don't know if ntfs-3g had a UUID you can use this way. If there is a UUID then you'll need to find another way of finding it;dumpe2fs
only works with ext2/3/4 filesystems.
– Stephen Harris
Aug 14 '16 at 12:40
add a comment |
So this command works for md1 and md2, but gives tjhe followinfg for md0: 'sudo dumpe2fs /dev/md0 | grep UUID 28.6s Sun 14 Aug 2016 08:10:57 AM EDT dumpe2fs 1.43.1 (08-Jun-2016) dumpe2fs: Bad magic number in super-block while trying to open /dev/md0'
– Tommy
Aug 14 '16 at 12:19
/dev/md0 is an ntfs-3g partition, whereas md1 and md2 are not, does that have to do with it?
– Tommy
Aug 14 '16 at 12:22
Yes, I don't know if ntfs-3g had a UUID you can use this way. If there is a UUID then you'll need to find another way of finding it;dumpe2fs
only works with ext2/3/4 filesystems.
– Stephen Harris
Aug 14 '16 at 12:40
So this command works for md1 and md2, but gives tjhe followinfg for md0: 'sudo dumpe2fs /dev/md0 | grep UUID 28.6s Sun 14 Aug 2016 08:10:57 AM EDT dumpe2fs 1.43.1 (08-Jun-2016) dumpe2fs: Bad magic number in super-block while trying to open /dev/md0'
– Tommy
Aug 14 '16 at 12:19
So this command works for md1 and md2, but gives tjhe followinfg for md0: 'sudo dumpe2fs /dev/md0 | grep UUID 28.6s Sun 14 Aug 2016 08:10:57 AM EDT dumpe2fs 1.43.1 (08-Jun-2016) dumpe2fs: Bad magic number in super-block while trying to open /dev/md0'
– Tommy
Aug 14 '16 at 12:19
/dev/md0 is an ntfs-3g partition, whereas md1 and md2 are not, does that have to do with it?
– Tommy
Aug 14 '16 at 12:22
/dev/md0 is an ntfs-3g partition, whereas md1 and md2 are not, does that have to do with it?
– Tommy
Aug 14 '16 at 12:22
Yes, I don't know if ntfs-3g had a UUID you can use this way. If there is a UUID then you'll need to find another way of finding it;
dumpe2fs
only works with ext2/3/4 filesystems.– Stephen Harris
Aug 14 '16 at 12:40
Yes, I don't know if ntfs-3g had a UUID you can use this way. If there is a UUID then you'll need to find another way of finding it;
dumpe2fs
only works with ext2/3/4 filesystems.– Stephen Harris
Aug 14 '16 at 12:40
add a comment |
Thank you, Stephen Harris !! You just saved me some headaches
New contributor
Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review
– RalfFriedl
5 hours ago
add a comment |
Thank you, Stephen Harris !! You just saved me some headaches
New contributor
Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review
– RalfFriedl
5 hours ago
add a comment |
Thank you, Stephen Harris !! You just saved me some headaches
New contributor
Thank you, Stephen Harris !! You just saved me some headaches
New contributor
New contributor
answered 6 hours ago
Velichko TaleffVelichko Taleff
1
1
New contributor
New contributor
Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review
– RalfFriedl
5 hours ago
add a comment |
Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review
– RalfFriedl
5 hours ago
Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review
– RalfFriedl
5 hours ago
Please don't add "thank you" as an answer. Once you have sufficient reputation, you will be able to vote up questions and answers that you found helpful. - From Review
– RalfFriedl
5 hours ago
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f303286%2fmdadm-automount-only-works-with-dev-not-uuid%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown