Re: NFSROOT, for AOE booting

2008-12-16 Thread Thomas Lange
> On Tue, 16 Dec 2008 18:03:44 +0100, Jean Spirat  
> said:

>   I am trying to build a nfsroot that will be mounted using AOE and not 
> NFS. For this i use a partition mounted here 
> /srv/fai/nfsroot/live/filesystem.dir. The issue i have is that if i 
> rebuild the nfsroot i got an error: /usr/sbin/make-fai-nfsroot tries to 
> remove the mountpoint and fail. Is there any way to go around that ?
Please give us the exact error message of make-fai-nfsroot -v

Why not NFS? Try to keep things simple. NFS will work without any
problems. 
-- 
regards Thomas


Re: NFSROOT, for AOE booting

2008-12-16 Thread Henning Sprang
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Thomas Lange wrote:
> Please give us the exact error message of make-fai-nfsroot -v

I think the problem is quite simple and can easily solved as written in
my other mail:

AOE is not a directory-/filesystem based export, but block-device based.
Therefore, he has to mount the AOE block device to the nfsroot location,
 but a mountpoint cannot be deleted while something is mounted onto it.

> Why not NFS? Try to keep things simple. NFS will work without any
> problems. 

Maybe - as far as anything in network installs, with many protocols
involved will ever "work without any problems" :)

One reason could be the usage of a SAN in his infrastructure...

Henning

- --
Henning Sprang
http://www.sprang.de
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJR/otOzXGJHJLmQIRAs6HAJ9FaiZvbhOJazMit7htNrlt6l7g9gCglxfn
i4acK+h8E5K0v+dlFba59Js=
=ddzl
-END PGP SIGNATURE-


Re: NFSROOT, for AOE booting

2008-12-17 Thread Henning Sprang
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jean Spirat wrote:
> I agree that this is not a setup that is seen everywhere and i would
> really like to see FAI support this i am sure this is not so much
> complicated but i lack knowledge on the live initramsfs part.
> Do you know where is the best place to get knowledgeable people for this
> particular part ?

Maybe on Debian list related to booting, kernels, and live-cd's?

I'd check for lists (if exists) debian-boot, debian-live, and also check
for the developers lists of the livehelper(and/or related) packages on
alioth.

Henning

- --
Henning Sprang
http://www.sprang.de
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJSSmaOzXGJHJLmQIRAg5HAJwNeuKsB/aHLb8llH1VciXnD6XM4ACg4T+I
JZ9GF74Wzrc1AZ5dWMf7GM0=
=EVkE
-END PGP SIGNATURE-


Re: NFSROOT, for AOE booting

2008-12-17 Thread Henning Sprang
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Jean,

Jean Spirat wrote:
> Basicaly it want to remove the mountpoint.

