You are not logged in.

#1 2010-12-27 07:11:03

victorhooi
Member
Registered: 2009-08-06
Posts: 109

/etc/fstab is near empty - how to add SSD mount options?

Hi,

I've recently re-installed Arch Linux on my Lenovo X200, equipped with a Intel X-25M SSD. I installed using the Archboot ISO (https://wiki.archlinux.org/index.php/Archboot), using mostly defaults for everything, and using [testing] (since I like bleeding edge and all...lol).

I'm reading through the Arch Wiki SSD page:

https://wiki.archlinux.org/index.php/Solid_State_Drives

and I'm hoping to try adding the "discard" and "noatime" options.

However, for some reason, my /etc/fstab file is near-empty:

#
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
devpts                 /dev/pts      devpts    defaults            0      0
shm                    /dev/shm      tmpfs     nodev,nosuid        0      0

Is my fstab file meant to be empty like this? How exactly is my system getting all it's mount options? How does it know where the swapfile is? Udisk rules or something? *confused*.

In my /boot/grub/menu.lst file, I have:

...

# boot sections follow
# each is implicitly numbered from 0 in the order of appearance below
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*
# DEVICE DETAILS: /dev/sda3 UUID=dcec8259-b8e3-43e7-b885-2a716af4f98c LABEL=boot
# DEVICE DETAILS: /dev/sda5 UUID=eebc861d-cc51-407d-93e1-902c01ac7747 LABEL=root
# DEVICE DETAILS: /dev/sda6 UUID=d84e51b0-842f-45c7-a303-cec7dd5c609c LABEL=swap

# (0) Arch Linux
title  Arch Linux
root   (hd0,2)
kernel /vmlinuz26 root=/dev/disk/by-uuid/eebc861d-cc51-407d-93e1-902c01ac7747 rootflags=rw,subvol=root,ssd rootfstype=btrfs ro
initrd /kernel26.img

I just checked mount, and /dev/sda6 doesn't appear to be mounted - so my swap is broken/not working?

So my questions are:

1. Is /etc/fstab meant to be empty like that? If not, what could have caused this issue, and how should I fix it?
2. How should I enable swap?
3. How do I add mount options for my root partition? Can I add it to menu.lst, or can I add it to /etc/fstab somehow?
4. If I add "discard" now, are there any performance hits as compared to if I'd had it enabled since the beginning? (basically I'm tossing up whether to do a re-format).

Cheers,
Victor

Offline

#2 2010-12-27 09:51:04

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: /etc/fstab is near empty - how to add SSD mount options?

victorhooi wrote:

1. Is /etc/fstab meant to be empty like that? If not, what could have caused this issue, and how should I fix it?
2. How should I enable swap?
3. How do I add mount options for my root partition? Can I add it to menu.lst, or can I add it to /etc/fstab somehow?
4. If I add "discard" now, are there any performance hits as compared to if I'd had it enabled since the beginning? (basically I'm tossing up whether to do a re-format).

1. Not sure, this doesn't look right, but i have no experience with Btrfs. Speaking of which, you are aware that in it's current state, Btrfs can produce a lot more diskwrites than Ext4, possibly making it a lot less suitable for SSD's? Perfomance is also not top notch yet.

2. If you have enough ram, skip the swap. You can also create a swapfile instead of a partition, in case you find that you really need it.

3. Also not sure if this is different for Btrfs, but normally you'd need fstab entries and add them there.

4. No, only that previously delected sectors will not get 'zeroed' until they are deleted again, but this will happen automatically.


ᶘ ᵒᴥᵒᶅ

Offline

#3 2010-12-27 09:54:13

stqn
Member
Registered: 2010-03-19
Posts: 1,189
Website

Re: /etc/fstab is near empty - how to add SSD mount options?

Looks weird. I have no experience with ArchBoot, but the only explanation I can come up with is that you directly installed Arch on your SSD with the ArchBoot scripts, instead of using ArchBoot to create a CD/USB disk to boot on and then install Arch on your SSD... Is that correct?

Re (4), you could create a big file that fills the remaining space on your partition and then delete it (after enabling discard.)

Offline

#4 2010-12-28 14:36:20

victorhooi
Member
Registered: 2009-08-06
Posts: 109

Re: /etc/fstab is near empty - how to add SSD mount options?

heya,

Hmm, well, I dd-ed the Archbot image to a USB stick, and booted it straight from there. It's basically the same as a normal Arch install ISO, except that it adds stuff like BTRFS support.

I'm not exactly what went wrong, but I guess something went wrong with the fstab creation part of the install?

Also, in answer to litemotiv - thanks for the caveat about BTRFS. I do know it's considered semi-stable at the moment, at best, however, I'm using it mainly to play around with the snapshot features (not as seamless as on ZFS, but still quite cool). Most of my core data is on Dropbox, really. I didn't know the part about it having more writes than ext4 though.

Finally, I did enable a swap drive (2Gb), since I've already created it, and I don't want to have to re-partition...lol. Guess we'll see how it goes. I'm actually having issues suspending at the moment (either via KDE or via pm-suspend), not sure if that's somehow related to something I did wrong with swap, or not.

stqn: Thanks for the tip about filling up the drive then deleting smile. Might be something to try later. I suppose it'll only add one more wear-cycle to my drive anyway, if I do it in one shot.

I just thought I'd post here in case it was intended behavior (e.g. they'd moved to having an empty fstab or something, and having stuff auto-detected or set in udisk or something...*confused shrug*...)

Anyhow, I've re-created my /etc/fstab with lines for each of the partitions, as traditional, seems to still work fine still.

Cheers,
Victor

Offline

Board footer

Powered by FluxBB