Hot answers tagged

43

Improving disk cache performance in general is more than just increasing the file system cache size unless your whole system fits in RAM in which case you should use RAM drive (tmpfs is good because it allows falling back to disk if you need the RAM in some case) for runtime storage (and perhaps an initrd script to copy system from storage to RAM drive at ...


23

1. First you need some unallocated space to create the partitions for each mountpoint (/var, /home, /tmp). Use Gparted for this. 2. Then you need to create the filesystems for those partitions (can be done with Gparted too) or use: mkfs.ext4 /dev/sdaX for example to create a new ext4 filesystem on the /dev/sdaX device (replace /dev/sdaX with your own ...


18

The number of spaces is a way to cosmetically separate the columns/fields. It has no meaning other than that. I.e. no the amount of white space between columns does not matter. The space between columns is comprised of white space (including tabs), and the columns themselves, e.g. comma-separated options, mustn't contain unquoted white space. From the ...


15

Firstly nofail does not permit the boot sequence to continue if the drive fails to mount. This is what fstab(5) says about nobootwait The mountall(8) program that mounts filesystem during boot also recogā€ nises additional options that the ordinary mount(8) tool does not. These are: bootwait which can be applied to remote filesystems ...


15

The spaces or tabs delimit the fields. Use as few or as many as suits. If you find fstab a little unreadable try using column to prettify it.


11

Firstly, I DO NOT recommend you continue using NTFS, as ntfs implemention in Linux would be performance and security trouble at any time. There are several things you can do: use some newer fs such as ext4 or btrfs try to change your io scheduler, for example bfq turn off swap use some automatic preloader like preload use something like systemd to preload ...


11

I use the usbmount package to automount USB drives on my Ubuntu server install. I have confirmed that the package exists for Wheezy too. sudo apt-get install usbmount usbmount will automount hfsplus, vfat, and ext (2, 3, and 4) file systems. You can configure it to mount more/different file systems in /etc/usbmount/usbmount.conf. By default it ...


10

The advantage of using the UUID is that it is independent from the actual device number the operating system gives your hard disk. Image you add another hard disk to the system, and for some reason the OS decides that your old disk is now sdb instead of sba. Your boot process would be screwed up if fstab would point to the device name. However, in case of ...


10

Because access to the underlying device is controlled only by file permissions by default, so if your USB stick contains a POSIX filesystem with a world-writable device node corresponding to a real device in the system, you can use that device node to access the corresponding device as a "plain" user. Imagine a device corresponding to one of the audio ...


9

It seems that I've found a solution: at the grub prompt, hit a to append options add init=/bin/bash to the end of the kernel command line and press enter The system will boot to a prompt like 'bash-3.2#' enter the following commands at the prompt mount -o remount,rw / vim /etc/fstab edit the fstab file commenting the errors by adding a # at the ...


9

Generally not, but with newer versions of mount/swapon/fsck... on Linux (from util-linux 2.19) at least, you can have more files (with .fstab extension) in /etc/fstab.d. So you can have a /etc/fstab.d/00_header.fstab, /etc/fstab.d/50_middle.fstab, /etc/fstab.d/99_end.fstab. Another approach if all you want is mount -a to run some command is have an entry ...


9

Mountpoint /dev is devtmpfs filesystem and managed by udev completely. So for details we have to go to udev configuration. 2 udev rules are handling this typically $ grep -ri '/dev/disk' /usr/lib/udev/rules.d/ /usr/lib/udev/rules.d/60-persistent-storage.rules:# persistent storage links: /dev/disk/{by-id,by-uuid,by-label,by-path} /usr/lib/udev/rules.d/13-dm-...


9

As it's states in usage section, -p will skip pseudofs mounts (tmpfs, autofs and others): usage: genfstab [options] root Options: -L Use labels for source identifiers (shortcut for -t LABEL) -p Avoid printing pseudofs mounts -t TAG Use TAG for source identifiers -U Use UUIDs for source identifiers (shortcut for -...


9

ext3/4 file systems have a default mount options attribute in their headers. You can see it with: $ LC_ALL=C tune2fs -l /dev/device | grep 'Default mount options:' Default mount options: user_xattr acl You can change it with tune2fs -o and mounting with -o noacl would override it. When creating a new file system, mke2fs will set that based on what you ...


9

async is the opposite of sync, which is rarely used. async is the default, you don't need to specify that explicitely. The option sync means that all changes to the according filesystem are immediately flushed to disk; the respective write operations are being waited for. For mechanical drives that means a huge slow down since the system has to move the ...


8

The Arch Linux Wiki has a comprehensive list of the field definitions in your /etc/fstab file, including those that you are asking about: nodev - Don't interpret block special devices on the filesystem. nosuid - Block the operation of suid, and sgid bits. 0 2 are, respectively, dump & pass: <dump> - used by the dump utility to decide when to ...


8

Key-based authentication can only work if the ssh process can find your key. You presumably have your key in your home directory; but you've never told sshfs where to look for a key. At boot time, it would be root mounting all filesystems, therefore the key must be either in /root/.ssh or referenced in /root/.ssh/config. I recommend mounting the filesystem ...


8

bind mirrors a filesystem (among other situatons, it's useful when setting a chroot inside which you need to have a "complete" system (like when unpacking/installing Gentoo). Just simply like that, it mirrors a tree from A into B. I don't know for sure if it has any option, but I doubt it, it does not do more than, well, mirroring. Unlike a symlink, which ...


8

//megaboxy/inetpub /mnt/megabo cifs username=admin, password=passwd 0 0 ^ this is a problem You can't put spaces between the options. Remove that and that error should go avay.


8

When the boot loader calls the kernel it passes it a parameter called root. So once the kernel finished initializing it will continue by mounting the given root partition to / and then calling /sbin/init (unless this has been overriden by other parameters). Then the init process starts the rest of the system by loading all services that are defined to be ...


8

A couple of things to check out. I do something similar and you can test mount it directly using the mount command to make sure you have things setup right. Permissions on credentials file Make sure that this file is permissioned right. $ sudo ls -l /etc/smb_credentials.txt -rw-------. 1 root root 54 Mar 24 13:19 /etc/smb_credentials.txt Verbose mount ...


7

Read ahead: On 32 bit systems: blockdev --setra 8388607 /dev/sda On 64 bit systems: blockdev --setra 4294967295 /dev/sda Write behind cache: echo 100 > /proc/sys/vm/dirty_ratio This will use up to 100% of your free memory as write cache. Or you can go all out and use tmpfs. This is only relevant if you have RAM enough. Put this in /etc/fstab. ...


7

One of the first things a linux system is doing is mounting all file systems to the correct mountpoint in order to let all other parts of the system find their files. The root file system is usually given on the kernel command line. It will mount this file system and look in /etc/fstab for all the other mount points. If you really want to do anything weird ...


7

Two things here: fstrim trims all the data that is unallocated in the filesystem (well, not really all the data, only the data blocks that are not allocated, I don't think the unused parts of the inode table or the parts of not-completely used blocks are trimmed), regardless of whether discard is in used or not. fstrim cannot know which of those ...


7

Unmount the partition: # umount /part Rename the directory after making sure it's not mounted: # mountpoint /part &>/dev/null || mv /part /best_name_ever Edit /etc/fstab to replace /part with /best_name_ever Remount the partition: mount /best_name_ever The # is of course meant to represent your root prompt, not actual input to be typed in. To ...


7

If you want to use them all on the same partition you can either use LVM or three simple bind mounts. To create a bind based solution you create a partition with a filesystem go to rescue mode (single user still needs some of the folders) mount it as /mnt/data Move all folders you want to move. Using cp and mv dir dir.old might be safer, but since I did ...


7

SysV Init The /etc/init.d/mountall.sh init script mounts local filesystems only: mount -a -t nonfs,nfs4,smbfs,cifs,ncp,ncpfs,coda,ocfs2,gfs,gfs2,ceph -O no_netdev Other filesystems are mounted by separate init scripts, like for example /etc/init.d/mountnfs.sh, which declare (via LSB headers) their dependency on $network. Thus these get scheduled later, ...


6

The options field in fstab is comma-delimited (note every other (non-swap) line). You have spaces. Fix that and it should work as intended.


6

It has to do with boot order. Highest priority is required for booting (/ and in my opinion /usr /var /tmp ...). The /boot filesystem can do with lower priority because by the time the system can start fsck's, it read the necessary files from boot already. Filesystems for home directories etc. are lower priority during boot process.



Only top voted, non community-wiki answers of a minimum length are eligible