checkover, please?

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

checkover, please?

Postby sgtfoo » Mon Jan 03, 2011 5:50 pm

I just swapped the drive where my /var/hda/files is located and was forced to unmount and remount the 2 other drives where my greyhole looks to store data.
sda1 = current OS partition
sda2 = swap
sda3 = OLD /var/hda/files
sdb1 = greyhole a
sdc1 = greyhole b
sdd1 = NEW /var/hda/files

I'm concerned as to why I had a slew of extra steps and troubleshooting to do when I followed the wiki for adding a drive for all shares in /files. I encountered a few times when the drive wasn't unmounted due to processes using it, so I would end up forcing a dismount. I then had to re-create the sdc1 folder for the "mount -a" to work.

I'd appreciate if someone could double-check my settings per the content below; I figured it's adequate info for finding any issues:
here's the results of the greyhole troubleshoot guide output:

Code: Select all

[root@srvr1011 files]# cd drives [root@srvr1011 drives]# ls drive1 sdb1 sdc1 [root@srvr1011 drives]# up bash: up: command not found [root@srvr1011 drives]# cd.. bash: cd..: command not found [root@srvr1011 drives]# cd.. bash: cd..: command not found [root@srvr1011 drives]# cd. bash: cd.: command not found [root@srvr1011 drives]# cd [root@srvr1011 ~]# pwd /root [root@srvr1011 ~]# cd /var/hda/files [root@srvr1011 files]# ls Aren_Files dbbackup downloads gh movies OS_ISOs Rosie_Files torrents crashplan docs drives lost+found music pictures safe_backups [root@srvr1011 files]# cd gh [root@srvr1011 gh]# ls [root@srvr1011 gh]# cd [root@srvr1011 ~]# greyhole -s Greyhole Statistics =================== Storage Pool Total - Used = Free + Attic = Possible /var/hda/files/drives/sdb1/gh: 917G - 827G = 43G + 0G = 43G /var/hda/files/drives/sdc1/gh: 917G - 829G = 42G + 0G = 42G [root@srvr1011 ~]# greyhole -f fsck of all shares has been scheduled. It will start after all currently pending tasks have been completed. [root@srvr1011 ~]# uname -r; rpm -q samba hda-greyhole 2.6.32.26-175.fc12.x86_64 samba-3.4.9-60.fc12.x86_64 hda-greyhole-0.7.5-1.x86_64 [root@srvr1011 ~]# mount; fdisk -l; df -h; greyhole --stats /dev/sda1 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/sdd1 on /var/hda/files type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) gvfs-fuse-daemon on /home/adj/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=adj) /dev/sdb1 on /var/hda/files/drives/sdb1 type ext4 (rw) /dev/sdc1 on /var/hda/files/drives/sdc1 type ext4 (rw) Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x000a0822 Device Boot Start End Blocks Id System /dev/sda1 * 1 2611 20972826 83 Linux /dev/sda2 2612 3786 9438187+ 82 Linux swap / Solaris /dev/sda3 3787 38913 282157627+ 83 Linux Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x0002d500 Device Boot Start End Blocks Id System /dev/sdb1 1 121601 976760001 83 Linux Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xb8e3871c Device Boot Start End Blocks Id System /dev/sdc1 1 121601 976760001 83 Linux Disk /dev/sdd: 1500.3 GB, 1500301910016 bytes 255 heads, 63 sectors/track, 182401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x0000dbd6 Device Boot Start End Blocks Id System /dev/sdd1 1 182402 1465137152 83 Linux Filesystem Size Used Avail Use% Mounted on /dev/sda1 20G 9.2G 9.6G 49% / tmpfs 3.7G 124K 3.7G 1% /dev/shm /dev/sdd1 1.4T 4.9G 1.3T 1% /var/hda/files /dev/sdb1 917G 827G 44G 96% /var/hda/files/drives/sdb1 /dev/sdc1 917G 829G 42G 96% /var/hda/files/drives/sdc1 Greyhole Statistics =================== Storage Pool Total - Used = Free + Attic = Possible /var/hda/files/drives/sdb1/gh: 917G - 827G = 43G + 0G = 43G /var/hda/files/drives/sdc1/gh: 917G - 829G = 42G + 0G = 42G [root@srvr1011 ~]# mount; fdisk -l; df -h; greyhole --stats /dev/sda1 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) tmpfs on /dev/shm type tmpfs (rw) /dev/sdd1 on /var/hda/files type ext4 (rw) none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw) gvfs-fuse-daemon on /home/adj/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=adj) /dev/sdb1 on /var/hda/files/drives/sdb1 type ext4 (rw) /dev/sdc1 on /var/hda/files/drives/sdc1 type ext4 (rw) Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x000a0822 Device Boot Start End Blocks Id System /dev/sda1 * 1 2611 20972826 83 Linux /dev/sda2 2612 3786 9438187+ 82 Linux swap / Solaris /dev/sda3 3787 38913 282157627+ 83 Linux Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x0002d500 Device Boot Start End Blocks Id System /dev/sdb1 1 121601 976760001 83 Linux Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0xb8e3871c Device Boot Start End Blocks Id System /dev/sdc1 1 121601 976760001 83 Linux Disk /dev/sdd: 1500.3 GB, 1500301910016 bytes 255 heads, 63 sectors/track, 182401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x0000dbd6 Device Boot Start End Blocks Id System /dev/sdd1 1 182402 1465137152 83 Linux Filesystem Size Used Avail Use% Mounted on /dev/sda1 20G 9.2G 9.6G 49% / tmpfs 3.7G 124K 3.7G 1% /dev/shm /dev/sdd1 1.4T 4.9G 1.3T 1% /var/hda/files /dev/sdb1 917G 827G 44G 96% /var/hda/files/drives/sdb1 /dev/sdc1 917G 829G 42G 96% /var/hda/files/drives/sdc1 Greyhole Statistics =================== Storage Pool Total - Used = Free + Attic = Possible /var/hda/files/drives/sdb1/gh: 917G - 827G = 43G + 0G = 43G /var/hda/files/drives/sdc1/gh: 917G - 829G = 42G + 0G = 42G [root@srvr1011 ~]# ysql -u root -phda -e "select * from disk_pool_partitions" hda_production bash: ysql: command not found [root@srvr1011 ~]# mysql -u root -phda -e "select * from disk_pool_partitions" hda_production +----+----------------------------+--------------+---------------------+---------------------+ | id | path | minimum_free | created_at | updated_at | +----+----------------------------+--------------+---------------------+---------------------+ | 4 | /var/hda/files/drives/sdb1 | 10 | 2011-01-04 00:02:37 | 2011-01-04 00:02:37 | | 5 | /var/hda/files/drives/sdc1 | 10 | 2011-01-04 00:36:22 | 2011-01-04 00:36:22 | +----+----------------------------+--------------+---------------------+---------------------+ [root@srvr1011 ~]# mysql -u root -phda -e "select concat(path, '/gh') from disk_pool_partitions" hda_production | grep -v 'concat(' | xargs ls -la | fpaste Uploading (1.9K)... http://fpaste.org/q0q6/ [root@srvr1011 ~]# greyhole --view-queue Greyhole Work Queue Statistics ============================== This table gives you the number of pending operations queued for the Greyhole daemon, per share. Write Delete Rename Aren_Files 0 0 0 Movies 0 0 0 OS_ISOs 0 0 0 Pictures 0 0 0 Rosie_Files 0 0 0 safe_backups 0 0 0 TV_Shows 0 0 0 ============ Total 0 + 0 + 0 = 0
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

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

