-
Mover script should skip named pipes.
I copied stuff to the array from an unassigned device. I have a cache pool and the mover runs on a schedule and moves from the cache pool to the array. I'd like to be able to kick off the initial copy from the unassigned device and come back to see it has been moved to the array. Currently, I kick off the copy and then come back to a stuck mover that I need to kill. Should I just edit my /boot/config/go file to create a custom mover script in /root/.local/bin/ ?
-
-
Mover script should skip named pipes.
Instead of ``` find "${SHAREPATH%/}" -depth | /usr/local/bin/move $DEBUGGING ``` I think it should be ``` find "${SHAREPATH%/}" -depth \( ! -type p \) | /usr/local/bin/move $DEBUGGING ``` The mover would get stuck a lot and I looked into it today. I found that it gets stuck on named pipes. IIUC it's a special file and not something that can be moved. I updated the mover script to skip the named pipes and now I'm happy. I don't see the mover script in /boot, how can I make this change permanent? Thanks! Relevant part of the mover script below. ``` # Check for objects to move from pools to array for POOL in /boot/config/pools/*.cfg ; do for SHAREPATH in /mnt/$(basename "$POOL" .cfg)/*/ ; do SHARE=$(basename "$SHAREPATH") if grep -qs 'shareUseCache="yes"' "/boot/config/shares/${SHARE}.cfg" ; then find "${SHAREPATH%/}" -depth \( ! -type p \) | /usr/local/bin/move $DEBUGGING fi done done # Check for objects to move from array to pools ls -dvc1 /mnt/disk[0-9]*/*/ | while read SHAREPATH ; do SHARE=$(basename "$SHAREPATH") if grep -qs 'shareUseCache="prefer"' "/boot/config/shares/${SHARE}.cfg" ; then eval $(grep -s shareCachePool "/boot/config/shares/${SHARE}.cfg" | tr -d '\r') if [[ -z "$shareCachePool" ]]; then shareCachePool="cache" fi if [[ -d "/mnt/$shareCachePool" ]]; then find "${SHAREPATH%/}" -depth \( ! -type p \) | /usr/local/bin/move $DEBUGGING fi fi done ```
-
Unassigned Devices Preclear - a utility to preclear disks before adding them to the array
I added the drive to the array and unRAID zeroed out the drive.
-
Good or bad idea? RAID 0 ZFS pool in unRAID array with unRAID parity [SOLVED]
Thanks!
-
Good or bad idea? RAID 0 ZFS pool in unRAID array with unRAID parity [SOLVED]
Ok, I think I see. What I should be asking is "can I add a zpool to unraid" which is already asked in that post that I linked to.
-
Good or bad idea? RAID 0 ZFS pool in unRAID array with unRAID parity [SOLVED]
Oh, maybe I understand now. Unraid looks at each drive and opens the filesystem there and merges them together. If I made a zpool out of two of them, I wouldn't have a filesystem on either of the two drives. Unraid would just ask me if I wanted to format the drives because they don't have any filesystem.
-
Good or bad idea? RAID 0 ZFS pool in unRAID array with unRAID parity [SOLVED]
Sorry, that went over my head. I found this where someone talks about adding a zpool to the unraid array. I'm not trying to add a zpool to the array... wait, am I? I was thinking that there was a difference between adding a whole zpool of drives as if it were a single slot in unraid (not supported) vs what I want to do where I would fill two slots in unraid with two drives. Then, unknown to unraid, I can make a zpool out of the two drives.
-
Good or bad idea? RAID 0 ZFS pool in unRAID array with unRAID parity [SOLVED]
IIUC if I want snapshots of a share, I can format one array drive as zfs and limit the share to that drive. If I want more space than that, can I make a zpool out of two zfs drives in my unraid array? That way, I can snapshot the zpool and have a snapshot of the share even though the share is too big to fit on one drive. I wouldn't use RAIDZ and would rely on unraid's parity to give some protection. Is that a good idea? Thanks!
-
Unassigned Devices Preclear - a utility to preclear disks before adding them to the array
Ah, thanks.
-
Unassigned Devices Preclear - a utility to preclear disks before adding them to the array
I have a drive that is all zeroes but does not have the signature. Can I use this plugin to read the drive, verify that it is all zeroes, and then write the signature? I don't see that in the options. All the options either write zeroes or read the signature. I have zeroes but I don't have the signature. I could of course just write all new zeroes but I imagine reading is less wear. Thanks!
-
Additional Scripts For User.Scripts Plugin
I read https://docs.unraid.net/legacy/FAQ/shrink-array/ and followed the link for step 8 "Run the clear an array drive script" that took me to the comment that has a download link for the "clear_array_drive" script. I tried running it but got an error. ``` Found a marked and empty drive to clear: Disk 3 ( /mnt/disk3 ) + echo -e '* Disk 3 will be unmounted first.' * Disk 3 will be unmounted first. + echo '* Then zeroes will be written to the entire drive.' * Then zeroes will be written to the entire drive. + echo '* Parity will be preserved throughout.' * Parity will be preserved throughout. + echo '* Clearing while updating Parity takes a VERY long time!' * Clearing while updating Parity takes a VERY long time! + echo '* The progress of the clearing will not be visible until it'\''s done!' * The progress of the clearing will not be visible until it's done! + echo '* When complete, Disk 3 will be ready for removal from array.' * When complete, Disk 3 will be ready for removal from array. + echo -e '* Commands to be executed:\n***** \x1b[36;01m umount /mnt/disk3 \x1b[39;49;00m\n***** \x1b[36;01m dd bs=1M if=/dev/zero of=/dev/md3 \x1b[39;49;00m\n' * Commands to be executed: ***** umount /mnt/disk3 ***** dd bs=1M if=/dev/zero of=/dev/md3 + '[' clear_array_drive == /tmp/user.scripts/ ']' + echo -n 'Press ! to proceed. Any other key aborts, with no changes made. ' Press ! to proceed. Any other key aborts, with no changes made. + ch= + read -n 1 ch !+ echo -e -n '\r \r' + '[' '!' '!=' '!' ']' + logger -tclear_array_drive 'Clear an unRAID array data drive v1.4' + echo -e '\rUnmounting Disk 3 ...' Unmounting Disk 3 ... + logger -tclear_array_drive 'Unmounting Disk 3 (command: umount /mnt/disk3 ) ...' + umount /mnt/disk3 + echo -e 'Clearing Disk 3 ...' Clearing Disk 3 ... + logger -tclear_array_drive 'Clearing Disk 3 (command: dd bs=1M if=/dev/zero of=/dev/md3 ) ...' + dd bs=1M if=/dev/zero of=/dev/md3 dd: error writing '/dev/md3': No space left on device 9+0 records in 8+0 records out 8388608 bytes (8.4 MB, 8.0 MiB) copied, 0.00256501 s, 3.3 GB/s + logger -tclear_array_drive 'Clearing Disk 3 is complete' + echo -e '\nA message saying "error writing ... no space left" is expected, NOT an error.\n' A message saying "error writing ... no space left" is expected, NOT an error. + echo -e 'Unless errors appeared, the drive is now cleared!' Unless errors appeared, the drive is now cleared! + echo -e 'Because the drive is now unmountable, the array should be stopped,' Because the drive is now unmountable, the array should be stopped, + echo -e 'and the drive removed (or reformatted).' and the drive removed (or reformatted). + exit ``` I ran the script with `sh -x` so there's debug output. I see it uses `/dev/mdX` not `/dev/mdXp1`. Is that the issue? Are people using this script? Do I have an old version of the script? Here's the download link for the script from the comment by RobJ https://s3-us-west-2.amazonaws.com/upload.forums.unraid.net/live/monthly_2016_09/clear_an_array_drive_zip.80cc67c667b13547f490de09b702bf4b I also searched this topic for "of=/dev/md" and I didn't see any references that included the "p1".
-
Is there a safer (idiot proof) way to run badblocks destructively?
@Frank1940 1. A refurbished drive is heavily used but not failed. I think... I don't know. I imagine that it would be easier for a data center to rotate all their drives before eol rather than wait until they individually fail. I don't actually know where they come from. Where do refurbished drives come from? 2. I imagine the seller checks the smart report to see that it doesn't have any reallocated sectors. I don't actually know what they do. 3. The two sellers that I see talked about most are GoHardDrive and ServerPartDeals. I think they have reputation around respecting the warranty. Idk if they have any rep around screening and testing. 4. 5 year warranty. Only for "Reallocated sector count" or "UDMA CRC error count" in the case of SPD. "Any issues with the drive" in the case of GoHD. The drive that failed badblocks is a drive that I bought new that is now out of warranty. I ran badblocks on it because I was curious what would happen.
-
Is there a safer (idiot proof) way to run badblocks destructively?
It's true; I do not understand how hard drives work. It's very confusing. Badblocks does four passes over the drive writing a pattern and reading it back on each pass. I have a drive that had no errors for the first pass writing and reading 0xaa but failed halfway through the second pass writing and reading 0x55. That makes me suspicious that a preclear is not enough.
-
Is there a safer (idiot proof) way to run badblocks destructively?
I recently bought some refurbished drives and I wanted to run `badblocks -wsv -b 4096 /dev/disk/by-id/whatever-abc` but I ran it on an array drive on accident. I kicked off badblocks, started a dozen docker services, changed over to the unraid main tab and that's when I saw that I had just run badblocks on the wrong drive. I took the array offline, unassigned the drive, started the array without the drive, and ran `xfs_repair` on the emulated drive. In case you're curious `xfs_repair` seems to have fixed it. ``` bad primary superblock - bad magic number !!! attempting to find secondary superblock... .found candidate secondary superblock... verified secondary superblock... writing modified primary superblock ``` Anyways, does anyone have a safer way to run badblocks? Maybe a script that objects if the drive is in the array or something? The closest I found in the forums was this saying that it's not going to happen in UD. Thanks! Backup you data, haha!
-
help rebuilding array with 2 failures (SOLVED)
There's a lot of stuff in the diagnostics. I haven't used that feature before and I want to review it more thoroughly before I upload it. Thank you for your support! I was really sweating it but I'm confident now that I have not lost any data. I have an offline copy of my important files and I'm waiting on parts to add some drives to build a raidz-2 as a destination for online backups. I'm going to take advantage of snapshots. I'm also running badblocks -wsv on all my drives to build confidence in the drives that I have. I added some refurb drives to my array in haste and now I can take my time rotate those out of the array so that I can do a destructive run of badblocks on each. I'm also adding two new wd red pro as parity because they recently had a "sale" on the 14tb. I don't want too many refurbs.
NominallySavvyTechPerson
Members
-
Joined
-
Last visited