when and where to use rw,nofail,noatime,discard,defaults
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I am using openstack cloud. And using LVM on rhel 7 to manage volumes. As per my usecase i should be able to detach and attach these volumes to different instances.
While updating fstab i have used defaults,nofail
for now but i am not sure what exatcly i should be using. I am aware of these options:
rw, nofail, noatime, discard, defaults
But i don't how to use them. what should be the ideal configuration for my usecase ?
linux rhel fstab volume
add a comment |Â
up vote
2
down vote
favorite
I am using openstack cloud. And using LVM on rhel 7 to manage volumes. As per my usecase i should be able to detach and attach these volumes to different instances.
While updating fstab i have used defaults,nofail
for now but i am not sure what exatcly i should be using. I am aware of these options:
rw, nofail, noatime, discard, defaults
But i don't how to use them. what should be the ideal configuration for my usecase ?
linux rhel fstab volume
I was not able to understand the descriptions well. I saw them on mount man page.
â Krishna Sharma
May 25 '17 at 4:24
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am using openstack cloud. And using LVM on rhel 7 to manage volumes. As per my usecase i should be able to detach and attach these volumes to different instances.
While updating fstab i have used defaults,nofail
for now but i am not sure what exatcly i should be using. I am aware of these options:
rw, nofail, noatime, discard, defaults
But i don't how to use them. what should be the ideal configuration for my usecase ?
linux rhel fstab volume
I am using openstack cloud. And using LVM on rhel 7 to manage volumes. As per my usecase i should be able to detach and attach these volumes to different instances.
While updating fstab i have used defaults,nofail
for now but i am not sure what exatcly i should be using. I am aware of these options:
rw, nofail, noatime, discard, defaults
But i don't how to use them. what should be the ideal configuration for my usecase ?
linux rhel fstab volume
linux rhel fstab volume
edited May 25 '17 at 10:39
nwildner
13.3k14073
13.3k14073
asked May 24 '17 at 12:45
Krishna Sharma
1625
1625
I was not able to understand the descriptions well. I saw them on mount man page.
â Krishna Sharma
May 25 '17 at 4:24
add a comment |Â
I was not able to understand the descriptions well. I saw them on mount man page.
â Krishna Sharma
May 25 '17 at 4:24
I was not able to understand the descriptions well. I saw them on mount man page.
â Krishna Sharma
May 25 '17 at 4:24
I was not able to understand the descriptions well. I saw them on mount man page.
â Krishna Sharma
May 25 '17 at 4:24
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
5
down vote
accepted
As said by @ilkkachu, if you take a look at the mount(8)
manpage, all your doubts should go away. Quoting the manpages:
-w, --rw, --read-write
Mount the filesystem read/write. This is the default. A synonym is -o rw.
Means: Not needed at all, since rw
is the default, and it is part of the defaults
option
nofail Do not report errors for this device if it does not exist.
Means: If the device is not enable after you boot and mount it using fstab, no errors will be reported. You will need to know if a disk can be ignored if not mounted. Pretty useful on usb drivers, but i see no point on using this on a server...
noatime
Do not update inode access times on this filesystem (e.g., for faster access on the
news spool to speed up news servers).
Means: No read operation is a "pure" read operation on filesystems. Even if you only cat file
for example, a little write operation will update the last time the inode
of this file was accessed. It's pretty useful on some situations(like caching servers), but it can be dangerous if used on sync technologies like Dropbox. I'm no one to judge here what is best for you, if noatime set or ignored...
discard/nodiscard
Controls whether ext4 should issue discard/TRIM commands to the underlying block device
when blocks are freed.This is useful for SSD devices and sparse/thinly
-provisioned LUNs, but it is off by default until sufficient testing has been done.
Means: TRIM feature from ssds. Take your time to read on this guy, and probe if your ssd support this feature(pretty much all modern ssds suport it). hdparm -I /dev/sdx | grep "TRIM supported"
will tell you if trim is supported on your ssd.
defaults
Use default options: rw, suid, dev, exec, auto, nouser, and async.
tl;dr: on your question, rw
can be removed(defaults
already imply rw), nofail
is up to you, noatime
is up to you, the same way discard
is just up to your hardware features.
1
discard
can be useful as well for other managed flash storage (MMC/eMMC/SD/CF) devices,/sys/<block-device>/queue/discard_zeroes_data
would tell if it's supported,1
if yes,0
if no, respectively.
â Levente Huszko
Apr 24 at 8:53
1
correction:/sys/block/<block-device>/queue/discard_zeroes_data
that is.
â Levente Huszko
Apr 24 at 9:00
add a comment |Â
up vote
0
down vote
I came across information that says it is VERY IMPORTANT TO DISABLE DISCARD MOUNT OPTION on SSD's (-o nodiscard) under Linux. Here's the quote and link:
Link:
https://www.intel.com/content/dam/support/us/en/documents/ssdc/data-center-ssds/Intel_Linux_NVMe_Guide_330602-002.pdf
Quote from page 6:
"Filesystem Recommendations
IMPORTANT: Do not discard blocks in filesystem usage.
Be sure to turn off the discard option when making your Linux filesystem. You want to allow the SSD manage blocks and its activity between the NVM (non-volatile memory) and host with more advanced and consistent approaches in the SSD Controller.
Core Filesystems:
⢠ext4 â the default extended option is not to discard blocks at filesystem make time, retain this, and do not add the âÂÂdiscardâ extended option as some information will tell you to do.
⢠xfs â with mkfs.xfs, add the âÂÂK option so that you do not discard blocks.
If you are going to use a software RAID, it is recommended to use a chunk size of 128k as starting point, depending on the workload you are going to run. You must always test your workload."
As you can see, the manufacturer itself, Intel, makes the point SO STRONGLY that they repeat it FIVE times in the text, FOUR explicitly and one through logic that professionals understand. This is VERY EMPHATIC of the manufacturer. Also, this SSD is no slouch: it is the $1,200 Intel SSD's from a few years ago.
I do not know how the "trim" option relates to any of this; I am passing on the information from the document. The document is dated March 2015, Revision 2.0, and is updated to the Linux Kernel 3.19 (the document lists that on Page 2).
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
5
down vote
accepted
As said by @ilkkachu, if you take a look at the mount(8)
manpage, all your doubts should go away. Quoting the manpages:
-w, --rw, --read-write
Mount the filesystem read/write. This is the default. A synonym is -o rw.
Means: Not needed at all, since rw
is the default, and it is part of the defaults
option
nofail Do not report errors for this device if it does not exist.
Means: If the device is not enable after you boot and mount it using fstab, no errors will be reported. You will need to know if a disk can be ignored if not mounted. Pretty useful on usb drivers, but i see no point on using this on a server...
noatime
Do not update inode access times on this filesystem (e.g., for faster access on the
news spool to speed up news servers).
Means: No read operation is a "pure" read operation on filesystems. Even if you only cat file
for example, a little write operation will update the last time the inode
of this file was accessed. It's pretty useful on some situations(like caching servers), but it can be dangerous if used on sync technologies like Dropbox. I'm no one to judge here what is best for you, if noatime set or ignored...
discard/nodiscard
Controls whether ext4 should issue discard/TRIM commands to the underlying block device
when blocks are freed.This is useful for SSD devices and sparse/thinly
-provisioned LUNs, but it is off by default until sufficient testing has been done.
Means: TRIM feature from ssds. Take your time to read on this guy, and probe if your ssd support this feature(pretty much all modern ssds suport it). hdparm -I /dev/sdx | grep "TRIM supported"
will tell you if trim is supported on your ssd.
defaults
Use default options: rw, suid, dev, exec, auto, nouser, and async.
tl;dr: on your question, rw
can be removed(defaults
already imply rw), nofail
is up to you, noatime
is up to you, the same way discard
is just up to your hardware features.
1
discard
can be useful as well for other managed flash storage (MMC/eMMC/SD/CF) devices,/sys/<block-device>/queue/discard_zeroes_data
would tell if it's supported,1
if yes,0
if no, respectively.
â Levente Huszko
Apr 24 at 8:53
1
correction:/sys/block/<block-device>/queue/discard_zeroes_data
that is.
â Levente Huszko
Apr 24 at 9:00
add a comment |Â
up vote
5
down vote
accepted
As said by @ilkkachu, if you take a look at the mount(8)
manpage, all your doubts should go away. Quoting the manpages:
-w, --rw, --read-write
Mount the filesystem read/write. This is the default. A synonym is -o rw.
Means: Not needed at all, since rw
is the default, and it is part of the defaults
option
nofail Do not report errors for this device if it does not exist.
Means: If the device is not enable after you boot and mount it using fstab, no errors will be reported. You will need to know if a disk can be ignored if not mounted. Pretty useful on usb drivers, but i see no point on using this on a server...
noatime
Do not update inode access times on this filesystem (e.g., for faster access on the
news spool to speed up news servers).
Means: No read operation is a "pure" read operation on filesystems. Even if you only cat file
for example, a little write operation will update the last time the inode
of this file was accessed. It's pretty useful on some situations(like caching servers), but it can be dangerous if used on sync technologies like Dropbox. I'm no one to judge here what is best for you, if noatime set or ignored...
discard/nodiscard
Controls whether ext4 should issue discard/TRIM commands to the underlying block device
when blocks are freed.This is useful for SSD devices and sparse/thinly
-provisioned LUNs, but it is off by default until sufficient testing has been done.
Means: TRIM feature from ssds. Take your time to read on this guy, and probe if your ssd support this feature(pretty much all modern ssds suport it). hdparm -I /dev/sdx | grep "TRIM supported"
will tell you if trim is supported on your ssd.
defaults
Use default options: rw, suid, dev, exec, auto, nouser, and async.
tl;dr: on your question, rw
can be removed(defaults
already imply rw), nofail
is up to you, noatime
is up to you, the same way discard
is just up to your hardware features.
1
discard
can be useful as well for other managed flash storage (MMC/eMMC/SD/CF) devices,/sys/<block-device>/queue/discard_zeroes_data
would tell if it's supported,1
if yes,0
if no, respectively.
â Levente Huszko
Apr 24 at 8:53
1
correction:/sys/block/<block-device>/queue/discard_zeroes_data
that is.
â Levente Huszko
Apr 24 at 9:00
add a comment |Â
up vote
5
down vote
accepted
up vote
5
down vote
accepted
As said by @ilkkachu, if you take a look at the mount(8)
manpage, all your doubts should go away. Quoting the manpages:
-w, --rw, --read-write
Mount the filesystem read/write. This is the default. A synonym is -o rw.
Means: Not needed at all, since rw
is the default, and it is part of the defaults
option
nofail Do not report errors for this device if it does not exist.
Means: If the device is not enable after you boot and mount it using fstab, no errors will be reported. You will need to know if a disk can be ignored if not mounted. Pretty useful on usb drivers, but i see no point on using this on a server...
noatime
Do not update inode access times on this filesystem (e.g., for faster access on the
news spool to speed up news servers).
Means: No read operation is a "pure" read operation on filesystems. Even if you only cat file
for example, a little write operation will update the last time the inode
of this file was accessed. It's pretty useful on some situations(like caching servers), but it can be dangerous if used on sync technologies like Dropbox. I'm no one to judge here what is best for you, if noatime set or ignored...
discard/nodiscard
Controls whether ext4 should issue discard/TRIM commands to the underlying block device
when blocks are freed.This is useful for SSD devices and sparse/thinly
-provisioned LUNs, but it is off by default until sufficient testing has been done.
Means: TRIM feature from ssds. Take your time to read on this guy, and probe if your ssd support this feature(pretty much all modern ssds suport it). hdparm -I /dev/sdx | grep "TRIM supported"
will tell you if trim is supported on your ssd.
defaults
Use default options: rw, suid, dev, exec, auto, nouser, and async.
tl;dr: on your question, rw
can be removed(defaults
already imply rw), nofail
is up to you, noatime
is up to you, the same way discard
is just up to your hardware features.
As said by @ilkkachu, if you take a look at the mount(8)
manpage, all your doubts should go away. Quoting the manpages:
-w, --rw, --read-write
Mount the filesystem read/write. This is the default. A synonym is -o rw.
Means: Not needed at all, since rw
is the default, and it is part of the defaults
option
nofail Do not report errors for this device if it does not exist.
Means: If the device is not enable after you boot and mount it using fstab, no errors will be reported. You will need to know if a disk can be ignored if not mounted. Pretty useful on usb drivers, but i see no point on using this on a server...
noatime
Do not update inode access times on this filesystem (e.g., for faster access on the
news spool to speed up news servers).
Means: No read operation is a "pure" read operation on filesystems. Even if you only cat file
for example, a little write operation will update the last time the inode
of this file was accessed. It's pretty useful on some situations(like caching servers), but it can be dangerous if used on sync technologies like Dropbox. I'm no one to judge here what is best for you, if noatime set or ignored...
discard/nodiscard
Controls whether ext4 should issue discard/TRIM commands to the underlying block device
when blocks are freed.This is useful for SSD devices and sparse/thinly
-provisioned LUNs, but it is off by default until sufficient testing has been done.
Means: TRIM feature from ssds. Take your time to read on this guy, and probe if your ssd support this feature(pretty much all modern ssds suport it). hdparm -I /dev/sdx | grep "TRIM supported"
will tell you if trim is supported on your ssd.
defaults
Use default options: rw, suid, dev, exec, auto, nouser, and async.
tl;dr: on your question, rw
can be removed(defaults
already imply rw), nofail
is up to you, noatime
is up to you, the same way discard
is just up to your hardware features.
edited May 24 '17 at 20:35
answered May 24 '17 at 20:20
nwildner
13.3k14073
13.3k14073
1
discard
can be useful as well for other managed flash storage (MMC/eMMC/SD/CF) devices,/sys/<block-device>/queue/discard_zeroes_data
would tell if it's supported,1
if yes,0
if no, respectively.
â Levente Huszko
Apr 24 at 8:53
1
correction:/sys/block/<block-device>/queue/discard_zeroes_data
that is.
â Levente Huszko
Apr 24 at 9:00
add a comment |Â
1
discard
can be useful as well for other managed flash storage (MMC/eMMC/SD/CF) devices,/sys/<block-device>/queue/discard_zeroes_data
would tell if it's supported,1
if yes,0
if no, respectively.
â Levente Huszko
Apr 24 at 8:53
1
correction:/sys/block/<block-device>/queue/discard_zeroes_data
that is.
â Levente Huszko
Apr 24 at 9:00
1
1
discard
can be useful as well for other managed flash storage (MMC/eMMC/SD/CF) devices, /sys/<block-device>/queue/discard_zeroes_data
would tell if it's supported, 1
if yes, 0
if no, respectively.â Levente Huszko
Apr 24 at 8:53
discard
can be useful as well for other managed flash storage (MMC/eMMC/SD/CF) devices, /sys/<block-device>/queue/discard_zeroes_data
would tell if it's supported, 1
if yes, 0
if no, respectively.â Levente Huszko
Apr 24 at 8:53
1
1
correction:
/sys/block/<block-device>/queue/discard_zeroes_data
that is.â Levente Huszko
Apr 24 at 9:00
correction:
/sys/block/<block-device>/queue/discard_zeroes_data
that is.â Levente Huszko
Apr 24 at 9:00
add a comment |Â
up vote
0
down vote
I came across information that says it is VERY IMPORTANT TO DISABLE DISCARD MOUNT OPTION on SSD's (-o nodiscard) under Linux. Here's the quote and link:
Link:
https://www.intel.com/content/dam/support/us/en/documents/ssdc/data-center-ssds/Intel_Linux_NVMe_Guide_330602-002.pdf
Quote from page 6:
"Filesystem Recommendations
IMPORTANT: Do not discard blocks in filesystem usage.
Be sure to turn off the discard option when making your Linux filesystem. You want to allow the SSD manage blocks and its activity between the NVM (non-volatile memory) and host with more advanced and consistent approaches in the SSD Controller.
Core Filesystems:
⢠ext4 â the default extended option is not to discard blocks at filesystem make time, retain this, and do not add the âÂÂdiscardâ extended option as some information will tell you to do.
⢠xfs â with mkfs.xfs, add the âÂÂK option so that you do not discard blocks.
If you are going to use a software RAID, it is recommended to use a chunk size of 128k as starting point, depending on the workload you are going to run. You must always test your workload."
As you can see, the manufacturer itself, Intel, makes the point SO STRONGLY that they repeat it FIVE times in the text, FOUR explicitly and one through logic that professionals understand. This is VERY EMPHATIC of the manufacturer. Also, this SSD is no slouch: it is the $1,200 Intel SSD's from a few years ago.
I do not know how the "trim" option relates to any of this; I am passing on the information from the document. The document is dated March 2015, Revision 2.0, and is updated to the Linux Kernel 3.19 (the document lists that on Page 2).
add a comment |Â
up vote
0
down vote
I came across information that says it is VERY IMPORTANT TO DISABLE DISCARD MOUNT OPTION on SSD's (-o nodiscard) under Linux. Here's the quote and link:
Link:
https://www.intel.com/content/dam/support/us/en/documents/ssdc/data-center-ssds/Intel_Linux_NVMe_Guide_330602-002.pdf
Quote from page 6:
"Filesystem Recommendations
IMPORTANT: Do not discard blocks in filesystem usage.
Be sure to turn off the discard option when making your Linux filesystem. You want to allow the SSD manage blocks and its activity between the NVM (non-volatile memory) and host with more advanced and consistent approaches in the SSD Controller.
Core Filesystems:
⢠ext4 â the default extended option is not to discard blocks at filesystem make time, retain this, and do not add the âÂÂdiscardâ extended option as some information will tell you to do.
⢠xfs â with mkfs.xfs, add the âÂÂK option so that you do not discard blocks.
If you are going to use a software RAID, it is recommended to use a chunk size of 128k as starting point, depending on the workload you are going to run. You must always test your workload."
As you can see, the manufacturer itself, Intel, makes the point SO STRONGLY that they repeat it FIVE times in the text, FOUR explicitly and one through logic that professionals understand. This is VERY EMPHATIC of the manufacturer. Also, this SSD is no slouch: it is the $1,200 Intel SSD's from a few years ago.
I do not know how the "trim" option relates to any of this; I am passing on the information from the document. The document is dated March 2015, Revision 2.0, and is updated to the Linux Kernel 3.19 (the document lists that on Page 2).
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I came across information that says it is VERY IMPORTANT TO DISABLE DISCARD MOUNT OPTION on SSD's (-o nodiscard) under Linux. Here's the quote and link:
Link:
https://www.intel.com/content/dam/support/us/en/documents/ssdc/data-center-ssds/Intel_Linux_NVMe_Guide_330602-002.pdf
Quote from page 6:
"Filesystem Recommendations
IMPORTANT: Do not discard blocks in filesystem usage.
Be sure to turn off the discard option when making your Linux filesystem. You want to allow the SSD manage blocks and its activity between the NVM (non-volatile memory) and host with more advanced and consistent approaches in the SSD Controller.
Core Filesystems:
⢠ext4 â the default extended option is not to discard blocks at filesystem make time, retain this, and do not add the âÂÂdiscardâ extended option as some information will tell you to do.
⢠xfs â with mkfs.xfs, add the âÂÂK option so that you do not discard blocks.
If you are going to use a software RAID, it is recommended to use a chunk size of 128k as starting point, depending on the workload you are going to run. You must always test your workload."
As you can see, the manufacturer itself, Intel, makes the point SO STRONGLY that they repeat it FIVE times in the text, FOUR explicitly and one through logic that professionals understand. This is VERY EMPHATIC of the manufacturer. Also, this SSD is no slouch: it is the $1,200 Intel SSD's from a few years ago.
I do not know how the "trim" option relates to any of this; I am passing on the information from the document. The document is dated March 2015, Revision 2.0, and is updated to the Linux Kernel 3.19 (the document lists that on Page 2).
I came across information that says it is VERY IMPORTANT TO DISABLE DISCARD MOUNT OPTION on SSD's (-o nodiscard) under Linux. Here's the quote and link:
Link:
https://www.intel.com/content/dam/support/us/en/documents/ssdc/data-center-ssds/Intel_Linux_NVMe_Guide_330602-002.pdf
Quote from page 6:
"Filesystem Recommendations
IMPORTANT: Do not discard blocks in filesystem usage.
Be sure to turn off the discard option when making your Linux filesystem. You want to allow the SSD manage blocks and its activity between the NVM (non-volatile memory) and host with more advanced and consistent approaches in the SSD Controller.
Core Filesystems:
⢠ext4 â the default extended option is not to discard blocks at filesystem make time, retain this, and do not add the âÂÂdiscardâ extended option as some information will tell you to do.
⢠xfs â with mkfs.xfs, add the âÂÂK option so that you do not discard blocks.
If you are going to use a software RAID, it is recommended to use a chunk size of 128k as starting point, depending on the workload you are going to run. You must always test your workload."
As you can see, the manufacturer itself, Intel, makes the point SO STRONGLY that they repeat it FIVE times in the text, FOUR explicitly and one through logic that professionals understand. This is VERY EMPHATIC of the manufacturer. Also, this SSD is no slouch: it is the $1,200 Intel SSD's from a few years ago.
I do not know how the "trim" option relates to any of this; I am passing on the information from the document. The document is dated March 2015, Revision 2.0, and is updated to the Linux Kernel 3.19 (the document lists that on Page 2).
answered Aug 29 at 2:47
Brad Allen
1
1
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f366949%2fwhen-and-where-to-use-rw-nofail-noatime-discard-defaults%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I was not able to understand the descriptions well. I saw them on mount man page.
â Krishna Sharma
May 25 '17 at 4:24