how to mount filesystem on to an existing (non-empty) directory?
How can I mount a new fs (fuse) on to an existing directory where my application is writing?
Details on the issue:
I have /var mounted as ext4. My application writes the data to /var/lib directory (/var/lib is NOT mounted). How may I do this without restarting my application?
On trying to create a mount for /var/lib, I see following message. I am worried about losing existing data in /var/lib to continue with option "nonempty".
"
starting fuse filesystem fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
"
Thanks,
Dinesh
mount
add a comment |
How can I mount a new fs (fuse) on to an existing directory where my application is writing?
Details on the issue:
I have /var mounted as ext4. My application writes the data to /var/lib directory (/var/lib is NOT mounted). How may I do this without restarting my application?
On trying to create a mount for /var/lib, I see following message. I am worried about losing existing data in /var/lib to continue with option "nonempty".
"
starting fuse filesystem fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
"
Thanks,
Dinesh
mount
add a comment |
How can I mount a new fs (fuse) on to an existing directory where my application is writing?
Details on the issue:
I have /var mounted as ext4. My application writes the data to /var/lib directory (/var/lib is NOT mounted). How may I do this without restarting my application?
On trying to create a mount for /var/lib, I see following message. I am worried about losing existing data in /var/lib to continue with option "nonempty".
"
starting fuse filesystem fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
"
Thanks,
Dinesh
mount
How can I mount a new fs (fuse) on to an existing directory where my application is writing?
Details on the issue:
I have /var mounted as ext4. My application writes the data to /var/lib directory (/var/lib is NOT mounted). How may I do this without restarting my application?
On trying to create a mount for /var/lib, I see following message. I am worried about losing existing data in /var/lib to continue with option "nonempty".
"
starting fuse filesystem fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
"
Thanks,
Dinesh
mount
mount
asked Jan 4 at 11:40
DineshDinesh
103
103
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
As message states you need to pass nonempty
mount option:
sudo mount.fuse /dev/device /var/lib/your_folder -o nonempty
See man mount.fuse
for details:
nonempty
Allows mounts over a non-empty file or directory. By default these mounts are
rejected to prevent accidental covering up of data, which could for example prevent
automatic backup.
Note: you should not mount directly to /var/lib
as it is used by many applications.
Thanks for the information. Is this possible to achieve the said/mentioned issue using bind mount option? My intention is to test Disk Latency using Charybdefs by skylla. Charybdefs is a fuse based implementation, where the mount will be created onto which the disk latency to be injected / validated. Since my application writes most of its data onto /car/lib, I wanted to mount Charybdefs onto to /var/lib so that, each write operation on to /var/lib will be impacted. Please let me know if there is a way to achieve mount /var/lib without app restart.
– Dinesh
Jan 4 at 15:54
How about run your application in a chroot, or rewrite it so it doesn't write to /var/lib (why would you do that?).
– pbhj
Jan 4 at 16:36
add a comment |
You can mount as described in other answer, but the data in the directory you mount on (/var/lib/) will not be available until you unmoumt again. This means that other programs using /var/lib/ might fail.
AND, depending on how your application handles the files it write to, it might not work at all. If the program opens the file at start, do multiple writes, and then closes the file just before it terminates, you might have a stale filehandle and writes fails. If on the other hand, the program do open - write - close, each time it writes the file, it might work.
add a comment |
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%2f1106891%2fhow-to-mount-filesystem-on-to-an-existing-non-empty-directory%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
As message states you need to pass nonempty
mount option:
sudo mount.fuse /dev/device /var/lib/your_folder -o nonempty
See man mount.fuse
for details:
nonempty
Allows mounts over a non-empty file or directory. By default these mounts are
rejected to prevent accidental covering up of data, which could for example prevent
automatic backup.
Note: you should not mount directly to /var/lib
as it is used by many applications.
Thanks for the information. Is this possible to achieve the said/mentioned issue using bind mount option? My intention is to test Disk Latency using Charybdefs by skylla. Charybdefs is a fuse based implementation, where the mount will be created onto which the disk latency to be injected / validated. Since my application writes most of its data onto /car/lib, I wanted to mount Charybdefs onto to /var/lib so that, each write operation on to /var/lib will be impacted. Please let me know if there is a way to achieve mount /var/lib without app restart.
– Dinesh
Jan 4 at 15:54
How about run your application in a chroot, or rewrite it so it doesn't write to /var/lib (why would you do that?).
– pbhj
Jan 4 at 16:36
add a comment |
As message states you need to pass nonempty
mount option:
sudo mount.fuse /dev/device /var/lib/your_folder -o nonempty
See man mount.fuse
for details:
nonempty
Allows mounts over a non-empty file or directory. By default these mounts are
rejected to prevent accidental covering up of data, which could for example prevent
automatic backup.
Note: you should not mount directly to /var/lib
as it is used by many applications.
Thanks for the information. Is this possible to achieve the said/mentioned issue using bind mount option? My intention is to test Disk Latency using Charybdefs by skylla. Charybdefs is a fuse based implementation, where the mount will be created onto which the disk latency to be injected / validated. Since my application writes most of its data onto /car/lib, I wanted to mount Charybdefs onto to /var/lib so that, each write operation on to /var/lib will be impacted. Please let me know if there is a way to achieve mount /var/lib without app restart.
– Dinesh
Jan 4 at 15:54
How about run your application in a chroot, or rewrite it so it doesn't write to /var/lib (why would you do that?).
– pbhj
Jan 4 at 16:36
add a comment |
As message states you need to pass nonempty
mount option:
sudo mount.fuse /dev/device /var/lib/your_folder -o nonempty
See man mount.fuse
for details:
nonempty
Allows mounts over a non-empty file or directory. By default these mounts are
rejected to prevent accidental covering up of data, which could for example prevent
automatic backup.
Note: you should not mount directly to /var/lib
as it is used by many applications.
As message states you need to pass nonempty
mount option:
sudo mount.fuse /dev/device /var/lib/your_folder -o nonempty
See man mount.fuse
for details:
nonempty
Allows mounts over a non-empty file or directory. By default these mounts are
rejected to prevent accidental covering up of data, which could for example prevent
automatic backup.
Note: you should not mount directly to /var/lib
as it is used by many applications.
edited Jan 4 at 16:23
answered Jan 4 at 11:56
N0rbertN0rbert
21.9k547102
21.9k547102
Thanks for the information. Is this possible to achieve the said/mentioned issue using bind mount option? My intention is to test Disk Latency using Charybdefs by skylla. Charybdefs is a fuse based implementation, where the mount will be created onto which the disk latency to be injected / validated. Since my application writes most of its data onto /car/lib, I wanted to mount Charybdefs onto to /var/lib so that, each write operation on to /var/lib will be impacted. Please let me know if there is a way to achieve mount /var/lib without app restart.
– Dinesh
Jan 4 at 15:54
How about run your application in a chroot, or rewrite it so it doesn't write to /var/lib (why would you do that?).
– pbhj
Jan 4 at 16:36
add a comment |
Thanks for the information. Is this possible to achieve the said/mentioned issue using bind mount option? My intention is to test Disk Latency using Charybdefs by skylla. Charybdefs is a fuse based implementation, where the mount will be created onto which the disk latency to be injected / validated. Since my application writes most of its data onto /car/lib, I wanted to mount Charybdefs onto to /var/lib so that, each write operation on to /var/lib will be impacted. Please let me know if there is a way to achieve mount /var/lib without app restart.
– Dinesh
Jan 4 at 15:54
How about run your application in a chroot, or rewrite it so it doesn't write to /var/lib (why would you do that?).
– pbhj
Jan 4 at 16:36
Thanks for the information. Is this possible to achieve the said/mentioned issue using bind mount option? My intention is to test Disk Latency using Charybdefs by skylla. Charybdefs is a fuse based implementation, where the mount will be created onto which the disk latency to be injected / validated. Since my application writes most of its data onto /car/lib, I wanted to mount Charybdefs onto to /var/lib so that, each write operation on to /var/lib will be impacted. Please let me know if there is a way to achieve mount /var/lib without app restart.
– Dinesh
Jan 4 at 15:54
Thanks for the information. Is this possible to achieve the said/mentioned issue using bind mount option? My intention is to test Disk Latency using Charybdefs by skylla. Charybdefs is a fuse based implementation, where the mount will be created onto which the disk latency to be injected / validated. Since my application writes most of its data onto /car/lib, I wanted to mount Charybdefs onto to /var/lib so that, each write operation on to /var/lib will be impacted. Please let me know if there is a way to achieve mount /var/lib without app restart.
– Dinesh
Jan 4 at 15:54
How about run your application in a chroot, or rewrite it so it doesn't write to /var/lib (why would you do that?).
– pbhj
Jan 4 at 16:36
How about run your application in a chroot, or rewrite it so it doesn't write to /var/lib (why would you do that?).
– pbhj
Jan 4 at 16:36
add a comment |
You can mount as described in other answer, but the data in the directory you mount on (/var/lib/) will not be available until you unmoumt again. This means that other programs using /var/lib/ might fail.
AND, depending on how your application handles the files it write to, it might not work at all. If the program opens the file at start, do multiple writes, and then closes the file just before it terminates, you might have a stale filehandle and writes fails. If on the other hand, the program do open - write - close, each time it writes the file, it might work.
add a comment |
You can mount as described in other answer, but the data in the directory you mount on (/var/lib/) will not be available until you unmoumt again. This means that other programs using /var/lib/ might fail.
AND, depending on how your application handles the files it write to, it might not work at all. If the program opens the file at start, do multiple writes, and then closes the file just before it terminates, you might have a stale filehandle and writes fails. If on the other hand, the program do open - write - close, each time it writes the file, it might work.
add a comment |
You can mount as described in other answer, but the data in the directory you mount on (/var/lib/) will not be available until you unmoumt again. This means that other programs using /var/lib/ might fail.
AND, depending on how your application handles the files it write to, it might not work at all. If the program opens the file at start, do multiple writes, and then closes the file just before it terminates, you might have a stale filehandle and writes fails. If on the other hand, the program do open - write - close, each time it writes the file, it might work.
You can mount as described in other answer, but the data in the directory you mount on (/var/lib/) will not be available until you unmoumt again. This means that other programs using /var/lib/ might fail.
AND, depending on how your application handles the files it write to, it might not work at all. If the program opens the file at start, do multiple writes, and then closes the file just before it terminates, you might have a stale filehandle and writes fails. If on the other hand, the program do open - write - close, each time it writes the file, it might work.
edited Jan 4 at 22:27
answered Jan 4 at 12:17
Soren ASoren A
3,3221924
3,3221924
add a comment |
add a comment |
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%2f1106891%2fhow-to-mount-filesystem-on-to-an-existing-non-empty-directory%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