Re: checkover, please?

Postby sgtfoo » Mon Jan 03, 2011 5:54 pm

Ideally, only some of my folders should be inside the greyhole pool.

I previously changed that some exist only in the /files folder and not within the pool.

and..

is this what the folder structure should look like?

Code: Select all

[root@srvr1011 ~]# greyhole -s Greyhole Statistics =================== Storage Pool Total - Used = Free + Attic = Possible /var/hda/files/drives/sdb1/gh: 917G - 827G = 43G + 0G = 43G /var/hda/files/drives/sdc1/gh: 917G - 829G = 42G + 0G = 42G

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: checkover, please?

Postby gboudreau » Tue Jan 04, 2011 8:16 am

Everything looks like it should.
- Guillaume Boudreau

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

Re: checkover, please?

Postby sgtfoo » Tue Jan 04, 2011 11:36 am

Thank you sir!

Now how long should it take for a folder to move off the storage pool drives to the other non-greyhole drive when i remove it from the pool via the hda shares page?

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: checkover, please?

Postby gboudreau » Tue Jan 04, 2011 5:44 pm

Removing a share from the pool actually does nothing more than removing the share from greyhole config file.
The actual files are not moved in any way.
I think there is already an issue somewhere in the Amahi bug tracker about this.

To move the files manually, you should copy all files copy from the pool into your share.
The example below would be for the Movies share:

Code: Select all

find /var/hda/files/movies/ -type l -delete cp -r /var/hda/files/drives/*/gh/Movies/* /var/hda/files/movies/
The first command removes the symlink that Greyhole created. The second command copies the file copies from the Greyhole pool into your share.
Note that for the second command (cp) the directory under 'gh' is the share name, thus the uppercased Movies in my example, and the second parameter is the Location of the share, thus the lowercased movies.
- Guillaume Boudreau

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

Re: checkover, please?

Postby sgtfoo » Tue Jan 04, 2011 10:43 pm

Is there a command to list all the directories that are supposed to be in the greyhole pool AND list the directories that should not be in the pool??

If I could read my own list of "should and should not pool" directories I could execute that to fix my storage fill-up problem on my two 1tb drives.

After doing the find and cp commands above, would a "greyhole -f" command end up updating the space available in the pool?
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

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: checkover, please?

Postby gboudreau » Wed Jan 05, 2011 4:25 am

The files will not be removed from the pool with those commands. They only "copy", not move, not delete, the files from the pool into the share.
Once you're satisfied that the files are all in the shares (make sure it's not symlinks, but the real files that are there!), then you can delete the files from the pool.
--fsck (-f) will never touch files that are not on 'Greyhole shares', and removing a specific share from greyhole.conf, like Amahi does when you remove the 'Uses pool' checkbox, effectively makes that share a non-Greyhole share.

To see the shares you have, and which one should be out of the pool, you can use this command:

Code: Select all

mysql -uroot -phda -e "SELECT path, Comment FROM shares where disk_pool_copies = 0" hda_production
Change the =0 to a > 0 to see the shares that are in the pool instead.
(The comment column returned above is in fact the share name.)
- Guillaume Boudreau

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

Re: checkover, please?

Postby sgtfoo » Wed Jan 05, 2011 11:00 am

Thanks for bearing with me here.. :geek: :oops:

So once I see that everything is where is want it, to remove the old copies from the greyhole storage area, I can 'cd' into '/var/hda/files/drives/[greyhole partitions]/gh' and use 'rm' to delete the folders and reclaim space, yes?

User avatar
gboudreau
Posts: 606
Joined: Sat Jan 23, 2010 1:15 pm
Location: Montréal, Canada
Contact:

Re: checkover, please?

Postby gboudreau » Wed Jan 05, 2011 1:24 pm

Yes.
You might want to delete those files too (they are small, but serve no purpose, for shares that are not in the pool anymore):
/var/hda/files/drives/[greyhole partitions]/gh/.gh_graveyard/share_name
- Guillaume Boudreau

Who is online

Users browsing this forum: Google [Bot] and 9 guests