mkinitrd unification across distributions
 help / color / mirror / Atom feed
* Dracut NFS root rw before pivot but ro after pivot
@ 2010-10-05  1:42 daniel-2N1FInP7wozQT0dZR+AlfA
       [not found] ` <20101005124250.12811x7b1hr8g23k-2RFepEojUI3Y3UUic/vCjNBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: daniel-2N1FInP7wozQT0dZR+AlfA @ 2010-10-05  1:42 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Hi Guys,

I can boot an NFS root however when Dracut pivots the NFS becomes read-only.

The pxelinux.cfg files:

APPEND bootdev=eth1 ip=dhcp  
root=nfs:10.197.170.5:/vol/filerboot/linux/images/live-mon-test:fg,nfsvers=3,timeo=600,retrans=2,rsize=32768,wsize=32768,hard,nointr,actimeo=3600,tcp,noacl,rw initrd=initrd-2.6.34-gentoo-r1-dracut  
rw

When I set rdbreak=pre-pivot and I issue a mount command the /sysroot  
is mounted with rw and I can touch a file on the nfs.

Something happens after the pivot occurs and the volume be no longer  
writable as I get permission denied errors as services start-up.

Does anyone have any suggestions on the possible cause?

Thanks




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Dracut NFS root rw before pivot but ro after pivot
       [not found] ` <20101005124250.12811x7b1hr8g23k-2RFepEojUI3Y3UUic/vCjNBPR1lH4CV8@public.gmane.org>
@ 2010-10-05  5:52   ` daniel-2N1FInP7wozQT0dZR+AlfA
       [not found]     ` <20101005165245.12962kslvxq6cmyo-2RFepEojUI3Y3UUic/vCjNBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: daniel-2N1FInP7wozQT0dZR+AlfA @ 2010-10-05  5:52 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Quoting daniel-2N1FInP7wozQT0dZR+AlfA@public.gmane.org:

> Does anyone have any suggestions on the possible cause?

I've been doing some more investigating and found the following during boot:

[snip]
Remounting root filesystem read/write ...
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd

Root filesystem cannot be mounted read/write
[/snip]

I'm running Gentoo. Just wondering if dracut is meant to start  
rpc.statd before Gentoo does?

I've set rpc.statd to start however I think it needs to start prior to  
the Root filesystem mounting.

Suggestions would be much appreciated.

Thanks

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Dracut NFS root rw before pivot but ro after pivot
       [not found]     ` <20101005165245.12962kslvxq6cmyo-2RFepEojUI3Y3UUic/vCjNBPR1lH4CV8@public.gmane.org>
@ 2010-10-05  6:48       ` daniel-2N1FInP7wozQT0dZR+AlfA
       [not found]         ` <20101005174817.98833aq1pzqn2cds-2RFepEojUI3Y3UUic/vCjNBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: daniel-2N1FInP7wozQT0dZR+AlfA @ 2010-10-05  6:48 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org


> Quoting daniel-2N1FInP7wozQT0dZR+AlfA@public.gmane.org:
> I'm running Gentoo. Just wondering if dracut is meant to start  
> rpc.statd before Gentoo does?
>
> I've set rpc.statd to start however I think it needs to start prior  
> to the Root filesystem mounting.

I have determine the NFS mount is rw until udev runs!

Does anyone know how to debug this?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Dracut NFS root rw before pivot but ro after pivot
       [not found]         ` <20101005174817.98833aq1pzqn2cds-2RFepEojUI3Y3UUic/vCjNBPR1lH4CV8@public.gmane.org>
@ 2010-10-07  1:29           ` daniel-2N1FInP7wozQT0dZR+AlfA
       [not found]             ` <20101007122935.19334qntub6vdeo0-2RFepEojUI3Y3UUic/vCjNBPR1lH4CV8@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: daniel-2N1FInP7wozQT0dZR+AlfA @ 2010-10-07  1:29 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Hi Guys,

After reviewing this I found my observations were incorrect.

I have since tried NFSv4 with the same result. I'm now back using NFSv3.

I am booting to pre-pivot rdbreak=pre-pivot.

If I cd /sysroot/tmp (as I did previously) and ../bin/touch test the  
test file is created however the permissions are nobody:nobody:

-rw---- 1 nobody nobody 0 Oct    7 11:47 test

If I try the same in /sysroot i.e. ./bin/touch test I then get:  
Permission denied

For some reason the NFS is seeing the root UID.

The mount options are  
10.197.170.5:/vol/filerboot/linux/images/live-mon-test /sysroot -o  
rw,fg,timeo=6000,retrans=2,rsize=32768,wsize=32768,hard,nointr,noacl,tcp,nfsver=3,nolock,sec=sys

