| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| bsd:notes:rsync_nas [2025/10/25 07:56] – Sean Rhone | bsd:notes:rsync_nas [2025/10/26 02:31] (current) – [Mount ext4] Sean Rhone |
|---|
| * ''NAS1'' = 10TB Main | * ''NAS1'' = 10TB Main |
| * ''ext4'' | * ''ext4'' |
| * No partition table ([[linux:notes:rsync_nas#format]]) | * No partition table ([[linux:notes:rsync_nas#format|mkfs.ext4 notes]]) |
| |
| su - | su - |
| |
| zpool export 'NAS' | zpool export 'NAS' |
| |
| ====== UFS2 NAS ====== | |
| |
| * 10TB Main | |
| |
| ===== Format ===== | |
| |
| su - | |
| |
| geom disk list | |
| |
| newfs -L 'NAS' -O '2' -n -o 'time' '/dev/da0' | |
| |
| ====== Disconnect Enclosure ====== | ====== Disconnect Enclosure ====== |
| * :!: ''USB 3.1 ASMedia (5.0Gbps)'' needs listed for >USB2 speeds ((caps around 37MB/s at USB2)) | * :!: ''USB 3.1 ASMedia (5.0Gbps)'' needs listed for >USB2 speeds ((caps around 37MB/s at USB2)) |
| |
| usbconfig | usbconfig | grep '<USB 3.1 Device PM ASMedia Technology Inc.>' |
| | |
| | usbconfig | grep 'SUPER (5.0Gbps)' |
| | |
| | usbconfig | grep '<USB 3.1 Device PM ASMedia Technology Inc.> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps)' |
| |
| diskinfo -t 'da0' | diskinfo -t 'da0' |
| | |
| | iostat -c6 |
| |
| ===== NAS1 ===== | ===== NAS1 ===== |
| |
| * ''NAS1'' = 10TB Main | * ''NAS1'' = 10TB Main |
| |
| ==== ZFS ==== | |
| |
| su - | su - |
| |
| chown -R 'espionage724':'espionage724' '/NAS' | chown -R 'espionage724':'espionage724' '/NAS' |
| |
| ==== UFS2 ==== | |
| |
| su - | |
| |
| geom disk list | |
| |
| mkdir -p '/mnt/NAS1' && mount -o 'autoro,noatime' -t 'ufs' -v '/dev/da0' '/mnt/NAS1' | |
| |
| chown -R 'espionage724':'espionage724' '/mnt/NAS1' | |
| |
| ===== NAS2 ===== | ===== NAS2 ===== |
| mkdir -p '/mnt/NAS2' && ntfs-3g -o 'rw,big_writes,uid=1001,gid=1001' '/dev/da1p2' '/mnt/NAS2' | mkdir -p '/mnt/NAS2' && ntfs-3g -o 'rw,big_writes,uid=1001,gid=1001' '/dev/da1p2' '/mnt/NAS2' |
| |
| ===== 4TB Restore ===== | ====== 4TB Restore ====== |
| |
| * 4TB HDD restore to 10TB NAS drive | * 4TB HDD restore to 10TB NAS drive |
| * ZFS | |
| * Exclude ''Videos'', ''Games'', ''Music'' | * Exclude ''Videos'', ''Games'', ''Music'' |
| * 2025/10/25: ''212G'' | |
| |
| <code>rsync --recursive --update --ignore-existing --verbose --debug='ALL' --exclude 'Videos' --exclude 'Games' --exclude 'Music' '/mnt/NAS2/' '/NAS'</code> | <code>rsync --recursive --update --ignore-existing --verbose --debug='ALL' --exclude 'Videos' --exclude 'Games' --exclude 'Music' '/mnt/NAS2/' '/NAS'</code> |
| |
| * Games | ===== Games ===== |
| | |
| | **** |
| |
| <code>rsync --recursive --update --ignore-existing --verbose --debug='ALL' '/mnt/NAS2/Games/' '/NAS/Games'</code> | <code>rsync --recursive --update --ignore-existing --verbose --debug='ALL' '/mnt/NAS2/Games/' '/NAS/Games'</code> |
| |
| * Music (:!: ''&&'' with ''Videos'' overnight) | ===== Music ===== |
| | |
| | * :!: ''&&'' with ''Videos'' overnight |
| |
| <code>rsync --recursive --update --ignore-existing --verbose --debug='ALL' '/mnt/NAS2/Music/' '/NAS/Music'</code> | <code>rsync --recursive --update --ignore-existing --verbose --debug='ALL' '/mnt/NAS2/Music/' '/NAS/Music'</code> |
| |
| * Videos (some) | ===== Videos ===== |
| | |
| | * :!: Only some (rest below) |
| |
| <code>rsync --recursive --update --ignore-existing --verbose --debug='ALL' '/mnt/NAS2/Videos/' '/NAS/Videos'</code> | <code>rsync --recursive --update --ignore-existing --verbose --debug='ALL' '/mnt/NAS2/Videos/' '/NAS/Videos'</code> |
| |
| ===== 2TB USB Restore ===== | ====== 2TB USB Restore ====== |
| |
| * Videos 2 (WD ext) | * Videos 2 (WD ext) |
| |
| <code>rsync --recursive --update --ignore-existing --verbose --debug='ALL' '/run/media/espionage724/688EDD408EDD0808/Dragon Ball DBOX' '/run/media/espionage724/NAS/Videos/Anime'</code> | ===== Mount ===== |
| |
| <code>rsync --recursive --update --ignore-existing --verbose --debug='ALL' '/run/media/espionage724/688EDD408EDD0808/Dragon Ball GT' '/run/media/espionage724/NAS/Videos/Anime'</code> | su - |
| |
| ===== Maintenance ===== | geom disk list |
| |
| ==== Repair ==== | gpart list 'da1' |
| |
| sync && udisksctl unmount --block-device '/dev/sda' | kldload 'fusefs' |
| |
| sudo e2fsck -D -E 'discard,optimize_extents,inode_count_fullmap,check_encoding,unshare_blocks' -f -v -y '/dev/sda' | mkdir -p '/mnt/USB2' && ntfs-3g -o 'ro,big_writes,uid=1001,gid=1001' '/dev/da1s1' '/mnt/USB2' |
| |
| ==== Defrag ==== | ===== rsync ===== |
| |
| * :!: First-time seemingly takes longer than the whole 5TB+ restore | <code>rsync --recursive --update --ignore-existing --verbose --debug='ALL' '/mnt/USB2/Dragon Ball GT' '/NAS/Videos/Anime'</code> |
| |
| udisksctl mount --block-device '/dev/sda' | <code>rsync --recursive --update --ignore-existing --verbose --debug='ALL' '/mnt/USB2/Dragon Ball DBOX' '/NAS/Videos/Anime'</code> |
| | |
| | ====== Maintenance ====== |
| | |
| | ===== ZFS Scrub ===== |
| | |
| | su - |
| | |
| | zpool import 'NAS' |
| | |
| | zpool scrub 'NAS' |
| | |
| | zpool status 'NAS' |
| | |
| | zpool export 'NAS' |
| |
| sudo e4defrag -v '/dev/sda' && sync && udisksctl unmount --block-device '/dev/sda' | exit |
| |