You are not logged in.

#1 2013-09-13 19:55:38

Earnestly
Member
Registered: 2011-08-18
Posts: 801

systemd 207 make fstab changes optional

Awebb wrote:

systemd 207 will make great improvements on mount-units, so the use of fstab changes from mandatory to optional.

With systemd, fstab has always been optional. Edit: But I guess it’s now even more optional? Heh.

Last edited by Earnestly (2013-09-13 19:57:33)

Offline

#2 2013-09-13 20:00:20

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: systemd 207 make fstab changes optional

Kaustic wrote:
Awebb wrote:

systemd 207 will make great improvements on mount-units, so the use of fstab changes from mandatory to optional.

With systemd, fstab has always been optional. Edit: But I guess it’s now even more optional? Heh.

I'm kind of curious if when using the GPT autodetection method, if there is still a way to specify mount options…  I think to me, the only thing that is keeping me from trying out such a thing would be the inability to really indicate how I wanted things mounted (not to mention I have some things mounted in funky places in order to avoid having them in my btrfs snapshots).

Offline

#3 2013-09-13 20:21:57

Awebb
Member
Registered: 2010-05-06
Posts: 4,126

Re: systemd 207 make fstab changes optional

Kaustic wrote:
Awebb wrote:

systemd 207 will make great improvements on mount-units, so the use of fstab changes from mandatory to optional.

With systemd, fstab has always been optional. Edit: But I guess it’s now even more optional? Heh.

Not really. In the beginning, using mount services was not recommended by the developers. Now it seems... not so not recommended anymore.

Offline

#4 2013-09-13 22:28:49

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,388
Website

Re: systemd 207 make fstab changes optional

That all seems very odd to me - but most likely due to my ignorance of how it works.  But I don't see how it would know which partitions to mount if you had multiple partitions on the same drive for different distros or installations.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#5 2013-09-13 22:31:12

pks
Member
From: Germany
Registered: 2012-07-20
Posts: 110

Re: systemd 207 make fstab changes optional

Trilby wrote:

That all seems very odd to me - but most likely due to my ignorance of how it works.  But I don't see how it would know which partitions to mount if you had multiple partitions on the same drive for different distros or installations.

As I understood it systemd mounts partitions based on partition type GUIDs. Swap and home partitions should each have a special type GUID set which systemd will use to mount them. How it works if there are multiple partitions with that type GUIDs I don't know, though. See here for more information on those type GUIDs.

Last edited by pks (2013-09-13 22:32:26)

Offline

#6 2013-09-13 22:40:52

lahwaacz
Wiki Admin
From: Czech Republic
Registered: 2012-05-29
Posts: 423

Re: systemd 207 make fstab changes optional

WonderWoofy wrote:
Kaustic wrote:
Awebb wrote:

systemd 207 will make great improvements on mount-units, so the use of fstab changes from mandatory to optional.

With systemd, fstab has always been optional. Edit: But I guess it’s now even more optional? Heh.

I'm kind of curious if when using the GPT autodetection method, if there is still a way to specify mount options…  I think to me, the only thing that is keeping me from trying out such a thing would be the inability to really indicate how I wanted things mounted (not to mention I have some things mounted in funky places in order to avoid having them in my btrfs snapshots).

Some mount options can be specified as defaults for that particular filesystem (at least ext4) - very useful for an external drive. See the '-o' option in tune2fs(8) for an explanation. It could theoretically be expanded for other mount options too.

Offline

#7 2013-09-13 22:44:35

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,058

Re: systemd 207 make fstab changes optional

That wouldn't help if you wanted multiple drives/partitions of the same file system to be mounted with different options.

Offline

#8 2013-09-13 22:45:30

Earnestly
Member
Registered: 2011-08-18
Posts: 801

Re: systemd 207 make fstab changes optional

Awebb wrote:
Kaustic wrote:
Awebb wrote:

systemd 207 will make great improvements on mount-units, so the use of fstab changes from mandatory to optional.

