Example :
Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/vg-home 25066604 4513268 19256952 19% /home
Statement : "You MUST ..." | Status | Comment |
---|---|---|
... buy a SLC SSD drive | it depends | |
... leave space for over-provisioning | true |
|
... align partitions to 32 bits / 4K | false |
|
... have SWAP and tmpfs filesystems NOT on the SSD | true |
|
... use ext4 | true | |
... use the noatime mount option | true |
|
... use the discard mount option | false |
|
... use the data=ordered mount option | false |
|
... setup a regular TRIM with cron | false |
|
... worry about wear leveling | TODO | |
... use SSDs in RAID for extreme performance | TODO | I've read somewhere this is a bad idea, offering no performance improvement |
Error mounting /dev/sde1 at /mount/point: Unknown error when mounting /dev/sde1
ntfs_mst_post_read_fixup_warn: magic: 0x5acebe02 size: 4096 usa_ofs: 30771 usa_count: 3182: Invalid argument
Actual VCN (0x57f9577b3dca807b) of index buffer is different from expected VCN (0x0).
Failed to open $Secure: No such file or directory
Failed to mount '/dev/sde1': No such file or directory
Mounting volume... NTFS signature is missing.
FAILED
Attempting to correct errors... NTFS signature is missing.
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
The alternate bootsector is usable
Set sector count to 60437491 instead of 60435443
The startup data can be fixed, but no change was requested
Volume is corrupt. You should run chkdsk.
No change made ok since this was a dry-run
Mounting volume... NTFS signature is missing.
FAILED
Attempting to correct errors... NTFS signature is missing.
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
The alternate bootsector is usable
Set sector count to 60437491 instead of 60435443
Rewriting the bootsector
The boot sector has been rewritten
ntfs_mst_post_read_fixup_warn: magic: 0x00000000 size: 1024 usa_ofs: 0 usa_count: 0: Invalid argument
Record 0 has no FILE magic (0x0)
Failed to load $MFT: Input/output error
Volume is corrupt. You should run chkdsk. will do, thx
chkdsk (on the W10 box) was helpless)Windows cannot access the F: drive.
contact my administrator.
Checking blocks 0 to 30218745 Checking for bad blocks (read-only test): done Pass completed, 0 bad blocks found. (0/0/0 errors)
FS | features | + | - |
---|---|---|---|
Btrfs |
|
|
|
ext4 |
|
||
JFS |
|
||
OpenZFS |
|
|
|
XFS |
|
|
|
It depends on what you value most:
I like filesystem X because of feature. I've been using it on some kind of hardware, it's VERY reliable.
I lost a whole disk because of filesystem X, so now I prefer filesystem Y.
Got data corruption on filesystem Y. Using filesystem Z and it "just works" so far.
FS | + | - |
---|---|---|
ext2, ext3 | obsolete, use ext4 | |
ReiserFS | Performs great with numerous files + small files |
|
ZFS |
|
UUID=1A0B4F9B2D10391B /mount/point ntfs-3g noauto,users,uid=1000,gid=1000,dmask=022,fmask=133 0 0
So far, only root can mount a NTFS filesystem. However, thanks to the uid=1000,gid=1000 parameters, the corresponding non-root user has write access to the volume.
f: /path/to/some/specific/file drwxr-xr-x root root / drwxr-xr-x root root path drwxr-xr-x kevin admins to drwx------ kevin admins some drwx------ kevin admins specific -rw-rw-r-- kevin admins file
Filesystem Size Used Avail Use% Mounted on /dev/mapper/crypt-root 936G 251G 638G 29% /
Filesystem Inodes IUsed IFree IUse% Mounted on /dev/mapper/crypt-root 62373888 627135 61746753 2% /
/ /dev/mapper/crypt-root ext4 rw,relatime,errors=remount-ro
Don't forget that on recent distributions, the ext4 filesystem is not available in "dev" anymore as it is now fully supported by the kernel.
Actually, the name used in Nautilus to refer to a USB mass-storage device is matched to this device mounting point : if the device is mounted in /media/device_xyz, the device will be displayed as device_xyz in Nautilus.
Fine then, but where does this device_xyz come from ? As most of the time USB storage devices are formatted with FAT filesystems (FAT 16 / FAT 32), their name is just the DOS partition label. To change this, 2 solutions :
mtools_skip_check=1
>> ~/.mtoolsrcID ↔ name
list). The list includes an entry for
0 ≤ n ≤ (232 - 1)
, source)df -hi
Every filesystem can handle a limited number of inodes (the inodes table uses space, so allowing a huge number of files on a filesystem means a big inode table, hence less space for files.). When running out of free inodes, there are 3 solutions :
find path/to/be/searched -inum inodeNumberOfFileToDelete -delete
For any personal reason, I'd like my USB key to always be mounted into /media/usbKey/ and my USB HDD into /media/usbHdd/. Indeed, depending on the DOS-label of the media (if any), and on the plugging order, I have no control on the mount point, which can be critical if I want to build scripts accessing content on removable media.
/dev/sdd1: LABEL="ConPow" UUID="05b3250f-3478-4831-8a85-c8da270839c3" TYPE="ext3"
UUID=05b3250f-3478-4831-8a85-c8da270839c3 /media/ConPow ext3 noauto,users 0 0
looking at device '/devices/pci0000:00/0000:00:13.2/usb2/2-2/2-2:1.0/host12/target12:0:0/12:0:0:0/block/sdb/sdb1': KERNEL=="sdb1" SUBSYSTEM=="block" DRIVER=="" ATTR{partition}=="1" ATTR{start}=="63" ATTR{size}=="1250258562" [...] looking at parent device '/devices/pci0000:00/0000:00:13.2/usb2/2-2/2-2:1.0/host12/target12:0:0/12:0:0:0/block/sdb': KERNELS=="sdb" SUBSYSTEMS=="block" DRIVERS=="" ATTRS{range}=="16" ATTRS{ext_range}=="256" ATTRS{removable}=="0" ATTRS{ro}=="0" ATTRS{size}=="1250263728" ATTRS{alignment_offset}=="0" ATTRS{discard_alignment}=="0" ATTRS{capability}=="50" [...] looking at parent device '/devices/pci0000:00/0000:00:13.2/usb2/2-2/2-2:1.0/host12/target12:0:0/12:0:0:0': KERNELS=="12:0:0:0" SUBSYSTEMS=="scsi" DRIVERS=="sd" [...]
KERNEL=="sd?1", ATTRS{size}=="1250263728", ATTRS{capability}=="50", KERNEL=="sd?1", NAME="ConPow"
More about udevinfo, udev rules syntax and basic udev rules/dev/ConPow /media/ConPow ext3 auto,user 0 0
Instead of the UUID, it is possible to identify filesystems by their volume label. This volume label can be specified while creating the file system :
On existing filesystems, this can be done with tune2fs. Then, it is possible to mount filesystems, or refer to them in /etc/fstab with the label keyword.
What's going on ?
[ 5962.398581] FAT-fs (sdd1): error, fat_get_cluster: invalid cluster chain (i_pos 14085575) [ 5985.072996] FAT-fs (sdd1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive! [ 5995.422661] FAT-fs (sdd1): error, fat_get_cluster: invalid cluster chain (i_pos 14085575) [ 5995.422671] FAT-fs (sdd1): Filesystem has been set read-only
For a detailed view on how things work, read this ServerFault discussion (or a local copy)
There are differences between boot sector and its backup. Differences: (offset:original/backup) 65:01/00 1) Copy original to backup 2) Copy backup to original 3) No action ?think twice before overwriting usable data with 0's (have another look at the article I linked above !)
With modern distributions, all steps below are now handled automatically / differently and this whole procedure is now obsolete. I keep it for "historical" reasons.