setting mount options on an USB drive automounted by Gnome
My USB drive is currently automounted correctly under Gnome (Ubuntu 18.04), but I want to set the "noatime" option at mount.
I know I can do this via the Gnome "disks" untility, but I prefer to document in code what I did to set up my system, so I'm looking for the command-line way to do this.
gnome usb-drive automount
add a comment |
My USB drive is currently automounted correctly under Gnome (Ubuntu 18.04), but I want to set the "noatime" option at mount.
I know I can do this via the Gnome "disks" untility, but I prefer to document in code what I did to set up my system, so I'm looking for the command-line way to do this.
gnome usb-drive automount
1
The following links may help you, Auto mount, and change mount points on login and Mount NTFS partition in a USB drive with custom permissions and owner -- Add the mount optionnoatime
among the other mount options (in a comma separated list).
– sudodus
May 19 '18 at 18:04
These will play nice with the user-mount that Gnome does on my behalf?
– retorquere
May 19 '18 at 18:11
What I suggest is to mount the drive either via a line in the file/etc/fstab
or a command line withmount
. The same options apply in both cases, and if already mounted, the system should not mount it again. What file systems are there on the drive? How is it mounted now? You can find out by looking into the file/etc/mtab
(when it is mounted).
– sudodus
May 19 '18 at 18:24
It's mounted as /dev/sdb1 /media/emile/ShittySSD ext4 rw,nosuid,nodev,noatime,block_validity,discard,delalloc,nojournal_checksum,barrier,user_xattr,acl 0 0 but wouldn't adding it to fstab preclude a user mount?
– retorquere
May 20 '18 at 22:34
1
If you add a partition to fstab, it will normally be mounted automatically at boot, and there will be problems, if the partition in not available (if the USB drive is not plugged in). But you can use the mount optionnoauto
, it will not be automatically mounted, yet the mount options are there and the operating system is ready to mount it, whenever you want (and have the USB drive connected). It is enough to specify the device or mount point for examplesudo mount /dev/sdb1
orsudo mount /mnt/sssd
(if you have made and specified the mount point/mnt/sssd
).
– sudodus
May 21 '18 at 5:06
add a comment |
My USB drive is currently automounted correctly under Gnome (Ubuntu 18.04), but I want to set the "noatime" option at mount.
I know I can do this via the Gnome "disks" untility, but I prefer to document in code what I did to set up my system, so I'm looking for the command-line way to do this.
gnome usb-drive automount
My USB drive is currently automounted correctly under Gnome (Ubuntu 18.04), but I want to set the "noatime" option at mount.
I know I can do this via the Gnome "disks" untility, but I prefer to document in code what I did to set up my system, so I'm looking for the command-line way to do this.
gnome usb-drive automount
gnome usb-drive automount
asked May 19 '18 at 16:27
retorquereretorquere
1162
1162
1
The following links may help you, Auto mount, and change mount points on login and Mount NTFS partition in a USB drive with custom permissions and owner -- Add the mount optionnoatime
among the other mount options (in a comma separated list).
– sudodus
May 19 '18 at 18:04
These will play nice with the user-mount that Gnome does on my behalf?
– retorquere
May 19 '18 at 18:11
What I suggest is to mount the drive either via a line in the file/etc/fstab
or a command line withmount
. The same options apply in both cases, and if already mounted, the system should not mount it again. What file systems are there on the drive? How is it mounted now? You can find out by looking into the file/etc/mtab
(when it is mounted).
– sudodus
May 19 '18 at 18:24
It's mounted as /dev/sdb1 /media/emile/ShittySSD ext4 rw,nosuid,nodev,noatime,block_validity,discard,delalloc,nojournal_checksum,barrier,user_xattr,acl 0 0 but wouldn't adding it to fstab preclude a user mount?
– retorquere
May 20 '18 at 22:34
1
If you add a partition to fstab, it will normally be mounted automatically at boot, and there will be problems, if the partition in not available (if the USB drive is not plugged in). But you can use the mount optionnoauto
, it will not be automatically mounted, yet the mount options are there and the operating system is ready to mount it, whenever you want (and have the USB drive connected). It is enough to specify the device or mount point for examplesudo mount /dev/sdb1
orsudo mount /mnt/sssd
(if you have made and specified the mount point/mnt/sssd
).
– sudodus
May 21 '18 at 5:06
add a comment |
1
The following links may help you, Auto mount, and change mount points on login and Mount NTFS partition in a USB drive with custom permissions and owner -- Add the mount optionnoatime
among the other mount options (in a comma separated list).
– sudodus
May 19 '18 at 18:04
These will play nice with the user-mount that Gnome does on my behalf?
– retorquere
May 19 '18 at 18:11
What I suggest is to mount the drive either via a line in the file/etc/fstab
or a command line withmount
. The same options apply in both cases, and if already mounted, the system should not mount it again. What file systems are there on the drive? How is it mounted now? You can find out by looking into the file/etc/mtab
(when it is mounted).
– sudodus
May 19 '18 at 18:24
It's mounted as /dev/sdb1 /media/emile/ShittySSD ext4 rw,nosuid,nodev,noatime,block_validity,discard,delalloc,nojournal_checksum,barrier,user_xattr,acl 0 0 but wouldn't adding it to fstab preclude a user mount?
– retorquere
May 20 '18 at 22:34
1
If you add a partition to fstab, it will normally be mounted automatically at boot, and there will be problems, if the partition in not available (if the USB drive is not plugged in). But you can use the mount optionnoauto
, it will not be automatically mounted, yet the mount options are there and the operating system is ready to mount it, whenever you want (and have the USB drive connected). It is enough to specify the device or mount point for examplesudo mount /dev/sdb1
orsudo mount /mnt/sssd
(if you have made and specified the mount point/mnt/sssd
).
– sudodus
May 21 '18 at 5:06
1
1
The following links may help you, Auto mount, and change mount points on login and Mount NTFS partition in a USB drive with custom permissions and owner -- Add the mount option
noatime
among the other mount options (in a comma separated list).– sudodus
May 19 '18 at 18:04
The following links may help you, Auto mount, and change mount points on login and Mount NTFS partition in a USB drive with custom permissions and owner -- Add the mount option
noatime
among the other mount options (in a comma separated list).– sudodus
May 19 '18 at 18:04
These will play nice with the user-mount that Gnome does on my behalf?
– retorquere
May 19 '18 at 18:11
These will play nice with the user-mount that Gnome does on my behalf?
– retorquere
May 19 '18 at 18:11
What I suggest is to mount the drive either via a line in the file
/etc/fstab
or a command line with mount
. The same options apply in both cases, and if already mounted, the system should not mount it again. What file systems are there on the drive? How is it mounted now? You can find out by looking into the file /etc/mtab
(when it is mounted).– sudodus
May 19 '18 at 18:24
What I suggest is to mount the drive either via a line in the file
/etc/fstab
or a command line with mount
. The same options apply in both cases, and if already mounted, the system should not mount it again. What file systems are there on the drive? How is it mounted now? You can find out by looking into the file /etc/mtab
(when it is mounted).– sudodus
May 19 '18 at 18:24
It's mounted as /dev/sdb1 /media/emile/ShittySSD ext4 rw,nosuid,nodev,noatime,block_validity,discard,delalloc,nojournal_checksum,barrier,user_xattr,acl 0 0 but wouldn't adding it to fstab preclude a user mount?
– retorquere
May 20 '18 at 22:34
It's mounted as /dev/sdb1 /media/emile/ShittySSD ext4 rw,nosuid,nodev,noatime,block_validity,discard,delalloc,nojournal_checksum,barrier,user_xattr,acl 0 0 but wouldn't adding it to fstab preclude a user mount?
– retorquere
May 20 '18 at 22:34
1
1
If you add a partition to fstab, it will normally be mounted automatically at boot, and there will be problems, if the partition in not available (if the USB drive is not plugged in). But you can use the mount option
noauto
, it will not be automatically mounted, yet the mount options are there and the operating system is ready to mount it, whenever you want (and have the USB drive connected). It is enough to specify the device or mount point for example sudo mount /dev/sdb1
or sudo mount /mnt/sssd
(if you have made and specified the mount point /mnt/sssd
).– sudodus
May 21 '18 at 5:06
If you add a partition to fstab, it will normally be mounted automatically at boot, and there will be problems, if the partition in not available (if the USB drive is not plugged in). But you can use the mount option
noauto
, it will not be automatically mounted, yet the mount options are there and the operating system is ready to mount it, whenever you want (and have the USB drive connected). It is enough to specify the device or mount point for example sudo mount /dev/sdb1
or sudo mount /mnt/sssd
(if you have made and specified the mount point /mnt/sssd
).– sudodus
May 21 '18 at 5:06
add a comment |
1 Answer
1
active
oldest
votes
First run df
to see what device your external drive is, for example, for me the appropriate line looks like this:
/dev/sdc1 4883769340 2392246688 2491522652 49% /media/drew/LACIE-5GB
/media/drew/LACIE-5GB
is where the disk got mounted and the appropriate device is /dev/sdc1
- this can change depending on how many external drives you have and in what order they were connected.
blkid /dev/sdc1
/dev/sdc1: LABEL="LACIE-5GB" UUID="703C31971BEBAA7E" TYPE="ntfs" PTTYPE="dos" PARTLABEL="LACIE-5GB" PARTUUID="6afdadd9-39ce-4875-b747-82cae734ae02"
The UUID is 703C31971BEBAA7E
So one can put a line like this into fstav:
UUID=703C31971BEBAA7E /media/drew/LACIE-5GB ntfs defaults,noauto,noatime,uid=1000,gid=1000,umask=0000,fmask=0111 0 0
Note that noauto
is important - if the drive is not connected on startup and that option is not present, the boot halts and needs to be manually restarted. uid=1000,gid=1000,umask=0000,fmask=0111
are just options for NTFS not to make every file executable (which prompts Nautilus to ask if a file is to be displayed or run when I try to read a txt file, for example). noatime
is the option originally requested.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1038143%2fsetting-mount-options-on-an-usb-drive-automounted-by-gnome%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
First run df
to see what device your external drive is, for example, for me the appropriate line looks like this:
/dev/sdc1 4883769340 2392246688 2491522652 49% /media/drew/LACIE-5GB
/media/drew/LACIE-5GB
is where the disk got mounted and the appropriate device is /dev/sdc1
- this can change depending on how many external drives you have and in what order they were connected.
blkid /dev/sdc1
/dev/sdc1: LABEL="LACIE-5GB" UUID="703C31971BEBAA7E" TYPE="ntfs" PTTYPE="dos" PARTLABEL="LACIE-5GB" PARTUUID="6afdadd9-39ce-4875-b747-82cae734ae02"
The UUID is 703C31971BEBAA7E
So one can put a line like this into fstav:
UUID=703C31971BEBAA7E /media/drew/LACIE-5GB ntfs defaults,noauto,noatime,uid=1000,gid=1000,umask=0000,fmask=0111 0 0
Note that noauto
is important - if the drive is not connected on startup and that option is not present, the boot halts and needs to be manually restarted. uid=1000,gid=1000,umask=0000,fmask=0111
are just options for NTFS not to make every file executable (which prompts Nautilus to ask if a file is to be displayed or run when I try to read a txt file, for example). noatime
is the option originally requested.
add a comment |
First run df
to see what device your external drive is, for example, for me the appropriate line looks like this:
/dev/sdc1 4883769340 2392246688 2491522652 49% /media/drew/LACIE-5GB
/media/drew/LACIE-5GB
is where the disk got mounted and the appropriate device is /dev/sdc1
- this can change depending on how many external drives you have and in what order they were connected.
blkid /dev/sdc1
/dev/sdc1: LABEL="LACIE-5GB" UUID="703C31971BEBAA7E" TYPE="ntfs" PTTYPE="dos" PARTLABEL="LACIE-5GB" PARTUUID="6afdadd9-39ce-4875-b747-82cae734ae02"
The UUID is 703C31971BEBAA7E
So one can put a line like this into fstav:
UUID=703C31971BEBAA7E /media/drew/LACIE-5GB ntfs defaults,noauto,noatime,uid=1000,gid=1000,umask=0000,fmask=0111 0 0
Note that noauto
is important - if the drive is not connected on startup and that option is not present, the boot halts and needs to be manually restarted. uid=1000,gid=1000,umask=0000,fmask=0111
are just options for NTFS not to make every file executable (which prompts Nautilus to ask if a file is to be displayed or run when I try to read a txt file, for example). noatime
is the option originally requested.
add a comment |
First run df
to see what device your external drive is, for example, for me the appropriate line looks like this:
/dev/sdc1 4883769340 2392246688 2491522652 49% /media/drew/LACIE-5GB
/media/drew/LACIE-5GB
is where the disk got mounted and the appropriate device is /dev/sdc1
- this can change depending on how many external drives you have and in what order they were connected.
blkid /dev/sdc1
/dev/sdc1: LABEL="LACIE-5GB" UUID="703C31971BEBAA7E" TYPE="ntfs" PTTYPE="dos" PARTLABEL="LACIE-5GB" PARTUUID="6afdadd9-39ce-4875-b747-82cae734ae02"
The UUID is 703C31971BEBAA7E
So one can put a line like this into fstav:
UUID=703C31971BEBAA7E /media/drew/LACIE-5GB ntfs defaults,noauto,noatime,uid=1000,gid=1000,umask=0000,fmask=0111 0 0
Note that noauto
is important - if the drive is not connected on startup and that option is not present, the boot halts and needs to be manually restarted. uid=1000,gid=1000,umask=0000,fmask=0111
are just options for NTFS not to make every file executable (which prompts Nautilus to ask if a file is to be displayed or run when I try to read a txt file, for example). noatime
is the option originally requested.
First run df
to see what device your external drive is, for example, for me the appropriate line looks like this:
/dev/sdc1 4883769340 2392246688 2491522652 49% /media/drew/LACIE-5GB
/media/drew/LACIE-5GB
is where the disk got mounted and the appropriate device is /dev/sdc1
- this can change depending on how many external drives you have and in what order they were connected.
blkid /dev/sdc1
/dev/sdc1: LABEL="LACIE-5GB" UUID="703C31971BEBAA7E" TYPE="ntfs" PTTYPE="dos" PARTLABEL="LACIE-5GB" PARTUUID="6afdadd9-39ce-4875-b747-82cae734ae02"
The UUID is 703C31971BEBAA7E
So one can put a line like this into fstav:
UUID=703C31971BEBAA7E /media/drew/LACIE-5GB ntfs defaults,noauto,noatime,uid=1000,gid=1000,umask=0000,fmask=0111 0 0
Note that noauto
is important - if the drive is not connected on startup and that option is not present, the boot halts and needs to be manually restarted. uid=1000,gid=1000,umask=0000,fmask=0111
are just options for NTFS not to make every file executable (which prompts Nautilus to ask if a file is to be displayed or run when I try to read a txt file, for example). noatime
is the option originally requested.
answered Jan 12 at 15:54
supsup
2,16222037
2,16222037
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1038143%2fsetting-mount-options-on-an-usb-drive-automounted-by-gnome%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
The following links may help you, Auto mount, and change mount points on login and Mount NTFS partition in a USB drive with custom permissions and owner -- Add the mount option
noatime
among the other mount options (in a comma separated list).– sudodus
May 19 '18 at 18:04
These will play nice with the user-mount that Gnome does on my behalf?
– retorquere
May 19 '18 at 18:11
What I suggest is to mount the drive either via a line in the file
/etc/fstab
or a command line withmount
. The same options apply in both cases, and if already mounted, the system should not mount it again. What file systems are there on the drive? How is it mounted now? You can find out by looking into the file/etc/mtab
(when it is mounted).– sudodus
May 19 '18 at 18:24
It's mounted as /dev/sdb1 /media/emile/ShittySSD ext4 rw,nosuid,nodev,noatime,block_validity,discard,delalloc,nojournal_checksum,barrier,user_xattr,acl 0 0 but wouldn't adding it to fstab preclude a user mount?
– retorquere
May 20 '18 at 22:34
1
If you add a partition to fstab, it will normally be mounted automatically at boot, and there will be problems, if the partition in not available (if the USB drive is not plugged in). But you can use the mount option
noauto
, it will not be automatically mounted, yet the mount options are there and the operating system is ready to mount it, whenever you want (and have the USB drive connected). It is enough to specify the device or mount point for examplesudo mount /dev/sdb1
orsudo mount /mnt/sssd
(if you have made and specified the mount point/mnt/sssd
).– sudodus
May 21 '18 at 5:06