Read-only bind mount using fstab and systemd

I'd like to have read-only bind mount in fstab. I've read that proper solution of that problem is adding to /etc/fstab those lines:
/src/dir   /dst/dir    none   bind   0 0
/src/dir   /dst/dir   none   remount,bind,ro   0 0
I know it works on non-systemd enviroments (Debian) but with systemd I get error message from systemd-fstab-generator during startup about duplicate entry in /etc/fstab and my mount point is not read-only. Does anyone have better solution than running a script?

R00KIE wrote:
You could use the "alternative" way of doing it, which is exemplified in the manual page: '
mount --bind olddir newdir
mount -o remount,ro,bind olddir newdir
Here I can reproduce your problem but the "alternative" way seems to work fine.
That's not the alternative way, that's the only way. Though, you don't need to specify both the source and dest on the remount -- just the dest.
Last edited by falconindy (2012-01-31 13:32:12)

Similar Messages

  • Read-only bind mounts not working properly

    Hello,
    I discovered a strange behavior regarding mount --bind on my system. In the past I could create read-only bind mounts using first a mount --bind /source /dest and after that mount -o remount,ro /dest. But since some kernel update (not sure which) this procedure results in the complete filesystem of the source being remounted read-only, not only the /dest mountpoint. I also saw that bind-mounts are not shown as such in the outbput of mount:
    the mountpoint was created using
    mount --bind /mnt/data/Backup/vserver/Daten /mnt/data/homes/vserver/Daten
    and results in the following output of mount:
    /dev/mapper/data on /mnt/data/homes/vserver/Daten type ext4 (rw,noatime,nodiratime,user_xattr,acl,barrier=1,stripe=64,data=ordered)
    so its reported as if i mounted the parent fs (/dev/mapper/data on /mnt/data) to the directory.
    Does anyone know what caused this behavior, and how to get read-only bind-mounts back to a working condition?
    Thanks in advance,
    seiichiro0185

    R00KIE wrote:
    You could use the "alternative" way of doing it, which is exemplified in the manual page: '
    mount --bind olddir newdir
    mount -o remount,ro,bind olddir newdir
    Here I can reproduce your problem but the "alternative" way seems to work fine.
    That's not the alternative way, that's the only way. Though, you don't need to specify both the source and dest on the remount -- just the dest.
    Last edited by falconindy (2012-01-31 13:32:12)

  • Error : A READ-ONLY bind variable used in OUT or IN-OUT context

    Hi,
    I got error from my report as A READ-ONLY bind variable used in OUT or IN-OUT context in formula column. I already face this problem but at that time i cleared , but now i cont able to do, please give suggestion to this
    regards
    venki

    I find my ERROR in that report, that A READ-ONLY bind variable used in OUT or IN-OUT context is
    when we assign a database column in a placeholder are summary column.
    From that placeholder or summary column will call by formula column
    you might be face that error, But how means
    when that database column , we are assign that decode, case or NVL funtion using else condition as Null you may be face that error.
    Without my knowledge it may seem some other problem also
    without any idea we con't able to clear this error.
    venki

  • Error A READ-ONLY bind variable used in OUT or IN-OUT context (report6i)

    cf_1 cf_2 balance
    a 1 3 2
    b 3 2 1
    c 3 3 0
    tot=7 8 3
    i am using conditional formatting to hide the cf_1 and cf_2 if balance=0
    now i want to display tot should be
    cf_1 cf_2 balance
    a 1 3 2
    b 3 2 1
    tot=4 5 3
    tot=a+b+c
    how can i exclude the hided columns from the total

    You'll probably need a Program Unit along the lines of:
    DECLARE
    BEGIN
    IF balance = 0 THEN
    cf1 := 0;
    cf2: =0;
    END IF;
    balance := cf1+cf2 + .......
    Cheers.
    N.

  • External hard disc is read only on my MacBook air and I can't safe and export files on it, how can I change that

    My external hard drive is read only on my MacBook air and I cand safe  or export files to it. How can I change this so I can use the external hard drive to export my files and work on an other pc.

    Eject and disconnect the drive (and its power supply, if it has a separate one) for a few moments, then restart it.  Restart your Mac, then reconnect the drive.
    If that doesn't help, the directory structure may be damaged.  See if you can Repair it, per #6 in Using Disk Utility.

  • I HAVE A MAC G5 WITH V10.4 TIGER OS, I AM HAVING TROUBLE WITH THE LETTER "N" ONLY WHEN I USE CAPS AND SHIFT KEYS DOSE IT TYPE THE LETTER "N"SE

    HAVE A MAC G5 WITH V10.4 TIGER OS, I AM HAVING TROUBLE WITH THE LETTER "N" ONLY WHEN I USE CAPS AND SHIFT KEYS DOSE IT TYPE THE LETTER "N". I HAVE CONNECTED A NEW KEYBOARD BUT THE PROBLEM STILL EXIST. WHAT ELSE CAN I DO?

    You might look at "Keyboard Shortcuts" in the Keyboard and Mouse preference pane and see if somehow the lower case n has been inadvertently assigned to something.
    Probably the best solution would be to click the "Restore Defaults" button.

  • Read Only Display of Radio group and Text area with counter not working

    Hello,
    I am using Apex 3.2, with 10g for the database
    I have this form, with fields that will set to read only when status = 'closed'
    All of the fields display as read only except for 2. I cannot figure out why this is not working correctly.
    1st field is Issues that is a text area with character counter, with a sql query behind it, that is set to null unless the query is pulling in the data.
    2nd field is Status which is a radio group that will not display as read only when status = 'closed'
    I have other fields on the form with the same format and they change to read only when the status = 'closed', I have even copied the pl/sql expression from one field to these fields and it still doesn't work correctly. I have also tried javascript for an on load event, which works, but once I click on the save button, it disables all of the page items, which works correctly, but I purposely forget to enter information, to make sure the validations are firing correctly, which it does, but the script disables everything, not allowing me to correct the errors. The javascript is firing on the on page load event.
    Any help on this is greatly appreciated.
    Mary

    Dung,
    That API seems to have a bug, it returns true/false/null, so you could use 'return not nvl(htmldb_util.current_user_in_group(p_group_name => 'APP Admin'),false)' to get a false value.
    Unfortunately there's another problem: using the read-only attributes for checkbox or radiogroup item makes them hidden. My suggestion would be to create another item that has disabled="disabled" in the HTML Form Element attribute in the item definition and display that item or the non-disabled item alternately, using conditions based on the current_user_in_group logic.
    Scott

  • Read Only privileges for Access Server and Identity Server - OAM 10g

    Hi,
    I am working on Oracle Access Manager 10g version 10.1.4.
    I use an administrative account that is a member of the 'COREid Administrators' group to log into the access console and identity console of OAM.
    Since this is the administrative account, it has the rights to modify and update all access/identity entities.
    How can I set up an account that has "view only" privileges over all access and identity objects in OAM?
    I need to log into the access and identity consoles of OAM and view all policy domains/policies/access system configuration/user manager config/group manager config etc bt not be able to modify any of them.
    Is there a way to setup such an account in OAM?
    Regards,
    Abhishek.

    Hi Abhishek,
    It is possible to define different levels of administrator, but it is not possible to give an admin read access (to objects in the consoles) without also giving modify access. I do not believe that there is a straightforward way to meet this requirement - for the Access System you could use the Policy Manager API and write your own interface (which does not have the ability to modify) but obviously this would be some development effort.
    Regards,
    Colin

  • Read-Only Text Field Using JavaScript Code

    I'd like to make a text field read-only by using JavaScript and also having IF & ELSE statements.
    I want it to be like this:
    if the answer from the dropdown menu is YES, then the text field is read only but if the answer is NO then the text field is fillable.
    Thanks in advance

    Use this code as the custom validation script of the drop-down in question:
    this.getField("Text1").readonly = (event.value=="Yes");

  • OA Framework,how to make field Read-Only which is used inside Switch case

    Hi all,
    Using Personalization in OA Framework, when I am trying to make field read only, which is inside Swich statement ,then that field get automatically hidden.but my purpose is to make that field read-only not hide.
    My field name is Proposed Annual Increase Amount .
    The Personalization swtich case lookslike this :-
    Field Name Shown
    Switcher: Proposed Annual Increase Amount Yes
    case_name_HrPRateAnnTotInputSs
    Message Text Input: New Annual Amount Yes
    case_name_HrPRateAnnInputSs
    Message Text Input: Annual Pay Rate Yes
    case_name_HrPRateCurrAnnSalSs
    Message Styled Text: Pay Rate
    Regards,
    Mxj2930

    Can you be a bit clear on your requirement. If you have a switcher to display a field based on some condition, the other fields will not get displayed. I did not get as to what you mean by "my purpose is to make that field read-only not hide.".
    Are you talking about the case, when the "New Annual Amount" (or) "Annual Pay Rate" fields are displayed conditionally, you want them to be read-only and not editable. If this is the case, set the read-only property of these fields to true.

  • Read only text Items uses the maximum width

    Folks,
    I have a form with 3 regions and each region has 6 or more text items each with a different width (40, 30 24, 2...). I am using a Read Only Condition Type on all these items to disable them. I am setting the background color as bgcolor="#DCDCDC" in the Read Only Element Table Cell Attributes.
    All my elements are disabled (Gray color) but with the maximum width of 40 bytes. I don't want a 2 byte text item 40 bytes long and grayed out. How can I set a specific width for individual items in Read only Condition? Please help
    Thanks
    Raje.

    Try this alternative by disabling the HTML Form Item at the required process point.
    I added this JavaScript to the HTML Header of the page which will allow me to disable the required item, plus set its background and color:-
    <script language="JavaScript1.1" type="text/javascript">
        function disableFormItem(p_item, p_background, p_color){
                        disItem = document.getElementById(p_item);
                        disItem.style.background = p_background;
                        disItem.disabled = true;
                        disItem.style.color = p_color;
    </script>In the Region Footer of the Region where my items are located I added this JavaScript code:-
    <script language="JavaScript" type="text/javascript">
       ** Only disable the required Form Items if the Primary Key value is present,
       ** in this case it is P12_UEI. (Won't be present for new records as populated
       ** by on-insert db trigger and sequence.)
       if (html_GetElement('P12_UEI').value > 0)
          disableFormItem('P12_URESI', 'lightyellow', 'black');
          disableFormItem('P12_UZI', 'lightgray', 'black');
          disableFormItem('P12_UBI', 'lightgray', 'black');
    </script> The resulting page is a lot better looking than using the APEX read only text item.
    Regards,
    Phil

  • Read Only Model via package protection and delegation

    I have a model that I have made read only to most client code by use of package protection and delegation.
    Changes are made to the model via a delegate inside the model's package (more precisely with a delegate that uses commands) .
    I am unhappy about the design for two reasons, 1. it is annoying to always have keep the delegate up to date with changes to the model 2. the package is getting very big and I would like to start splitting the packages up into say subpackages (package protection does not work with subpackages does it?).
    Does anyone have any suggestions how I could address these weaknesses in the design?
    thanks

    One way is to provide a copy to the client, the client could update their copy but only your copy would be the master.
    This way the client would use the same classes you do.
    Or you could generate the delegates from the model.

  • Read Only HTML Forms using adobe livecycle Output ES

    Hi,
    We have a requirement to display the adobe html forms in read-only format. got to know from adobe consultants that Adobe Livecycle Output ES has this feature. but i am not able to find out any services or components that would give me this functionality.
    Is there a way to get these readonly forms using Adobe Livecycle Output ES.

    Dear Dfoto,
    Thank you so much for being so kind to spend the effort and reply back, I though my question was left behind the sun... but now I am very happy in deed.
    To be more specific, the Form has 2 parts. The first part "Subform1" any one can fill and sign.
    The second part "Subform2", only certain users can fill and sign.
    I think I found a very strong lead to my solution, when I was playing with LiveCycle Desinger few days ago.
    On the Singature Field Advanced Setting, there is a place you can attach the public part of a certificate (Digital Signature) of any user, one or more.
    In this part, you tell LC that only those users "signing parties" can sign the field. I tested it and it worked.
    Now, if I can use this feature via JavaScript to find out if the user who is filling the form, can sign this field, then he can fill the form. If he cannot sign the field, then he cannot fill the form. I can do that by setting the "access" property of the Subform. Another solution is that I can prevent the user from hitting the "Submit" button unless he signes the designated Signature Field.
    I have another small issue:
    I found out that if the Signature field is part of a repeating dynamic Subform, it will not work during run-time. Very bad in deed. While I cannot understand why ?, I tool this as "By Desing" feature.
    Now, if the Signature is locking parts of forms which has dynamic content (repeating subforms), it will always show somthing like "Signature is corrupted or form was changed after it was signed".
    Is this normal ? Is there a way to control Dynamic Forms using Digital Signatures without such annoying issues ?
    Thank you.

  • I cannot delete calendar entries from my Iphone 5. It says they all are read only. I went back and I cannot find the main. It was deleted. I clicked save future events when I did this accidentally.

    I cannot delete a repeated appointment in my calendar. I deleted the main and accidentally hit save future dates. I tried to delete each future date but there was no edit function. I then clicked the calendar and i could change it but they all display read only cannot delete.

    Were the photos taken by your new iPhone?  If so, did you not import them off your phone to your computer (as you would any other digital camera) before the restore?  If not, restoring wiped the data off the phone and your pictures are gone.
    Sounds like a good time to (re)read the User Guide.

  • Unable to get values within scope of the RowGroup(only got values using Previous and current scope value)

    Hi All,
    I already calculated a row(Add Total row) like  Gross profit within Group1 (a,b,c,d,e which are sub groups) using Previous and current scope column group values. ex: Gross Profit = a - b. (within group1)
    Gross Profit = Previous(Sum(Fields!Trans_amount.Value)) - Sum(Fields!Trans_amount.Value) in Group1
    Now, I want to get values for Net income like  Net income = a - b - c in Group1.  (OR)
    Net income = Gross  Profit - c in Group1 (Using Gross Profit textbox values using Reportitems!textbox.value). but, values different.  Since Expression got new calculation)
     Please help me.
    Thanks Advance.
    - Prem Kumar T D http://www.sharepointbasic.com/

    Hi Premtd,
    As per my understanding, there are group and subgroups in the report, you added total to a group with the expresson: Previous(Sum(Fields!Trans_amount.Value)) - Sum(Fields!Trans_amount.Value). You want to add a text box to the report to calculate Net income
    with the expression: Previous(Sum(Fields!Trans_amount.Value)) - Sum(Fields!Trans_amount.Value) - Sum(Fields!Trans_amount.Value). In order to improve the efficiency of troubleshooting, I need to ask several questions:
    • “I already calculated a row(Add Total row) like  Gross profit within Group1 (a,b,c,d,e which are sub groups)” What’s the meaning of Group1 and subgroup a, b, c, d, e ? Could you please mark Gross profit and the groups in the screenshot?
    • How to calculate Net income? Please provide some more detailed information of your requirements. I would be appreciated it if you could provide sample data and clear screenshot of the report.
    This may be a lot of information to ask for at one time. However, by collecting this information now, it will help us move more quickly toward a solution.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu

Maybe you are looking for

  • Problem with .war files

              I have created a .war file with my servlets in           /WEB-INF/classes directory and all other classes jared into a single jar file           in /WEB-INF/lib,but on calling the servlet only those classes that the servlet           uses d

  • Cannot Open System Preferecnes

    Out of nowhere I am unable to open System Preferences (the fourth choice down under the Blue Apple). Nothing happens when I click on "system Preferences. The System Preferences Icon can be found in my Dock with a big Question Mark on it. Addtionally

  • Open password protected worksheet in E71

    Hello whenever i try to open any password protected file on my phone it passes me error. It also passes different error for two files viz: unable to open password protected file unable to open file I have quick office version 4.1.37.3 Which version w

  • New Epson printer compatibility problem?

    Hello! I'm trying to set up a new printer for my parents, who have the iMac G4 running 10.4.11. My brother-in-law bought an Epson XP-200 Small-in-One printer.  On the Epson support page for drivers for this printer, I selected Mac OSX 10.4.x, and the

  • Settings problem in Album

    Hello there nice people, I have some issue with my Album app on my Sony Xperia E1, so when I go to Settings in Album there should something appear (I guess).. but when I click on it it just stays blank my version is 6.3.A.0.12 here is image below. Th