Creating Persistant Symbolic Link -Linux
Could somebody assist me in creating a persistent symlink for the block devices, using udev ?
I have a cloud server, where a block device (/dev/xvdb1 with filesystem ext3) is attached .
I want to create a persistent symlink (/dev/test_link) which should always target to (/dev/xvdb1) using udev rules.
OS -> 16.04 ubuntu
Regards,
symlink udev devices block-device
|
show 2 more comments
Could somebody assist me in creating a persistent symlink for the block devices, using udev ?
I have a cloud server, where a block device (/dev/xvdb1 with filesystem ext3) is attached .
I want to create a persistent symlink (/dev/test_link) which should always target to (/dev/xvdb1) using udev rules.
OS -> 16.04 ubuntu
Regards,
symlink udev devices block-device
1
Welcome to Unix & Linux. ;-) What are you trying to accomplish here? Do you want to auto-mount the device to/dev/test_link
because the description of what you're trying to accomplish looks like an XY problem
– Fabby
Dec 16 at 11:10
Actually, I want to create a symlink under /dev using udev, persistently. the persistant symlink (/dev/test_link) should target the block device (/dev/xvdb1) which is on my LinuxAcademy cloud server which has ext3 filesystem.
– Imrank
Dec 16 at 12:23
That's a repeat of your request. The question is: What are you trying to accomplish here: Learn aboutudev
or trying to accomplish a task?
– Fabby
Dec 16 at 13:31
im trying to accomplish a task.
– Imrank
Dec 16 at 13:37
Please help us help you: edit your question and provide more details as it's hard to guess which task you're trying to accomplish. For now, your question is unclear what you're trying to accomplish. ;-)
– Fabby
Dec 16 at 14:27
|
show 2 more comments
Could somebody assist me in creating a persistent symlink for the block devices, using udev ?
I have a cloud server, where a block device (/dev/xvdb1 with filesystem ext3) is attached .
I want to create a persistent symlink (/dev/test_link) which should always target to (/dev/xvdb1) using udev rules.
OS -> 16.04 ubuntu
Regards,
symlink udev devices block-device
Could somebody assist me in creating a persistent symlink for the block devices, using udev ?
I have a cloud server, where a block device (/dev/xvdb1 with filesystem ext3) is attached .
I want to create a persistent symlink (/dev/test_link) which should always target to (/dev/xvdb1) using udev rules.
OS -> 16.04 ubuntu
Regards,
symlink udev devices block-device
symlink udev devices block-device
edited Dec 16 at 14:49
asked Dec 16 at 8:41
Imrank
53
53
1
Welcome to Unix & Linux. ;-) What are you trying to accomplish here? Do you want to auto-mount the device to/dev/test_link
because the description of what you're trying to accomplish looks like an XY problem
– Fabby
Dec 16 at 11:10
Actually, I want to create a symlink under /dev using udev, persistently. the persistant symlink (/dev/test_link) should target the block device (/dev/xvdb1) which is on my LinuxAcademy cloud server which has ext3 filesystem.
– Imrank
Dec 16 at 12:23
That's a repeat of your request. The question is: What are you trying to accomplish here: Learn aboutudev
or trying to accomplish a task?
– Fabby
Dec 16 at 13:31
im trying to accomplish a task.
– Imrank
Dec 16 at 13:37
Please help us help you: edit your question and provide more details as it's hard to guess which task you're trying to accomplish. For now, your question is unclear what you're trying to accomplish. ;-)
– Fabby
Dec 16 at 14:27
|
show 2 more comments
1
Welcome to Unix & Linux. ;-) What are you trying to accomplish here? Do you want to auto-mount the device to/dev/test_link
because the description of what you're trying to accomplish looks like an XY problem
– Fabby
Dec 16 at 11:10
Actually, I want to create a symlink under /dev using udev, persistently. the persistant symlink (/dev/test_link) should target the block device (/dev/xvdb1) which is on my LinuxAcademy cloud server which has ext3 filesystem.
– Imrank
Dec 16 at 12:23
That's a repeat of your request. The question is: What are you trying to accomplish here: Learn aboutudev
or trying to accomplish a task?
– Fabby
Dec 16 at 13:31
im trying to accomplish a task.
– Imrank
Dec 16 at 13:37
Please help us help you: edit your question and provide more details as it's hard to guess which task you're trying to accomplish. For now, your question is unclear what you're trying to accomplish. ;-)
– Fabby
Dec 16 at 14:27
1
1
Welcome to Unix & Linux. ;-) What are you trying to accomplish here? Do you want to auto-mount the device to
/dev/test_link
because the description of what you're trying to accomplish looks like an XY problem– Fabby
Dec 16 at 11:10
Welcome to Unix & Linux. ;-) What are you trying to accomplish here? Do you want to auto-mount the device to
/dev/test_link
because the description of what you're trying to accomplish looks like an XY problem– Fabby
Dec 16 at 11:10
Actually, I want to create a symlink under /dev using udev, persistently. the persistant symlink (/dev/test_link) should target the block device (/dev/xvdb1) which is on my LinuxAcademy cloud server which has ext3 filesystem.
– Imrank
Dec 16 at 12:23
Actually, I want to create a symlink under /dev using udev, persistently. the persistant symlink (/dev/test_link) should target the block device (/dev/xvdb1) which is on my LinuxAcademy cloud server which has ext3 filesystem.
– Imrank
Dec 16 at 12:23
That's a repeat of your request. The question is: What are you trying to accomplish here: Learn about
udev
or trying to accomplish a task?– Fabby
Dec 16 at 13:31
That's a repeat of your request. The question is: What are you trying to accomplish here: Learn about
udev
or trying to accomplish a task?– Fabby
Dec 16 at 13:31
im trying to accomplish a task.
– Imrank
Dec 16 at 13:37
im trying to accomplish a task.
– Imrank
Dec 16 at 13:37
Please help us help you: edit your question and provide more details as it's hard to guess which task you're trying to accomplish. For now, your question is unclear what you're trying to accomplish. ;-)
– Fabby
Dec 16 at 14:27
Please help us help you: edit your question and provide more details as it's hard to guess which task you're trying to accomplish. For now, your question is unclear what you're trying to accomplish. ;-)
– Fabby
Dec 16 at 14:27
|
show 2 more comments
1 Answer
1
active
oldest
votes
You should start with using udevadm monitor
when attaching your target device, or udevadm info --name=/dev/xvdb1 --attribute-walk
, when already attached, to have a look at how udev sees your device. Than you can create udev rules which match only the special device.
Also blkid
would be a good starter, where you can see the ID of your device, for which you can than create udev rules.
(Examples for rules can e.g. be found at https://wiki.debian.org/udev )
Hello, thanks for your response. I have created the symlink and I think its kinda work, could you please check my work? link: pastebin.com/JLL57dZx
– Imrank
Dec 16 at 18:18
I will not go through it completely, but one hint: the kernel may not always recognize the device asxvdb1
. Depending on your attached devices it may e.g. be something likexvda1
orxvdc1
on another day of rebooting. Maybeudevadm info dev/xvdb1
orudevadm info dev/xvdb
will get you more/better possibilities to always pinpoint the correct device. There are many udev examples and beginner's guides out there to help you further :-)
– Jaleks
Dec 17 at 13:23
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%2f489272%2fcreating-persistant-symbolic-link-linux%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You should start with using udevadm monitor
when attaching your target device, or udevadm info --name=/dev/xvdb1 --attribute-walk
, when already attached, to have a look at how udev sees your device. Than you can create udev rules which match only the special device.
Also blkid
would be a good starter, where you can see the ID of your device, for which you can than create udev rules.
(Examples for rules can e.g. be found at https://wiki.debian.org/udev )
Hello, thanks for your response. I have created the symlink and I think its kinda work, could you please check my work? link: pastebin.com/JLL57dZx
– Imrank
Dec 16 at 18:18
I will not go through it completely, but one hint: the kernel may not always recognize the device asxvdb1
. Depending on your attached devices it may e.g. be something likexvda1
orxvdc1
on another day of rebooting. Maybeudevadm info dev/xvdb1
orudevadm info dev/xvdb
will get you more/better possibilities to always pinpoint the correct device. There are many udev examples and beginner's guides out there to help you further :-)
– Jaleks
Dec 17 at 13:23
add a comment |
You should start with using udevadm monitor
when attaching your target device, or udevadm info --name=/dev/xvdb1 --attribute-walk
, when already attached, to have a look at how udev sees your device. Than you can create udev rules which match only the special device.
Also blkid
would be a good starter, where you can see the ID of your device, for which you can than create udev rules.
(Examples for rules can e.g. be found at https://wiki.debian.org/udev )
Hello, thanks for your response. I have created the symlink and I think its kinda work, could you please check my work? link: pastebin.com/JLL57dZx
– Imrank
Dec 16 at 18:18
I will not go through it completely, but one hint: the kernel may not always recognize the device asxvdb1
. Depending on your attached devices it may e.g. be something likexvda1
orxvdc1
on another day of rebooting. Maybeudevadm info dev/xvdb1
orudevadm info dev/xvdb
will get you more/better possibilities to always pinpoint the correct device. There are many udev examples and beginner's guides out there to help you further :-)
– Jaleks
Dec 17 at 13:23
add a comment |
You should start with using udevadm monitor
when attaching your target device, or udevadm info --name=/dev/xvdb1 --attribute-walk
, when already attached, to have a look at how udev sees your device. Than you can create udev rules which match only the special device.
Also blkid
would be a good starter, where you can see the ID of your device, for which you can than create udev rules.
(Examples for rules can e.g. be found at https://wiki.debian.org/udev )
You should start with using udevadm monitor
when attaching your target device, or udevadm info --name=/dev/xvdb1 --attribute-walk
, when already attached, to have a look at how udev sees your device. Than you can create udev rules which match only the special device.
Also blkid
would be a good starter, where you can see the ID of your device, for which you can than create udev rules.
(Examples for rules can e.g. be found at https://wiki.debian.org/udev )
answered Dec 16 at 15:06
Jaleks
1,348422
1,348422
Hello, thanks for your response. I have created the symlink and I think its kinda work, could you please check my work? link: pastebin.com/JLL57dZx
– Imrank
Dec 16 at 18:18
I will not go through it completely, but one hint: the kernel may not always recognize the device asxvdb1
. Depending on your attached devices it may e.g. be something likexvda1
orxvdc1
on another day of rebooting. Maybeudevadm info dev/xvdb1
orudevadm info dev/xvdb
will get you more/better possibilities to always pinpoint the correct device. There are many udev examples and beginner's guides out there to help you further :-)
– Jaleks
Dec 17 at 13:23
add a comment |
Hello, thanks for your response. I have created the symlink and I think its kinda work, could you please check my work? link: pastebin.com/JLL57dZx
– Imrank
Dec 16 at 18:18
I will not go through it completely, but one hint: the kernel may not always recognize the device asxvdb1
. Depending on your attached devices it may e.g. be something likexvda1
orxvdc1
on another day of rebooting. Maybeudevadm info dev/xvdb1
orudevadm info dev/xvdb
will get you more/better possibilities to always pinpoint the correct device. There are many udev examples and beginner's guides out there to help you further :-)
– Jaleks
Dec 17 at 13:23
Hello, thanks for your response. I have created the symlink and I think its kinda work, could you please check my work? link: pastebin.com/JLL57dZx
– Imrank
Dec 16 at 18:18
Hello, thanks for your response. I have created the symlink and I think its kinda work, could you please check my work? link: pastebin.com/JLL57dZx
– Imrank
Dec 16 at 18:18
I will not go through it completely, but one hint: the kernel may not always recognize the device as
xvdb1
. Depending on your attached devices it may e.g. be something like xvda1
or xvdc1
on another day of rebooting. Maybe udevadm info dev/xvdb1
or udevadm info dev/xvdb
will get you more/better possibilities to always pinpoint the correct device. There are many udev examples and beginner's guides out there to help you further :-)– Jaleks
Dec 17 at 13:23
I will not go through it completely, but one hint: the kernel may not always recognize the device as
xvdb1
. Depending on your attached devices it may e.g. be something like xvda1
or xvdc1
on another day of rebooting. Maybe udevadm info dev/xvdb1
or udevadm info dev/xvdb
will get you more/better possibilities to always pinpoint the correct device. There are many udev examples and beginner's guides out there to help you further :-)– Jaleks
Dec 17 at 13:23
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f489272%2fcreating-persistant-symbolic-link-linux%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
1
Welcome to Unix & Linux. ;-) What are you trying to accomplish here? Do you want to auto-mount the device to
/dev/test_link
because the description of what you're trying to accomplish looks like an XY problem– Fabby
Dec 16 at 11:10
Actually, I want to create a symlink under /dev using udev, persistently. the persistant symlink (/dev/test_link) should target the block device (/dev/xvdb1) which is on my LinuxAcademy cloud server which has ext3 filesystem.
– Imrank
Dec 16 at 12:23
That's a repeat of your request. The question is: What are you trying to accomplish here: Learn about
udev
or trying to accomplish a task?– Fabby
Dec 16 at 13:31
im trying to accomplish a task.
– Imrank
Dec 16 at 13:37
Please help us help you: edit your question and provide more details as it's hard to guess which task you're trying to accomplish. For now, your question is unclear what you're trying to accomplish. ;-)
– Fabby
Dec 16 at 14:27