| |
About
Zap's Digital Lighthouse is a Blosxom weblog for our digital outpost on the Internet
For info
info@rax.org
Useful links:
Google
Cyberpresse
The Reg
Slashdot
FreeBSD
LinkedIn
Twitter
Boursorama
RAX
zap
Soekris
xkcd
AirFrance
Wiki soekris
Wikipedia
Wiktionary
ACME
blosxom
Categories:
/FreeBSD (14)
/blosxom (6)
/hardware (4)
/inet (2)
/misc (9)
/notwork (1)
/software (3)
Archives:
2012 (42)
| May (1)
| April (5)
| March (3)
| February (14)
| January (19)
2011 (3)
| December (1)
| November (2)
2008 (1)
| October (1)
|
|
|
Setting up FreeBSD 9.0 with a ZFS root filesystem
With the new version of FreeBSD being just out, I decided to try out the ZFS
filesystem. Notably, I would like to find out whether it works correctly with
2GB of memory, or whether more is really needed (I read that it doesn't really
work with less than 1GB of RAM, but then again, there are conflicting reports
that it needs lots more, though sometimes that's qualified with 'if you want
prefetch' or 'if you are trying to do dedup'). Actually, I am building a
small NAS server I am building around a Soekris net6501-70 which comes with
2GB RAM, and I would like to find out if I can use ZFS with it.
So, I looked up http://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE and
tried to set up a vmware virtual machine with ZFS only.
I did not bother setting up swap space, nor a mirrored disk configuration, so
the commands I used were:
- boot a vmware virtual machine from the amd64 FreeBSD9.0-RELEASE DVD
- choose the Shell option at the partitioning dialog in bsdinstall
- run the following commands:
# gpart create -s gpt da0
# gpart add -s 64K -t freebsd-boot -l boot0 da0
# gpart add -t freebsd-zfs -l disk0 da0
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0
# zpool create -o altroot=/mnt zroot /dev/gpt/disk0
# zfs create zroot/tmp
# chmod 1777 /mnt/tmp
# zfs create zroot/usr
# zfs create zroot/var
# zfs create zroot/home
# exit
- And then, after installation:
(update: one must add # echo 'zfs_enable="YES"'>> /mnt/etc/rc.conf here as per the post on 21 January)
# echo 'zfs_load="YES"'>> /mnt/boot/loader.conf
# echo 'vfs.root.mountfrom="zfs:zroot"'>> /mnt/boot/loader.conf
# zfs unmount -a
# zpool export zroot
# zpool import -o cachefile=/tmp/zpool.cache -o altroot=/mnt zroot
# zfs set mountpoint=/ zroot
# cp /tmp/zpool.cache /mnt/boot/zfs/
# zfs unmount -a
# zpool set bootfs=zroot zroot
# zpool set cachefile='' zroot
# zfs set mountpoint=legacy zroot
# zfs set mountpoint=/tmp zroot/tmp
# zfs set mountpoint=/usr zroot/usr
# zfs set mountpoint=/var zroot/var
# zfs set mountpoint=/home zroot/home
The last 4 commands (i.e. after 'zfs set mountpoint=legacy zroot') give error messages,
but I think that's OK. However, once I rebooted the virtual machine, the filesystems
(except for /) were not mounted and therefore FreeBSD did not come up properly.
So, this was a first try... More on this next weekend :-)
/FreeBSD | Posted at 22:57 |
permanent link
|
|