With systemd, fstab has always been optional. Edit: But I guess it’s now even more optional? Heh.

Not really. In the beginning, using mount services was not recommended by the developers. Now it seems... not so not recommended anymore.

Aha, but just because the developers recommended fstab didn’t make it any less optional.  A few of the TUs who sit on IRC have not used an /etc/fstab for a long time.

Offline

#9 2013-09-13 22:46:12

pks
Member
From: Germany
Registered: 2012-07-20
Posts: 110

Re: systemd 207 make fstab changes optional

anonymous_user wrote:

That wouldn't help if you wanted multiple drives/partitions of the same file system to be mounted with different options.

Those settings are per-partition, so it would indeed fix the problem.

Offline

#10 2013-09-13 22:52:15

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,132
Website

Re: systemd 207 make fstab changes optional

Splitting the systemd related posts into a separate thread...


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#11 2013-09-13 23:09:27

progandy
Member
Registered: 2012-05-17
Posts: 2,143

Re: systemd 207 make fstab changes optional

If you need mount-point specific settings without an fstab, create mount units. According to my understanding we have this situation:
Systemd handles all mounts with mount units.
There has been a stable fstab-mount-generator since the beginning (read fstab, write mount units).
The gpt-mount-generator (read gpt, write mount units) is finally stable so you don't need to use fstab or custom mount units for basic setups.
So you have always the option to create your own mount units which override the fstab/gpt generated units.

Offline

#12 2013-09-13 23:23:17

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: systemd 207 make fstab changes optional

But what if I want a partition mounted with certain options when I'm booted into one OS and with other options when booted into another? That can't be specified in a single set of options for the particular partition, can it?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#13 2013-09-13 23:42:09

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 904

Re: systemd 207 make fstab changes optional

For me that look like automagic like windows or ubuntu do...not to be bad guy but...sometimes I tink that systemd hiden things that not need to be hiden or automatice things that not need to be automatic reducin the time spend to tune our system
...
maybe in a future they add a function that intall packages reading your mind...how boring intallation goin to be and tuning them later too

but enther agai in the theme, as far I underestand this work only if you fallow what dev (sÿstëmd [hollydays here]) spect to you use, otherwise fallpack to you dirty fstab


Well, I suppose that this is somekind of signature, no?

Offline

#14 2013-09-13 23:45:04

progandy
Member
Registered: 2012-05-17
Posts: 2,143

Re: systemd 207 make fstab changes optional

cfr wrote:

But what if I want a partition mounted with certain options when I'm booted into one OS and with other options when booted into another? That can't be specified in a single set of options for the particular partition, can it?

Then use mount units if you want to avoid fstab. The only partitions that are automounted are all swap and the first /home (special UUID which you have to set manually, no tool does that. Yet?). So simply create your own home.mount unit and you have no more worries. All other partitions have to be mounted manually anyway withh fstab or unit file.

Last edited by progandy (2013-09-13 23:46:13)

Offline

#15 2013-09-14 01:17:04

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: systemd 207 make fstab changes optional

Thanks but I think I'll stick to fstab. No idea how that would work for home on an lvm volume anyhow. On the wikipedia page, there's no special guid for home on Linux only on Solaris etc.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#16 2013-09-14 01:37:26

progandy
Member
Registered: 2012-05-17
Posts: 2,143

Re: systemd 207 make fstab changes optional

cfr wrote:

Thanks but I think I'll stick to fstab. No idea how that would work for home on an lvm volume anyhow. On the wikipedia page, there's no special guid for home on Linux only on Solaris etc.

Currently you can only find it in the systemd changelog or in the source code.

