Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #195801 > unrolled thread
| Started by | dep <dep@drippingwithirony.com> |
|---|---|
| First post | 2018-05-16 18:50 +0200 |
| Last post | 2018-05-18 01:40 +0200 |
| Articles | 8 — 5 participants |
Back to article view | Back to linux.debian.user
setting up a drive automount in systemd? dep <dep@drippingwithirony.com> - 2018-05-16 18:50 +0200
Re: setting up a drive automount in systemd? Joe <joe@jretrading.com> - 2018-05-16 21:00 +0200
Re: setting up a drive automount in systemd? dep <dep@drippingwithirony.com> - 2018-05-16 21:10 +0200
Re: setting up a drive automount in systemd? john doe <johndoe65534@mail.com> - 2018-05-16 21:10 +0200
Re: setting up a drive automount in systemd? dep <dep@drippingwithirony.com> - 2018-05-16 21:30 +0200
Re: setting up a drive automount in systemd? john doe <johndoe65534@mail.com> - 2018-05-16 21:50 +0200
Re: setting up a drive automount in systemd? Darac Marjal <mailinglist@darac.org.uk> - 2018-05-17 13:00 +0200
Re: setting up a drive automount in systemd? Mark Fletcher <mark27q1@gmail.com> - 2018-05-18 01:40 +0200
| From | dep <dep@drippingwithirony.com> |
|---|---|
| Date | 2018-05-16 18:50 +0200 |
| Subject | setting up a drive automount in systemd? |
| Message-ID | <vQ7MJ-3wk-3@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
greetings. i've tried my best to search the list archives for the answer to this and have not gotten the search function to deliver . . . anything. here's the issue. i have one of the new "gemini" devices, a psion-like smartphone-pda-computer that runs android and linux. i'm of course running linux. the linux available for it is a derivative of stretch arm64. it uses systemd, my first encounter with that not-universally-loved arrangement. the device has 64gb of onboard storage and a microSD slot, in which i've placed a 128gb microSD card formatted ext4. to reduce write wear on the device's internal memory, it's my hope to put /home or at least /[users] on the microSD card. this of course requires mounting it at boot. i've been much of a week searching and i cannot find any way to configure this to automount in systemd. i do not even know if under systemd it must be mounted to a mountpoint or if it's handled at the /dev level. so what was once a trivial configuration has become a more complicated one, with the possibility of bricking the device -- which i'd just as soon not do. can anyone here either give or point to clear and i hope simple instructions for configuring the card to mount at boot? alternately, is there systemd-friendly disk management software? the disk managers i'm familiar with do not seem to work with systemd. thanks in advance. dep Sent with [ProtonMail](https://protonmail.com/) Secure Email. Because privacy matters.
[toc] | [next] | [standalone]
| From | Joe <joe@jretrading.com> |
|---|---|
| Date | 2018-05-16 21:00 +0200 |
| Message-ID | <vQ9Ox-4Fb-3@gated-at.bofh.it> |
| In reply to | #195801 |
On Wed, 16 May 2018 12:25:22 -0400 dep <dep@drippingwithirony.com> wrote: > greetings. > > i've tried my best to search the list archives for the answer to this > and have not gotten the search function to deliver . . . anything. > > here's the issue. i have one of the new "gemini" devices, a > psion-like smartphone-pda-computer that runs android and linux. i'm > of course running linux. the linux available for it is a derivative > of stretch arm64. it uses systemd, my first encounter with that > not-universally-loved arrangement. > > the device has 64gb of onboard storage and a microSD slot, in which > i've placed a 128gb microSD card formatted ext4. to reduce write wear > on the device's internal memory, it's my hope to put /home or at > least /[users] on the microSD card. this of course requires mounting > it at boot. > > i've been much of a week searching and i cannot find any way to > configure this to automount in systemd. i do not even know if under > systemd it must be mounted to a mountpoint or if it's handled at > the /dev level. so what was once a trivial configuration has become a > more complicated one, with the possibility of bricking the device -- > which i'd just as soon not do. > > can anyone here either give or point to clear and i hope simple > instructions for configuring the card to mount at boot? alternately, > is there systemd-friendly disk management software? the disk managers > i'm familiar with do not seem to work with systemd. > Not what you want, but related, possibly it will help to make sense of other documentation. I have network drives set to automount on first use. Here is a typical /etc/fstab line: //<server>/Media /mnt/<server>/Media cifs noauto,x-systemd.automount,user,guest,noperm,dir_mode=0x777,file_mode=0x777,vers=1.0,rw Note that without the 'noauto' it *will* automount on boot, which is not what you normally want for network or removable drives, given that the boot will hang if the drive is not found. I believe 'nofail' instead would also prevent a boot hang, but I also don't want a dozen possibly delayed mount processes holding up boot, I'm prepared to wait until I need them. Note that most of the parameters are relevant to cifs/samba mounts. With no /etc/fstab entry, a removable drive when plugged in will by default automount on first use. I don't recall that any manual configuration was necessary for that to happen. -- Joe
[toc] | [prev] | [next] | [standalone]
| From | dep <dep@drippingwithirony.com> |
|---|---|
| Date | 2018-05-16 21:10 +0200 |
| Message-ID | <vQ9Ye-4XA-9@gated-at.bofh.it> |
| In reply to | #195808 |
On May 16, 2018 2:35 PM, Joe <joe@jretrading.com> wrote: > Not what you want, but related, possibly it will help to make sense > > of other documentation. I have network drives set to automount on first > > use. Here is a typical /etc/fstab line: > > //<server>/Media /mnt/<server>/Media cifs > > noauto,x-systemd.automount,user,guest,noperm,dir_mode=0x777,file_mode=0x777,vers=1.0,rw > > Note that without the 'noauto' it will automount on boot, which is > > not what you normally want for network or removable drives, given that > > the boot will hang if the drive is not found. I believe 'nofail' > > instead would also prevent a boot hang, but I also don't want a dozen > > possibly delayed mount processes holding up boot, I'm prepared to wait > > until I need them. Note that most of the parameters are relevant to > > cifs/samba mounts. > > With no /etc/fstab entry, a removable drive when plugged in will by > > default automount on first use. I don't recall that any manual > > configuration was necessary for that to happen. That's what initially puzzled me -- there is *no* /etc/fstab file at all, leading me to consider that it's possible that everything has changed. If I were to make an /etc/fstab with just the line I need for the drive, this would work with systemd?
[toc] | [prev] | [next] | [standalone]
| From | john doe <johndoe65534@mail.com> |
|---|---|
| Date | 2018-05-16 21:10 +0200 |
| Message-ID | <vQ9Ye-4XA-11@gated-at.bofh.it> |
| In reply to | #195801 |
On 5/16/2018 6:25 PM, dep wrote: > greetings. > > i've tried my best to search the list archives for the answer to this and have not gotten the search function to deliver . . . anything. > > here's the issue. i have one of the new "gemini" devices, a psion-like smartphone-pda-computer that runs android and linux. i'm of course running linux. the linux available for it is a derivative of stretch arm64. it uses systemd, my first encounter with that not-universally-loved arrangement. > > the device has 64gb of onboard storage and a microSD slot, in which i've placed a 128gb microSD card formatted ext4. to reduce write wear on the device's internal memory, it's my hope to put /home or at least /[users] on the microSD card. this of course requires mounting it at boot. > > i've been much of a week searching and i cannot find any way to configure this to automount in systemd. i do not even know if under systemd it must be mounted to a mountpoint or if it's handled at the /dev level. so what was once a trivial configuration has become a more complicated one, with the possibility of bricking the device -- which i'd just as soon not do. > > can anyone here either give or point to clear and i hope simple instructions for configuring the card to mount at boot? alternately, is there systemd-friendly disk management software? the disk managers i'm familiar with do not seem to work with systemd. > > thanks in advance. > I might be missing something here but why not using the fstab file? -- John Doe
[toc] | [prev] | [next] | [standalone]
| From | dep <dep@drippingwithirony.com> |
|---|---|
| Date | 2018-05-16 21:30 +0200 |
| Message-ID | <vQahA-53T-13@gated-at.bofh.it> |
| In reply to | #195811 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, May 16, 2018 at 2:44 PM, john doe <johndoe65534@mail.com> wrote: > On 5/16/2018 6:25 PM, dep wrote: > greetings. > > i've tried my best to search the list archives for the answer to this and have not gotten the search function to deliver . . . anything. > > here's the issue. i have one of the new "gemini" devices, a psion-like smartphone-pda-computer that runs android and linux. i'm of course running linux. the linux available for it is a derivative of stretch arm64. it uses systemd, my first encounter with that not-universally-loved arrangement. > > the device has 64gb of onboard storage and a microSD slot, in which i've placed a 128gb microSD card formatted ext4. to reduce write wear on the device's internal memory, it's my hope to put /home or at least /[users] on the microSD card. this of course requires mounting it at boot. > > i've been much of a week searching and i cannot find any way to configure this to automount in systemd. i do not even know if under systemd it must be mounted to a mountpoint or if it's handled at the /dev level. so what was once a trivial configuration has become a more complicated one, with the possibility of bricking the device -- which i'd just as soon not do. > > can anyone here either give or point to clear and i hope simple instructions for configuring the card to mount at boot? alternately, is there systemd-friendly disk management software? the disk managers i'm familiar with do not seem to work with systemd. > > thanks in advance. > I might be missing something here but why not using the fstab file? -- John Doe because there is no /etc/fstab. dep Sent with [ProtonMail](https://protonmail.com/) Secure Email. Because privacy matters.
[toc] | [prev] | [next] | [standalone]
| From | john doe <johndoe65534@mail.com> |
|---|---|
| Date | 2018-05-16 21:50 +0200 |
| Message-ID | <vQaAW-5at-11@gated-at.bofh.it> |
| In reply to | #195812 |
On 5/16/2018 9:04 PM, dep wrote: > On Wed, May 16, 2018 at 2:44 PM, john doe <johndoe65534@mail.com> wrote: > >> On 5/16/2018 6:25 PM, dep wrote: > greetings. > > i've tried my best to search the list archives for the answer to this and have not gotten the search function to deliver . . . anything. > > here's the issue. i have one of the new "gemini" devices, a psion-like smartphone-pda-computer that runs android and linux. i'm of course running linux. the linux available for it is a derivative of stretch arm64. it uses systemd, my first encounter with that not-universally-loved arrangement. > > the device has 64gb of onboard storage and a microSD slot, in which i've placed a 128gb microSD card formatted ext4. to reduce write wear on the device's internal memory, it's my hope to put /home or at least /[users] on the microSD card. this of course requires mounting it at boot. > > i've been much of a week searching and i cannot find any way to configure this to automount in systemd. i do not even know if under systemd it must be mounted to a mountpoint or if it's handled at the /dev level. so what was once a trivial configuration has become a more complicated one, with the possibility of bricking the device -- which i'd just as soon not do. > > can anyone here either give or point to clear and i hope simple instructions for configuring the card to mount at boot? alternately, is there systemd-friendly disk management software? the disk managers i'm familiar with do not seem to work with systemd. > > thanks in advance. > I might be missing something here but why not using the fstab file? -- John Doe > > because there is no /etc/fstab. > 1) Fstab could be located somewhere else (find / -iname fstab -type f) 2) What happens if you try to use /etc/fstab file? 3) Anything in the log for a missing fstab file? 4) Use a systemd service file to mount it at boot (Automatic mounting of additional volumes). I'm on Stretch with systemd and a fstab file. -- John Doe
[toc] | [prev] | [next] | [standalone]
| From | Darac Marjal <mailinglist@darac.org.uk> |
|---|---|
| Date | 2018-05-17 13:00 +0200 |
| Message-ID | <vQoNB-51H-11@gated-at.bofh.it> |
| In reply to | #195813 |
[Multipart message — attachments visible in raw view] — view raw
On Wed, May 16, 2018 at 09:24:27PM +0200, john doe wrote: >On 5/16/2018 9:04 PM, dep wrote: >>On Wed, May 16, 2018 at 2:44 PM, john doe <johndoe65534@mail.com> wrote: >> >>>On 5/16/2018 6:25 PM, dep wrote: > greetings. > > i've tried my best to search the list archives for the answer to this and have not gotten the search function to deliver . . . anything. > > here's the issue. i have one of the new "gemini" devices, a psion-like smartphone-pda-computer that runs android and linux. i'm of course running linux. the linux available for it is a derivative of stretch arm64. it uses systemd, my first encounter with that not-universally-loved arrangement. > > the device has 64gb of onboard storage and a microSD slot, in which i've placed a 128gb microSD card formatted ext4. to reduce write wear on the device's internal memory, it's my hope to put /home or at least /[users] on the microSD card. this of course requires mounting it at boot. > > i've been much of a week searching and i cannot find any way to configure this to automount in systemd. i do not even know if under systemd it must be mounted to a mountpoint or if it's handled at the /dev level. so what was once a trivial configuration has become a more complicated one, with the possibility of bricking the device -- which i'd just as soon not do. > > can anyone here either give or point to clear and i hope simple instructions for configuring the card to mount at boot? alternately, is there systemd-friendly disk management software? the disk managers i'm familiar with do not seem to work with systemd. > > thanks in advance. > I might be missing something here but why not using the fstab file? -- John Doe >> >>because there is no /etc/fstab. >> > >1) Fstab could be located somewhere else (find / -iname fstab -type f) >2) What happens if you try to use /etc/fstab file? >3) Anything in the log for a missing fstab file? >4) Use a systemd service file to mount it at boot (Automatic mounting >of additional volumes). > >I'm on Stretch with systemd and a fstab file. systemd doesn't actually use /etc/fstab for mounting drives. Instead, as with everything, it uses a unit file, specifically a *.mount file. "man systemd.mount" will give you all the gory details. Under the systemd regime, you CAN create a mount by creating a *.mount file in /etc/systemd/system. However, before you go doing that, consider that systemd ALSO comes with a program called "systemd-fstab-generator". Contrary to its name, this generates unit files FROM an fstab (rather than generating an fstab). Therefore, following the Principle of Least Surprise, the current thinking is to continue to maintain your mountpoints in /etc/fstab and let systemd do the translation on the fly. In summary, then, while you CAN run systemd without /etc/fstab, that file is still recommnded as the expected configuration file for mountpoints. -- For more information, please reread.
[toc] | [prev] | [next] | [standalone]
| From | Mark Fletcher <mark27q1@gmail.com> |
|---|---|
| Date | 2018-05-18 01:40 +0200 |
| Message-ID | <vQAF3-3Dv-1@gated-at.bofh.it> |
| In reply to | #195836 |
On Thu, May 17, 2018 at 11:36:01AM +0100, Darac Marjal wrote: > However, before you go doing that, consider that systemd ALSO comes with a > program called "systemd-fstab-generator". Contrary to its name, this > generates unit files FROM an fstab (rather than generating an fstab). > Therefore, following the Principle of Least Surprise, the current thinking > is to continue to maintain your mountpoints in /etc/fstab and let systemd do > the translation on the fly. > > In summary, then, while you CAN run systemd without /etc/fstab, that file is > still recommnded as the expected configuration file for mountpoints. > That has the ring of good advice. Especially since there could easily be other programs on your system that expect to find information about the mountpoints on the system by looking in fstab -- it's a file on the system, it's a long-standing standard, people are allowed to look at it and it's not unreasonable to imagine some piece of software will. Mark
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web