Persistant Symbolic Link -Ubuntu 16.04
Could somebody assist me in creating a persistent symlink for the block devices, using udev ?
I have a cloud server, where I can attach a separate device (/dev/xvdb) as a storage.
I want to create a persistent symlink (/dev/test_link) which should always target to /dev/xvdb storage.
Regards,
16.04 udev symbolic-link
|
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 I can attach a separate device (/dev/xvdb) as a storage.
I want to create a persistent symlink (/dev/test_link) which should always target to /dev/xvdb storage.
Regards,
16.04 udev symbolic-link
Are you just looking to have the device mounted in the same place every time you connect it to your system? Maybe try giving the USB device a permanent mount point on the system. USB Drives can change their designation between reboots on the system. See askubuntu.com/a/940060/231142
– Terrance
Dec 14 '18 at 19:36
yes, but I would like to achieve it using udev and its just for a one-time testing so that I can understand how symlink works persistently using udev rules.
– Imrank
Dec 14 '18 at 20:38
Ah, OK. This might help: askubuntu.com/questions/783357/…
– Terrance
Dec 14 '18 at 20:46
nope, it didn't help. I used the given post: askubuntu.com/questions/783357/… and hackaday.com/2009/09/18/how-to-write-udev-rules/#comments created a rule file with the below settings and still unable to find that symlink created. file: /etc/udev/rules.d/81-drive.rules which has below attributes KERNEL=="xvdb1", SUBSYSTEM=="block", ATTR{size}=="4192256", SYMLINK+="/dev/prod_data"
– Imrank
Dec 14 '18 at 22:30
The examples in the posts are of the usb devices, however I am using a virtual block device which is /dev/xvdb1.. would this change something?
– Imrank
Dec 14 '18 at 22:33
|
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 I can attach a separate device (/dev/xvdb) as a storage.
I want to create a persistent symlink (/dev/test_link) which should always target to /dev/xvdb storage.
Regards,
16.04 udev symbolic-link
Could somebody assist me in creating a persistent symlink for the block devices, using udev ?
I have a cloud server, where I can attach a separate device (/dev/xvdb) as a storage.
I want to create a persistent symlink (/dev/test_link) which should always target to /dev/xvdb storage.
Regards,
16.04 udev symbolic-link
16.04 udev symbolic-link
edited Dec 14 '18 at 14:58
Imrank
asked Dec 12 '18 at 19:14
ImrankImrank
268
268
Are you just looking to have the device mounted in the same place every time you connect it to your system? Maybe try giving the USB device a permanent mount point on the system. USB Drives can change their designation between reboots on the system. See askubuntu.com/a/940060/231142
– Terrance
Dec 14 '18 at 19:36
yes, but I would like to achieve it using udev and its just for a one-time testing so that I can understand how symlink works persistently using udev rules.
– Imrank
Dec 14 '18 at 20:38
Ah, OK. This might help: askubuntu.com/questions/783357/…
– Terrance
Dec 14 '18 at 20:46
nope, it didn't help. I used the given post: askubuntu.com/questions/783357/… and hackaday.com/2009/09/18/how-to-write-udev-rules/#comments created a rule file with the below settings and still unable to find that symlink created. file: /etc/udev/rules.d/81-drive.rules which has below attributes KERNEL=="xvdb1", SUBSYSTEM=="block", ATTR{size}=="4192256", SYMLINK+="/dev/prod_data"
– Imrank
Dec 14 '18 at 22:30
The examples in the posts are of the usb devices, however I am using a virtual block device which is /dev/xvdb1.. would this change something?
– Imrank
Dec 14 '18 at 22:33
|
show 2 more comments
Are you just looking to have the device mounted in the same place every time you connect it to your system? Maybe try giving the USB device a permanent mount point on the system. USB Drives can change their designation between reboots on the system. See askubuntu.com/a/940060/231142
– Terrance
Dec 14 '18 at 19:36
yes, but I would like to achieve it using udev and its just for a one-time testing so that I can understand how symlink works persistently using udev rules.
– Imrank
Dec 14 '18 at 20:38
Ah, OK. This might help: askubuntu.com/questions/783357/…
– Terrance
Dec 14 '18 at 20:46
nope, it didn't help. I used the given post: askubuntu.com/questions/783357/… and hackaday.com/2009/09/18/how-to-write-udev-rules/#comments created a rule file with the below settings and still unable to find that symlink created. file: /etc/udev/rules.d/81-drive.rules which has below attributes KERNEL=="xvdb1", SUBSYSTEM=="block", ATTR{size}=="4192256", SYMLINK+="/dev/prod_data"
– Imrank
Dec 14 '18 at 22:30
The examples in the posts are of the usb devices, however I am using a virtual block device which is /dev/xvdb1.. would this change something?
– Imrank
Dec 14 '18 at 22:33
Are you just looking to have the device mounted in the same place every time you connect it to your system? Maybe try giving the USB device a permanent mount point on the system. USB Drives can change their designation between reboots on the system. See askubuntu.com/a/940060/231142
– Terrance
Dec 14 '18 at 19:36
Are you just looking to have the device mounted in the same place every time you connect it to your system? Maybe try giving the USB device a permanent mount point on the system. USB Drives can change their designation between reboots on the system. See askubuntu.com/a/940060/231142
– Terrance
Dec 14 '18 at 19:36
yes, but I would like to achieve it using udev and its just for a one-time testing so that I can understand how symlink works persistently using udev rules.
– Imrank
Dec 14 '18 at 20:38
yes, but I would like to achieve it using udev and its just for a one-time testing so that I can understand how symlink works persistently using udev rules.
– Imrank
Dec 14 '18 at 20:38
Ah, OK. This might help: askubuntu.com/questions/783357/…
– Terrance
Dec 14 '18 at 20:46
Ah, OK. This might help: askubuntu.com/questions/783357/…
– Terrance
Dec 14 '18 at 20:46
nope, it didn't help. I used the given post: askubuntu.com/questions/783357/… and hackaday.com/2009/09/18/how-to-write-udev-rules/#comments created a rule file with the below settings and still unable to find that symlink created. file: /etc/udev/rules.d/81-drive.rules which has below attributes KERNEL=="xvdb1", SUBSYSTEM=="block", ATTR{size}=="4192256", SYMLINK+="/dev/prod_data"
– Imrank
Dec 14 '18 at 22:30
nope, it didn't help. I used the given post: askubuntu.com/questions/783357/… and hackaday.com/2009/09/18/how-to-write-udev-rules/#comments created a rule file with the below settings and still unable to find that symlink created. file: /etc/udev/rules.d/81-drive.rules which has below attributes KERNEL=="xvdb1", SUBSYSTEM=="block", ATTR{size}=="4192256", SYMLINK+="/dev/prod_data"
– Imrank
Dec 14 '18 at 22:30
The examples in the posts are of the usb devices, however I am using a virtual block device which is /dev/xvdb1.. would this change something?
– Imrank
Dec 14 '18 at 22:33
The examples in the posts are of the usb devices, however I am using a virtual block device which is /dev/xvdb1.. would this change something?
– Imrank
Dec 14 '18 at 22:33
|
show 2 more comments
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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%2faskubuntu.com%2fquestions%2f1100426%2fpersistant-symbolic-link-ubuntu-16-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f1100426%2fpersistant-symbolic-link-ubuntu-16-04%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
Are you just looking to have the device mounted in the same place every time you connect it to your system? Maybe try giving the USB device a permanent mount point on the system. USB Drives can change their designation between reboots on the system. See askubuntu.com/a/940060/231142
– Terrance
Dec 14 '18 at 19:36
yes, but I would like to achieve it using udev and its just for a one-time testing so that I can understand how symlink works persistently using udev rules.
– Imrank
Dec 14 '18 at 20:38
Ah, OK. This might help: askubuntu.com/questions/783357/…
– Terrance
Dec 14 '18 at 20:46
nope, it didn't help. I used the given post: askubuntu.com/questions/783357/… and hackaday.com/2009/09/18/how-to-write-udev-rules/#comments created a rule file with the below settings and still unable to find that symlink created. file: /etc/udev/rules.d/81-drive.rules which has below attributes KERNEL=="xvdb1", SUBSYSTEM=="block", ATTR{size}=="4192256", SYMLINK+="/dev/prod_data"
– Imrank
Dec 14 '18 at 22:30
The examples in the posts are of the usb devices, however I am using a virtual block device which is /dev/xvdb1.. would this change something?
– Imrank
Dec 14 '18 at 22:33