Closed superiums closed 1 year ago
You should probably post your /etc/crypttab
and clarify what you mean by "mount point i usually use /dev/shm/xxx
". None of your physical disks or LVM devices should be in /dev/shm
.
You should probably post your
/etc/crypttab
and clarify what you mean by "mount point i usually use/dev/shm/xxx
". None of your physical disks or LVM devices should be in/dev/shm
.
i mean i usually do like this:
sudo mount /dev/mapper/vg-lv3 /dev/shm/lv3
sorry for my unclear description.
my lv was not listed in /etc/crypttab
Why are you mounting things under /dev/shm
? That's ill advised.
Why are you mounting things under
/dev/shm
? That's ill advised.
aha, got it ! this is the reason which caused the issue. i've tried to mount lv to /media/xxx, and it never loose now.
i mount it to /dev/shm/xxx for temp use, usuallay i use /dev/shm as temp directory. before use void linux, in arch, there's no problem in this way. but seems in voidLinux it works in different way from other os .
i'm now interesting with why mount to /dev/shm/xxx will cause data loose.
Do you have elogind
installed and enabled?
In general, you should never mount thing inside /dev/shm
is used by the shared-memory interface and not intended for direct use by users./dev
.
Edit: turns out /dev/shm
is just a tmpfs mount and is intended for users to store things guaranteed not to be on disk (this seems like a poorly developed concept, because you shouldn't expect any particular storage behavior based solely on where you save and read files), but that has no bearing on the recommendation against mounting things under /dev/
Do you have
elogind
installed and enabled?
yes , elogind was installed, and started. but the service was not enabled. maybe started by greetd.
~
/dev/shm
is used by the shared-memory interface and not intended for direct use by users.~ In general, you should never mount thing inside/dev
.Edit: turns out
/dev/shm
is just a tmpfs mount and is intended for users to store things guaranteed not to be on disk (this seems like a poorly developed concept, because you shouldn't expect any particular storage behavior based solely on where you save and read files), but that has no bearing on the recommendation against mounting things under/dev/
thank you very much!
/dev/shm
is for SHared Memory IPC, it will be cleaned up up on logging out. https://github.com/systemd/systemd/issues/2039
/dev/shm
is for SHared Memory IPC, it will be cleaned up up on logging out. systemd/systemd#2039
yeh, files in it will be cleaned. but mount device to it , data is not saved in it. in arch and ubuntu , no data will loose if do the same thing.
maybe the mount options differs from each other.
Noone care if it's a normal directory or mount-point:
Re: arch and Ubuntu, I don't know your configuration, I can't comment.
i have two ext4 logical volum, one normal, one with luks crypt. one day i found all data on luks lost. but the lv can be mounted normally, and fsck found no err. i reformated it with luksFormat and mkfs.ex4. then tried seral times to write, and found:
sync
command, everything lost after reboot most time, only once the folder was kept.all these situation happens in both luks lv and normal lv.
additional
versions