How to mount LVM Volumes with myself as owner in fstab

Clash Royale CLAN TAG#URR8PPP up vote
1
down vote
favorite
I have two LVM volumes that I'm trying to add to /etc/fstab. I am able to make it work with defaults option, but with that I end up with the mounts being owned by root. I want to mount them so that I'm the owner and don't have to use sudo anytime I'm changing them.
If I try to add uid and gid flags to the fstab entries, I get the following error:
mount: /home/hooda/code: wrong fs type, bad option, bad superblock on /dev/mapper/vg_kdata-kcode, missing codepage or helper program, or other error.
Here are the contents of my /etc/fstab file (note that I already use similar options for regular Windows NTFS volumes, and those are working as expected)
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p5 during installation
UUID=66e020ab-aa78-4bb9-a625-398f3f8b53b1 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=28E7-8A33 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
UUID=50F80317F802FACC /media/Games ntfs-3g defaults,windows_names,locale=en_IN.utf8,uid=1000,gid=1000,dmask=027,fmask=137 0 0
UUID=5A243C15243BF31D /media/Stuff ntfs-3g defaults,windows_names,locale=en_IN.utf8,uid=1000,gid=1000,dmask=027,fmask=137 0 0
UUID=0C640848640836CC /media/Windows ntfs defaults,umask=222,ro,windows_names,locale=en_IN.utf8,uid=1000,gid=1000,dmask=027,fmask=137 0 0
/dev/vg_kdata/kcode /home/hooda/code ext4 defaults,uid=1000,gid=1000 0 0
/dev/vg_kdata/kdata /home/hooda/kdata ext4 defaults,uid=1000,gid=1000 0 0
I'm using Kubuntu 18.04.
permissions mount 18.04 fstab lvm
add a comment |Â
up vote
1
down vote
favorite
I have two LVM volumes that I'm trying to add to /etc/fstab. I am able to make it work with defaults option, but with that I end up with the mounts being owned by root. I want to mount them so that I'm the owner and don't have to use sudo anytime I'm changing them.
If I try to add uid and gid flags to the fstab entries, I get the following error:
mount: /home/hooda/code: wrong fs type, bad option, bad superblock on /dev/mapper/vg_kdata-kcode, missing codepage or helper program, or other error.
Here are the contents of my /etc/fstab file (note that I already use similar options for regular Windows NTFS volumes, and those are working as expected)
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p5 during installation
UUID=66e020ab-aa78-4bb9-a625-398f3f8b53b1 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=28E7-8A33 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
UUID=50F80317F802FACC /media/Games ntfs-3g defaults,windows_names,locale=en_IN.utf8,uid=1000,gid=1000,dmask=027,fmask=137 0 0
UUID=5A243C15243BF31D /media/Stuff ntfs-3g defaults,windows_names,locale=en_IN.utf8,uid=1000,gid=1000,dmask=027,fmask=137 0 0
UUID=0C640848640836CC /media/Windows ntfs defaults,umask=222,ro,windows_names,locale=en_IN.utf8,uid=1000,gid=1000,dmask=027,fmask=137 0 0
/dev/vg_kdata/kcode /home/hooda/code ext4 defaults,uid=1000,gid=1000 0 0
/dev/vg_kdata/kdata /home/hooda/kdata ext4 defaults,uid=1000,gid=1000 0 0
I'm using Kubuntu 18.04.
permissions mount 18.04 fstab lvm
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have two LVM volumes that I'm trying to add to /etc/fstab. I am able to make it work with defaults option, but with that I end up with the mounts being owned by root. I want to mount them so that I'm the owner and don't have to use sudo anytime I'm changing them.
If I try to add uid and gid flags to the fstab entries, I get the following error:
mount: /home/hooda/code: wrong fs type, bad option, bad superblock on /dev/mapper/vg_kdata-kcode, missing codepage or helper program, or other error.
Here are the contents of my /etc/fstab file (note that I already use similar options for regular Windows NTFS volumes, and those are working as expected)
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p5 during installation
UUID=66e020ab-aa78-4bb9-a625-398f3f8b53b1 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=28E7-8A33 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
UUID=50F80317F802FACC /media/Games ntfs-3g defaults,windows_names,locale=en_IN.utf8,uid=1000,gid=1000,dmask=027,fmask=137 0 0
UUID=5A243C15243BF31D /media/Stuff ntfs-3g defaults,windows_names,locale=en_IN.utf8,uid=1000,gid=1000,dmask=027,fmask=137 0 0
UUID=0C640848640836CC /media/Windows ntfs defaults,umask=222,ro,windows_names,locale=en_IN.utf8,uid=1000,gid=1000,dmask=027,fmask=137 0 0
/dev/vg_kdata/kcode /home/hooda/code ext4 defaults,uid=1000,gid=1000 0 0
/dev/vg_kdata/kdata /home/hooda/kdata ext4 defaults,uid=1000,gid=1000 0 0
I'm using Kubuntu 18.04.
permissions mount 18.04 fstab lvm
I have two LVM volumes that I'm trying to add to /etc/fstab. I am able to make it work with defaults option, but with that I end up with the mounts being owned by root. I want to mount them so that I'm the owner and don't have to use sudo anytime I'm changing them.
If I try to add uid and gid flags to the fstab entries, I get the following error:
mount: /home/hooda/code: wrong fs type, bad option, bad superblock on /dev/mapper/vg_kdata-kcode, missing codepage or helper program, or other error.
Here are the contents of my /etc/fstab file (note that I already use similar options for regular Windows NTFS volumes, and those are working as expected)
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme0n1p5 during installation
UUID=66e020ab-aa78-4bb9-a625-398f3f8b53b1 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/nvme0n1p2 during installation
UUID=28E7-8A33 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
UUID=50F80317F802FACC /media/Games ntfs-3g defaults,windows_names,locale=en_IN.utf8,uid=1000,gid=1000,dmask=027,fmask=137 0 0
UUID=5A243C15243BF31D /media/Stuff ntfs-3g defaults,windows_names,locale=en_IN.utf8,uid=1000,gid=1000,dmask=027,fmask=137 0 0
UUID=0C640848640836CC /media/Windows ntfs defaults,umask=222,ro,windows_names,locale=en_IN.utf8,uid=1000,gid=1000,dmask=027,fmask=137 0 0
/dev/vg_kdata/kcode /home/hooda/code ext4 defaults,uid=1000,gid=1000 0 0
/dev/vg_kdata/kdata /home/hooda/kdata ext4 defaults,uid=1000,gid=1000 0 0
I'm using Kubuntu 18.04.
permissions mount 18.04 fstab lvm
asked May 17 at 12:28
hoodakaushal
198215
198215
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
FWIW, I removed the uid and gid options for the LVM volumes, then I tried to do chown on the mount points:
sudo chown -R hooda:hooda /home/hooda/code
And so far it seems to be working across mounts.
Though I'm sure there's a better way to do it. Good enough for me though.
1
That is how you do it. uid ang gid is for fat/ntfs . use theuserorusersoption in fstab to allow users (rather than just root) to mount / unmount
â Panther
May 17 at 15:09
1
see manpages.ubuntu.com/manpages/xenial/man5/fstab.5.html and help.ubuntu.com/community/Fstab . For file system specific options see linux.die.net/man/8/mount . It is a long page, scroll down, there are "Filesystem Independent Mount Options" and then "Filesystem Specific Mount Options" by file system (ext2/3/4 , vfat, ntfs, etc). You can use those mount options in the fstab options field per file system
â Panther
May 17 at 15:18
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
FWIW, I removed the uid and gid options for the LVM volumes, then I tried to do chown on the mount points:
sudo chown -R hooda:hooda /home/hooda/code
And so far it seems to be working across mounts.
Though I'm sure there's a better way to do it. Good enough for me though.
1
That is how you do it. uid ang gid is for fat/ntfs . use theuserorusersoption in fstab to allow users (rather than just root) to mount / unmount
â Panther
May 17 at 15:09
1
see manpages.ubuntu.com/manpages/xenial/man5/fstab.5.html and help.ubuntu.com/community/Fstab . For file system specific options see linux.die.net/man/8/mount . It is a long page, scroll down, there are "Filesystem Independent Mount Options" and then "Filesystem Specific Mount Options" by file system (ext2/3/4 , vfat, ntfs, etc). You can use those mount options in the fstab options field per file system
â Panther
May 17 at 15:18
add a comment |Â
up vote
0
down vote
accepted
FWIW, I removed the uid and gid options for the LVM volumes, then I tried to do chown on the mount points:
sudo chown -R hooda:hooda /home/hooda/code
And so far it seems to be working across mounts.
Though I'm sure there's a better way to do it. Good enough for me though.
1
That is how you do it. uid ang gid is for fat/ntfs . use theuserorusersoption in fstab to allow users (rather than just root) to mount / unmount
â Panther
May 17 at 15:09
1
see manpages.ubuntu.com/manpages/xenial/man5/fstab.5.html and help.ubuntu.com/community/Fstab . For file system specific options see linux.die.net/man/8/mount . It is a long page, scroll down, there are "Filesystem Independent Mount Options" and then "Filesystem Specific Mount Options" by file system (ext2/3/4 , vfat, ntfs, etc). You can use those mount options in the fstab options field per file system
â Panther
May 17 at 15:18
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
FWIW, I removed the uid and gid options for the LVM volumes, then I tried to do chown on the mount points:
sudo chown -R hooda:hooda /home/hooda/code
And so far it seems to be working across mounts.
Though I'm sure there's a better way to do it. Good enough for me though.
FWIW, I removed the uid and gid options for the LVM volumes, then I tried to do chown on the mount points:
sudo chown -R hooda:hooda /home/hooda/code
And so far it seems to be working across mounts.
Though I'm sure there's a better way to do it. Good enough for me though.
answered May 17 at 12:39
hoodakaushal
198215
198215
1
That is how you do it. uid ang gid is for fat/ntfs . use theuserorusersoption in fstab to allow users (rather than just root) to mount / unmount
â Panther
May 17 at 15:09
1
see manpages.ubuntu.com/manpages/xenial/man5/fstab.5.html and help.ubuntu.com/community/Fstab . For file system specific options see linux.die.net/man/8/mount . It is a long page, scroll down, there are "Filesystem Independent Mount Options" and then "Filesystem Specific Mount Options" by file system (ext2/3/4 , vfat, ntfs, etc). You can use those mount options in the fstab options field per file system
â Panther
May 17 at 15:18
add a comment |Â
1
That is how you do it. uid ang gid is for fat/ntfs . use theuserorusersoption in fstab to allow users (rather than just root) to mount / unmount
â Panther
May 17 at 15:09
1
see manpages.ubuntu.com/manpages/xenial/man5/fstab.5.html and help.ubuntu.com/community/Fstab . For file system specific options see linux.die.net/man/8/mount . It is a long page, scroll down, there are "Filesystem Independent Mount Options" and then "Filesystem Specific Mount Options" by file system (ext2/3/4 , vfat, ntfs, etc). You can use those mount options in the fstab options field per file system
â Panther
May 17 at 15:18
1
1
That is how you do it. uid ang gid is for fat/ntfs . use the
user or users option in fstab to allow users (rather than just root) to mount / unmountâ Panther
May 17 at 15:09
That is how you do it. uid ang gid is for fat/ntfs . use the
user or users option in fstab to allow users (rather than just root) to mount / unmountâ Panther
May 17 at 15:09
1
1
see manpages.ubuntu.com/manpages/xenial/man5/fstab.5.html and help.ubuntu.com/community/Fstab . For file system specific options see linux.die.net/man/8/mount . It is a long page, scroll down, there are "Filesystem Independent Mount Options" and then "Filesystem Specific Mount Options" by file system (ext2/3/4 , vfat, ntfs, etc). You can use those mount options in the fstab options field per file system
â Panther
May 17 at 15:18
see manpages.ubuntu.com/manpages/xenial/man5/fstab.5.html and help.ubuntu.com/community/Fstab . For file system specific options see linux.die.net/man/8/mount . It is a long page, scroll down, there are "Filesystem Independent Mount Options" and then "Filesystem Specific Mount Options" by file system (ext2/3/4 , vfat, ntfs, etc). You can use those mount options in the fstab options field per file system
â Panther
May 17 at 15:18
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%2faskubuntu.com%2fquestions%2f1037389%2fhow-to-mount-lvm-volumes-with-myself-as-owner-in-fstab%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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