* A logic to automatically discover and enable home and swap
          partitions on GPT disks has been added. With this in place
          /etc/fstab becomes optional for many setups as systemd can
          discover certain partitions located on the root disk
          automatically. Home[ partitions are recognized under their
          GPT type ID 933ac7e12eb44f13b8440e14e2aef915. Swap
          partitions are recognized under their GPT type ID
          0657fd6da4ab43c484e50933c84b4f4f.

http://permalink.gmane.org/gmane.comp.s … evel/13049

Offline

#17 2013-09-14 02:02:56

jasonwryan
Forum & Wiki Admin
From: .nz
Registered: 2009-05-09
Posts: 18,132
Website

Re: systemd 207 make fstab changes optional


Arch + dwm   •   Mercurial repos  •   Github

Registered Linux User #482438

Offline

#18 2013-09-14 02:03:10

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: systemd 207 make fstab changes optional

cfr wrote:

Thanks but I think I'll stick to fstab. No idea how that would work for home on an lvm volume anyhow. On the wikipedia page, there's no special guid for home on Linux only on Solaris etc.

When you specify the partition type code in gdisk, you have the option of using the short four character indentifier, but you can also use a full GUID if you please.  I had to do this to make an Intel Rapid Start partition before support was added by Rod Smith.  Gdisk doens't know what the hell it is, but it doesn't stop you either.

FWIW, when I found out I could use just mount units instead of the fstab, I converted everything.  It worked quite well, but I ended up realizing that I really like having all the mount info central to one file, where I could potentially see immediately why my shit was potentially going wrong.  So in the end I switched back.  I'm sure I lose a few milliseconds of boot time for the generator to do its thing, but meh…

Offline

#19 2013-09-14 02:06:03

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: systemd 207 make fstab changes optional

That's basically my thinking too. Everything is listed in one file - I stand some chance of figuring out what I've messed up. Everything is configured in a zillion files - I stand no chance of figuring out what I've done (and I'm more likely to have done it in the first place).


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#20 2013-09-14 03:22:36

progandy
Member
Registered: 2012-05-17
Posts: 2,143

Re: systemd 207 make fstab changes optional

cfr wrote:

That's basically my thinking too. Everything is listed in one file - I stand some chance of figuring out what I've messed up. Everything is configured in a zillion files - I stand no chance of figuring out what I've done (and I'm more likely to have done it in the first place).

That is somewhat true. rootfs and /boot are somehow detected from their mount during initramfs, tmp is configured as mount unit by default in /usr/lib, then athe fstab generator runs, then the gpt generator and then you can have custom unit files all over the place in /etc, and /run. Don't forget manual mounts with mount and fuse which will be automatically added as temporary mount units, too.

Offline

#21 2013-09-14 06:39:51

ontobelli
Member
From: Mexico City
Registered: 2011-02-06
Posts: 127

Re: systemd 207 make fstab changes optional

progandy wrote:

The only partitions that are automounted are all swap and the first /home (special UUID which you have to set manually, no tool does that. Yet?). So simply create your own home.mount unit and you have no more worries. All other partitions have to be mounted manually anyway withh fstab or unit file.

In my case with msdos partition and fstab is get automounted every ext4 partition but not swap.

I have no idea how to create the dev-sda8.swap unit. sad

/dev/sda5	/boot 	ext4	defaults,relatime,x-systemd.automount		0 2
/dev/sda6	/	ext4	defaults,relatime,x-systemd.automount		0 1
/dev/sda7	/home	ext4	defaults,relatime,x-systemd.automount		0 2
/dev/sda8	none	swap	defaults					0 0
tmpfs		/tmp	tmpfs	rw,nodev,nosuid,relatime,size=3G		0 0

Offline

#22 2013-09-14 11:39:20

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: systemd 207 make fstab changes optional

creating your own .mount or .swap units is imho non-sense. Just create an fstab entry and the fstab-generator will generate it (even upstream admits that using fstab is simpler than writing your own mount unit).

The GPT generator doesn't change anything on your setups, you can still use fstab just as before and you even still have to if you want to add mount options. It will simple automatically create units for /home and/or swap if the GPT partition is marked with the corresponding identifier. This simplifies the most basic setups since you don't have to set up the partitions in fstab anymore. The partition itself has the information if it is home or swap and systemd makes use of this information which imho makes perfect sense.

Offline

Board footer

Powered by FluxBB