greyhole and zfs [solved]

fumsli
Posts: 10
Joined: Fri Apr 27, 2012 3:04 am

greyhole and zfs [solved]

Postby fumsli » Mon Nov 18, 2013 12:49 pm

Hi!

I've been running Amahi for a while now (ubuntu 12.04 server) and got to the point of having to extend my storage capacity by adding another drive.

While pondering which format to choose for the new disk this ZFSDriveConversion caught my attention and I thought - why not?

Since I needed at least 0.9.29 to make this work I've manually upgraded greyhole to the most recent stable 0.9.35 (with a little help from the wiki)

I then put in a brand new Toshiba 3TB harddisk, used

Code: Select all

parted /dev/sdb mklabel gpt
to mark it for gpt and followed steps 3 and 4 from the guide (zpool create and zfs create). As far as I can see this worked:

Code: Select all

$ sudo zfs list NAME USED AVAIL REFER MOUNTPOINT toshiba3TB 764K 2.69T 136K none toshiba3TB/ROOT 148K 2.69T 148K /mnt/toshiba3tb
Step 5 (remove disk from fstab) cant be done since it was never in there in the first place.

I created the directory

Code: Select all

/mnt/toshiba3tb/gh
as instructed in 6 and tried to add it to

Code: Select all

/etc/greyhole.conf
as a storage_pool_drive. All my other drives are there - but listed like this:

Code: Select all

storage_pool_directory = /mnt/wd1500gb/gh, min_free: 10gb
I figured 'storage_pool_drive' to be an alias and kept using 'directory'. Then I tried using 'storage_pool_drive' and finally having one entry of each for all my disks.
However, the new disk is never used by greyhole (as far as I can see anyways). ie: It is not listed on the amahi frontend (no big deal) and fsks will not put data in /gh (big deal ;)). Also:

Code: Select all

$ mysql -u root -phda -e "select * from disk_pool_partitions" hda_production +----+-----------------+--------------+---------------------+---------------------+ | id | path | minimum_free | created_at | updated_at | +----+-----------------+--------------+---------------------+---------------------+ | 4 | /mnt/wd1500gb | 10 | 2012-08-04 17:27:49 | 2012-08-04 17:27:49 | | 5 | /mnt/wd2tb | 10 | 2012-08-04 17:27:50 | 2012-08-04 17:27:50 | | 6 | /mnt/seagate3tb | 10 | 2012-08-04 17:27:50 | 2012-08-04 17:27:50 | +----+-----------------+--------------+---------------------+---------------------+
greyhole.conf looks like this right now:

Code: Select all

$ less /etc/greyhole.conf [...] log_level = DEBUG log_memory_usage = false dir_selection_algorithm = most_available_space df_cache_time = 15 delete_moves_to_attic = true sticky_files = Music/ # add any group of other settings # here in multiple lines drive_selection_groups = OK: /mnt/wd1500gb/gh, /mnt/wd2tb/gh, /mnt/seagate3tb/gh REMOTE: /mnt/toshiba3tb/gh drive_selection_algorithm = forced (1xOK, 1xREMOTE) most_available_space storage_pool_directory = /mnt/toshiba3tb/gh, min_free: 10gb storage_pool_drive = /mnt/toshiba3tb/gh, min_free: 10gb storage_pool_directory = /mnt/wd1500gb/gh, min_free: 10gb [...]
What am I doing wrong here? And what other tests should I give a try?
EDIT: The entry in mysql (hda_production/disk_pool_partitions) was missing. Adding it via phpmyadmin (amahi webapp) did the trick.
fsck works now and it is listed in the Amahi 'Storage Pool'. There is, however, a white on orange exclamation mark where 'Total space' would list its size. Anyone know why or what I'm still missing?

Making changes to greyhole from the amahi web frontend will reset the config file (as is noted at the top of said file).
It is also noted that changes should go to

Code: Select all

/var/hda/platform/html/config/greyhole.yml
but there are no entries for my disks and these are not overwritten. So clearly there is another mechanism for adding those in. Question is - where is it and how do I add my disk there?[/i]
EDIT: never mind the last paragraph - the .yml file passes a section of raw strings and so this one is hackable :)

Thanks for reading! :)

User avatar
sgtfoo
Posts: 419
Joined: Sun Jul 18, 2010 8:27 pm

Re: greyhole and zfs [solved]

Postby sgtfoo » Fri Dec 06, 2013 10:43 am

ZFS provides drive pooling AND duplication AND raidz... knowing that, I wonder why anyone would want to use greyhole in conjunction with zfs??

If anything ZFS would only provide its intrinsic features (COW, checksums, snapshots/clones, etc) while Gh would handle duplication and pooling..... why not just use one or the other?
SgtFoo
HDA: VM inside oVirt FX-8300 95w (2 cores for HDA), 32GB RAM (2GB for HDA)
My PC: FX-8300, 16GB RAM, 3x 1TB HDDs, Radeon HD6970 2GB video; Win10 Pro x64
Other: PC, Asus 1215n (LXLE), Debian openZFS server (3x(2x2tb) mirrors)
Modem&Network: Thomson DCM475; Asus RT-AC66U; HP 1800-24G switch

Who is online

Users browsing this forum: No registered users and 13 guests