As I said, you'd have to change a line looking something like "rm -rf
$NFSROOT/live/filesystem.dir
to something like
rm -rf $NFSROOT/live/filesystem.dir/*

> i have an AOE target so why not use it as it remove all those
> troublesome issues for me in one swipe.

If I hade an AOE SAN, I'd also like to use it.
But I guess that's the main reason I can accept: If using AOE really
improves any security, I'm not really sure - and if it's really easier?
Maybe not, because many of the initrd scripts and stuff are not prepared
for it an booting AOE is probably rather a niche usage.

> The issue is then how to create all the initramfs files and make the
> make-fai-nfsroot works with:
> 
> - custom initramfs configuration
> - nfsroot mount point
> 
> without needing manual tweaking for it :)

That's where Thomas "no worry with NFS" comes into play.
FAI is only tested and made for NFS.
Finding out how to mount the AOE with the right initrd is very likely a
much bigger task than changing the command for deletion of the old nfsroot.

I guess it would be interesting for FAI if we could claim to work with
AOE SAN's - but I also guess you will not get too much help with it -
mainly lacking experience, not willingness to help - I didn't see AOE
being mentioned here before.

Henning



- --
Henning Sprang
http://www.sprang.de
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJSRLhOzXGJHJLmQIRAhb3AKDEzP2ZyNXIBKZwk/7MaKoN1AcalwCeOo6h
UUB9JsknaaJFN9OVjLH0nWY=
=qHMQ
-END PGP SIGNATURE-


Re: NFSROOT, for AOE booting

2008-12-17 Thread Jean Spirat

Thomas Lange a écrit :

On Tue, 16 Dec 2008 18:03:44 +0100, Jean Spirat  said:



>   I am trying to build a nfsroot that will be mounted using AOE and not 
> NFS. For this i use a partition mounted here 
> /srv/fai/nfsroot/live/filesystem.dir. The issue i have is that if i 
> rebuild the nfsroot i got an error: /usr/sbin/make-fai-nfsroot tries to 
> remove the mountpoint and fail. Is there any way to go around that ?

Please give us the exact error message of make-fai-nfsroot -v

Why not NFS? Try to keep things simple. NFS will work without any
problems. 
  

fai01:/# make-fai-nfsroot
Creating FAI nfsroot in /srv/fai/nfsroot/live/filesystem.dir.
By default it needs more than 390 MBytes disk space.
This may take a long time.
/srv/fai/nfsroot/live/filesystem.dir already exists. Removing 
/srv/fai/nfsroot/live/filesystem.dir
rm: ne peut détruire le répertoire 
`/srv/fai/nfsroot/live/filesystem.dir': Périphérique ou ressource occupé

Log file written to /var/log/fai/make-fai-nfsroot.log

Basicaly it want to remove the mountpoint.

NFS is considered unsecure by some, it is complicated, it open plenty of 
ports on your host and a single config error would make my life a 
security hell (installing corrupted server images), i am in an open 
infrastructure so the less i open it, the better i feel,


Also for linux the nfs daemon is located for a big part in kernel so it 
cannot be run in vserver guests ( user space version is completly 
obsolete) and this is an issue for me nothing should run on the host, 
andi have an AOE target so why not use it as  it remove all those 
troublesome issues for me in one swipe.



The issue is then how to create all the initramfs files and make the 
make-fai-nfsroot works with:


- custom initramfs configuration
- nfsroot mount point

without needing manual tweaking for it :) 



Also i have issues because initramfs cannot mount the /live I have

/srv/fai/nfsroot/live/filesystem.dir/etc/initramfs-tools/scripts/local-top/aoetools
/srv/fai/nfsroot/live/filesystem.dir/etc/initramfs-tools/hooks/aoetools

the hooks copy the module and aoe-discover tool, the localtop should 
"ifconfig up" all the interfaces and aoe-discover to create the 
/dev/ether/ex device but it seems the /live is done before. Any one got 
links to some help or know how to solve this ?


i am stuck at the initramsfs prompt and i can modprobe aoe and 
aoe-discover and it works :




BusyBox v1.10.2 (Debian 1:1.10.2-2) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs)
(initramfs) ls -la /dev/tty
crw-rw-rw-1 00  5,   0 Dec 17 14:36 /dev/tty
(initramfs) modprobe aoe
(initramfs) ifconfig eth3 up
(initramfs) aoe-discover
(initramfs) [ 2804.565557] aoe: 0030486265aa e10.0 v00a6 has 585940992 
sectors

[ 2804.565557] aoe: 0030486265aa e10.1 v00a6 has 97656832 sectors
[ 2804.565557]  etherd/e10.0: p1
[ 2804.598817]  etherd/e10.1: p1 p2


but it does not do it automaticaly to mount and boot the FAI system.

regards,
Jean.






Re: NFSROOT, for AOE booting

2008-12-17 Thread Jean Spirat



I guess it would be interesting for FAI if we could claim to work with
AOE SAN's - but I also guess you will not get too much help with it -
mainly lacking experience, not willingness to help - I didn't see AOE
being mentioned here before.
  


yes thanks for your insight on this.

I agree that this is not a setup that is seen everywhere and i would 
really like to see FAI support this i am sure this is not so much 
complicated but i lack knowledge on the live initramsfs part.
Do you know where is the best place to get knowledgeable people for this 
particular part ?


I think if aoe is working we could quickly also add iscsi and other san 
system.


regards,
Jean.



Re: NFSROOT, for AOE booting

2008-12-19 Thread Ralf Utermann
Jean Spirat wrote:
[...]
> without needing manual tweaking for it :)
> 
> Also i have issues because initramfs cannot mount the /live I have
> 
> /srv/fai/nfsroot/live/filesystem.dir/etc/initramfs-tools/scripts/local-top/aoetools
> 
> /srv/fai/nfsroot/live/filesystem.dir/etc/initramfs-tools/hooks/aoetools
> 
> the hooks copy the module and aoe-discover tool, the localtop should
> "ifconfig up" all the interfaces and aoe-discover to create the
> /dev/ether/ex device but it seems the /live is done before. Any one got
> links to some help or know how to solve this ?
> 
are you sure, that the initrd you are booting via pxe is really the
one you have changed?
I also need changes to the initrd and as there is currently no established
method in FAI to do this. I use NFSROOT_HOOKS to run a
script at the end of make-fai-nfsroot, which sets up the initramfs hooks,
re-runs update-initramfs and copies the results again. Not the most elegant
way, but I don't see a better one at the moment.

This is the hook file I use:
# cat /etc/fai/nfsroot-hooks/patch-initrd

#!/bin/sh
#

echo "Enter patch initrd hook"

# copy files to patch initrd
cp /usr/local/etc/*patch $NFSROOT/usr/local/etc
cp /usr/local/etc/initramfs-tools_hook_network 
$NFSROOT/etc/initramfs-tools/hooks/network

$ROOTCMD update-initramfs -k all -t -u
cp -pv $NFSROOT/boot/vmlinu?-* $NFSROOT/boot/initrd.img-* $TFTPROOT

echo "Exit patch initrd hook"


Bye, Ralf
-- 
Ralf Utermann
_
Universität Augsburg, Institut für Physik   --   EDV-Betreuer
Universitätsstr.1 
D-86135 Augsburg Phone:  +49-821-598-3231
SMTP: ralf.uterm...@physik.uni-augsburg.de Fax: -3411


Re: NFSROOT, for AOE booting

2008-12-23 Thread Jean Spirat



are you sure, that the initrd you are booting via pxe is really the
one you have changed?
I also need changes to the initrd and as there is currently no established
method in FAI to do this. I use NFSROOT_HOOKS to run a
script at the end of make-fai-nfsroot, which sets up the initramfs hooks,
re-runs update-initramfs and copies the results again. Not the most elegant
way, but I don't see a better one at the moment.

This is the hook file I use:
# cat /etc/fai/nfsroot-hooks/patch-initrd

#!/bin/sh
#

echo "Enter patch initrd hook"

# copy files to patch initrd
cp /usr/local/etc/*patch $NFSROOT/usr/local/etc
cp /usr/local/etc/initramfs-tools_hook_network 
$NFSROOT/etc/initramfs-tools/hooks/network

$ROOTCMD update-initramfs -k all -t -u
cp -pv $NFSROOT/boot/vmlinu?-* $NFSROOT/boot/initrd.img-* $TFTPROOT

echo "Exit patch initrd hook"


Bye, Ralf
  
thanks, i will try this one. The initrd is the good one, For now i am 
able to boot from aoe but the root fs is mounted read only :) so FAI 
fails to start.





FAI_ACTION: install
Performing FAI installation. All data may be overwritten!

Calling task_install
/usr/lib/fai/subroutines: line 470: 
/var/run/fai/FAI_INSTALLATION_IN_PROGRESS: Read-only file system
/usr/lib/fai/subroutines: line 86: /tmp/fai/dmesg.log: No such file or 
directory

Calling task_partition
Partitioning local harddisks using setup_harddisks
tee: /tmp/fai/format.log: No such file or directory
setup_harddisks version 0.43fai
Probing disks:
Disks found: sda etherd/e10.0 etherd/e10.1

ERROR: no config file for setup_harddisk found. Please check you classes 
and files in disk_config.

cat: /tmp/fai/format.log: No such file or directory
mkdir: cannot create directory `/target': Read-only file system
mkdir: cannot create directory `/target': Read-only file system
find: `/tmp/fai': No such file or directory
ln: creating symbolic link `/tmp/fai/../last-install': No such file or 
directory

ln: creating symbolic link `/tmp/fai/../last': No such file or directory
mkdir: cannot create directory `/target': Read-only file system
cp: cannot stat `/tmp/fai/*': No such file or directory
chown: cannot access `/target/var/log/fai/(none)/install-': No such file 
or directory
chgrp: cannot access `/target/var/log/fai/(none)/install-': No such file 
or directory
chmod: cannot access `/target/var/log/fai/(none)/install-': No such file 
or directory
ln: creating symbolic link `/target/var/log/fai/localhost': No such file 
or directory
ln: creating symbolic link `/target/var/log/fai/(none)/last-install': No 
such file or directory
ln: creating symbolic link `/target/var/log/fai/(none)/last': No such 
file or directory

Partitioning tool did not create /tmp/fai/disk_var.sh file.
bash: no job control in this shell
root@(none):/# mount
rootfs on / type rootfs (rw)
none on /sys type sysfs (rw,nosuid,nodev,noexec)
none on /proc type proc (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,size=10240k,mode=755)
/dev/etherd/e10.1p1 on / type ext3 (ro,errors=continue,data=ordered)


i have to digg a little to find why it is mounted read only and then the 
system will be able to work.


regards,
Jean