If I chroot into /sysroot and do id it returns with:
uid=0(root) gid=0(root) groups=0(root)

however files get created with the nobody attribute in /tmp?

rpcbind appears to be running as the root user.

When I try to start services such as rpc.statd within the chroot I  
get: superuser access required.

Any ideas?




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Dracut NFS root rw before pivot but ro after pivot
       [not found]             ` <20101007122935.19334qntub6vdeo0-2RFepEojUI3Y3UUic/vCjNBPR1lH4CV8@public.gmane.org>
@ 2010-10-07  7:24               ` Luca Berra
       [not found]                 ` <20101007072427.GA30734-hdG+WfPrfN2JmafXlB/IVQ@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Luca Berra @ 2010-10-07  7:24 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

On Thu, Oct 07, 2010 at 12:29:35PM +1100, daniel-2N1FInP7wozQT0dZR+AlfA@public.gmane.org wrote:
> If I cd /sysroot/tmp (as I did previously) and ../bin/touch test the test 
> file is created however the permissions are nobody:nobody:
>
> -rw---- 1 nobody nobody 0 Oct    7 11:47 test

you are probably exporting the nfs root without the no_root_squash flag
check your nfs server configuration

L.

-- 
Luca Berra -- bluca-APJUtua8uzqonA0d6jMUrA@public.gmane.org
         Communication Media & Services S.r.l.
  /"\
  \ /     ASCII RIBBON CAMPAIGN
   X        AGAINST HTML MAIL
  / \

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Dracut NFS root rw before pivot but ro after pivot
       [not found]                 ` <20101007072427.GA30734-hdG+WfPrfN2JmafXlB/IVQ@public.gmane.org>
@ 2010-10-07 23:07                   ` daniel-2N1FInP7wozQT0dZR+AlfA
  0 siblings, 0 replies; 6+ messages in thread
From: daniel-2N1FInP7wozQT0dZR+AlfA @ 2010-10-07 23:07 UTC (permalink / raw)
  To: Luca Berra; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org

Quoting Luca Berra <bluca-APJUtua8uzqonA0d6jMUrA@public.gmane.org>:

> On Thu, Oct 07, 2010 at 12:29:35PM +1100, daniel-2N1FInP7wozQT0dZR+AlfA@public.gmane.org wrote:
>> If I cd /sysroot/tmp (as I did previously) and ../bin/touch test  
>> the test file is created however the permissions are nobody:nobody:
>>
>> -rw---- 1 nobody nobody 0 Oct    7 11:47 test
>
> you are probably exporting the nfs root without the no_root_squash flag
> check your nfs server configuration
>

Thanks Luca - I'm using a NetApp filer. I had to provide the UID for  
the root user in the export setup.

Normally I don't need to do this. Do you know why in this situation  
the mount is treated differently?

Everything is working with NFSv3 however when I use NFSv4 it boots  
fine to pre-pivot the file system is mounted but the ownership is  
reported as MAX_INT and I cannot write to any directory/file owned by  
MAX_INT. I found the bug report  
https://bugzilla.redhat.com/show_bug.cgi?id=570946. Does anyone know  
if this issue has been resolved or there is a work around?

Thanks!



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-10-07 23:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-05  1:42 Dracut NFS root rw before pivot but ro after pivot daniel-2N1FInP7wozQT0dZR+AlfA
     [not found] ` <20101005124250.12811x7b1hr8g23k-2RFepEojUI3Y3UUic/vCjNBPR1lH4CV8@public.gmane.org>
2010-10-05  5:52   ` daniel-2N1FInP7wozQT0dZR+AlfA
     [not found]     ` <20101005165245.12962kslvxq6cmyo-2RFepEojUI3Y3UUic/vCjNBPR1lH4CV8@public.gmane.org>
2010-10-05  6:48       ` daniel-2N1FInP7wozQT0dZR+AlfA
     [not found]         ` <20101005174817.98833aq1pzqn2cds-2RFepEojUI3Y3UUic/vCjNBPR1lH4CV8@public.gmane.org>
2010-10-07  1:29           ` daniel-2N1FInP7wozQT0dZR+AlfA
     [not found]             ` <20101007122935.19334qntub6vdeo0-2RFepEojUI3Y3UUic/vCjNBPR1lH4CV8@public.gmane.org>
2010-10-07  7:24               ` Luca Berra
     [not found]                 ` <20101007072427.GA30734-hdG+WfPrfN2JmafXlB/IVQ@public.gmane.org>
2010-10-07 23:07                   ` daniel-2N1FInP7wozQT0dZR+AlfA

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox