Results 1 to 7 of 7

Thread: Mount options fail when remounting Logical Volume

  1. #1
    Join Date
    Apr 2006
    Location
    Perth, Australia
    Beans
    70
    Distro
    Ubuntu 12.04 Precise Pangolin

    Question Mount options fail when remounting Logical Volume

    Hi I have several logical volumes on my kubuntu Hardy install.

    My problem is that if I try to remount one of the filesystems the -o tag does not take effect and the filesystem is instead remounted rw 0 0

    Code:
    $ cat /etc/mtab | grep /var/www
    /dev/mapper/VG_JW_Laptop-LV_www /var/www ext3 ro,noexec,nosuid,nodev,relatime 0 0
    
    $ sudo mount -o remount ro,exec,nosuid,nodev,relatime /var/www/
    
    $ cat /etc/mtab | grep /var/www 
    /dev/mapper/VG_JW_Laptop-LV_www /var/www ext3 rw 0 0
    Is there a special way of remounting Logical Volumes?

    This is doing my head in
    Cheers

  2. #2
    Join Date
    Apr 2006
    Location
    Perth, Australia
    Beans
    70
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Mount options fail when remounting Logical Volume

    Bugger, I still haven't found the answer to this.

    Can anyone tell me if they have the same problem
    I'm using kubuntu 8.04 installed via the alternative CD.
    lvm2 version 2.02.26-1ubunt
    mount version 2.13.1-5ubuntu

    Cheers

  3. #3
    Join Date
    Dec 2007
    Location
    California
    Beans
    4,954
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Mount options fail when remounting Logical Volume

    Couldn't you use lvchange to make the logical volume read-only?

    Code:
    sudo lvchange -p r /dev/volume\ group/logical\ volume
    --edit-- testing it I seem to have the same problem and after using lvchange -p r I can still write to the volume so I'd have to look into though I am curious, it's 1:06 am here and I need sleep lol.
    Last edited by jerome1232; January 29th, 2009 at 10:05 AM.
    "You can't expect to hold supreme executive power just because some watery tart lobbed a sword at you"

    "Don't let your mind wander -- it's too little to be let out alone."

  4. #4
    Join Date
    Feb 2007
    Beans
    4,045
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Mount options fail when remounting Logical Volume

    Try with:
    Code:
    sudo mount -o remount,ro,exec,nosuid,nodev,relatime /var/www/

  5. #5
    Join Date
    Apr 2006
    Location
    Perth, Australia
    Beans
    70
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Mount options fail when remounting Logical Volume

    Thanks so much for your help.

    The problem was that I was not entering the mount command properly (there is no example in the man page!)

    I was going
    Code:
    sudo mount -o remount ro,exec,nosuid,nodev,relatime /var/www
    when what I needed to do was
    Code:
    sudo mount -o remount,ro,exec,nosuid,nodev,relatime /var/www/
    Needed a COMMA NOT A SPACE between remount and ro

    So simple and yet so hard to google for.

    Thanks again.

  6. #6
    Join Date
    Apr 2006
    Location
    Perth, Australia
    Beans
    70
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Mount options fail when remounting Logical Volume

    Hmm, Don't seem to be able to set this thread to SOLVED.

    I thought I went to Thread Tools -> Mark as Solved but There's no option for that there. Am I looking in the wrong place? Where else could it be?

  7. #7
    Join Date
    Dec 2007
    Location
    California
    Beans
    4,954
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Mount options fail when remounting Logical Volume

    That feature has been temporarily disabled.
    "You can't expect to hold supreme executive power just because some watery tart lobbed a sword at you"

    "Don't let your mind wander -- it's too little to be let out alone."

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •