const{createApp}=Vue const{createVuetify,useGoTo,useDisplay}=Vuetify var data={alert:{show:false,color:'success',text:'',timeout:0,},theme:{dark:false,},nav:{showDrawer:false,showTOC:true,tocPanel:0,tab:'account',post:{discussionId:6857,currentPage:1,targetPage:1,total:12,anchor:0,goToOptions:{container:null,duration:0,easing:'easeInOutCubic',offset:-100,},worker:null,task:[],active:[],apiLock:[],originLike:new Map([]),},related:{block:1,}},search:{width:80,text:null,loading:false,},tags:[{id:34,url:'/t/0e24610c6a045c74647716303804',name:'NAS',color:'#66BB6A',icon:'mdi-nas',},],posts:[{id:84788,num:0,uid:15364,content:'求助:关于 NAS 备份盘的选购及 RAID1 转换问题\u003Cp\u003E大家好!去年双十一我入手了一台 极空间 NAS Z4Pro 和一块 16T 东芝 N300 NAS 盘,当时为了追求速度,选择了 RAID0 模式。几个月下来,NAS 上已经存了不少照片、视频等珍贵数据,最近开始担心 RAID0 模式下硬盘损坏会导致数据丢失,所以想再买一块 16T 硬盘,希望能保障数据安全,并将存储模式转为 RAID1。\u003C/p\u003E问题一:备份盘选购建议\u003Cp\u003E现在 16T 东芝 N300 的价格有点让我肉疼,毕竟只是用作备份盘,似乎没必要买全新的硬盘。请问 V 友们有没有合适的渠道推荐?比如二手盘、翻新盘或者其他性价比更高的选择?如果有使用经验分享,那就更好了!\u003C/p\u003E问题二:RAID1 转换问题\u003Cp\u003E另外,我还想请教一下,是否可以在不进行数据迁移的情况下,直接将现有的 RAID0 模式转为 RAID1 ?如果可以,具体操作步骤是怎样的?会不会有数据丢失的风险?\u003C/p\u003E我的设备信息:NAS:极空间 Z4Pro现有硬盘:16T 东芝 N300 NAS 盘( RAID0 模式)计划新增硬盘:16T 硬盘(型号待定)期待大家的回复:有没有靠谱的二手或翻新硬盘渠道推荐?RAID0 转 RAID1 是否可行?具体如何操作?如果有其他备份方案或建议,也欢迎分享!\u003Cp\u003E感谢各位大佬的帮助!🙏\u003C/p\u003E',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 13:36:48',updatedAt:'2025-03-30 11:39:32',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:84789,num:1,uid:3774,content:'单盘还能 raid0 ?',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 14:14:37',updatedAt:'2025-03-30 11:39:32',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:84790,num:2,uid:162,content:'去闲鱼当**佬,警告盘 C5 ,炒豆子盘有噪音的,只要无坏道就可以再战 3 年\u003Cbr\u003E数据按照优先级做备份',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 14:28:38',updatedAt:'2025-03-30 11:39:32',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:84791,num:3,uid:10795,content:'单盘还能 raid0 ?',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 16:59:53',updatedAt:'2025-03-30 11:39:32',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:84792,num:4,uid:3790,content:'1.拼夕夕 16T 2w 小时左右的企业盘,性价比还行\u003Cbr\u003E2.好奇一块盘怎么做 raid0 的?\u003Cbr\u003E3.建议 raid10',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 17:06:36',updatedAt:'2025-03-30 11:39:32',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:84793,num:5,uid:18,content:'HC550 ,购买渠道就自行选择\u003Cbr\u003E我个人是舍得买新盘的(NAS 我反而不舍得),也有很多 v2er 选 HC 系列矿盘\u003Cbr\u003E\u003Cbr\u003E纯备份真没必要 raid ,raid 作用是保持数据实时准确性\u003Cbr\u003E双备(重要数据肯定已经双备了吧),写个脚本定期 check checksum 就可以了',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 17:17:13',updatedAt:'2025-03-30 11:39:32',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:84794,num:6,uid:15365,content:'我感觉重要的文件夹开双备份就好了吧。没必要浪费空间搞 raid 。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 17:22:43',updatedAt:'2025-03-30 11:39:32',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:84795,num:7,uid:6511,content:'应该斟酌一下,那些数据是真的值得备份的,不超过 1t 就直接同步 OneDrive 吧。我自己统计了个人数据不超过 200G ,同时也舍不得上千块买的硬盘搞个 raid1 。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-27 17:55:29',updatedAt:'2025-03-30 11:39:32',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:84796,num:8,uid:15364,content:'修订一下:感谢🙏大家指正,确实是单盘模式不是 RAID0 ,目的确实是为了数据安全,需要采购一块硬盘用作备份。',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 13:48:22',updatedAt:'2025-03-30 11:39:32',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:84797,num:9,uid:12844,content:'那就买块 16G 做 raid1, 注意硬盘转数,组 raid 以最低转数为准',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 16:47:22',updatedAt:'2025-03-30 11:39:32',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:84798,num:10,uid:12844,content:'第十五章、磁碟配额(Quota)与进阶文件系统管理\u003Cbr\u003Ehttp://cn.linux.vbird.org/linux_basic/0420quota_2.php\u003Cbr\u003E\u003Cbr\u003E--鸟哥的 Linux 私房菜',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 16:52:49',updatedAt:'2025-03-30 11:39:32',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},{id:84799,num:11,uid:12844,content:'windows 创建软件 raid1\u003Cbr\u003Ehttps://blog.csdn.net/qq_43017750/article/details/112191892\u003Cbr\u003E\u003Cbr\u003Elinux 系统下创建 raid1——详细步骤操作\u003Cbr\u003Ehttps://blog.csdn.net/Houtieyu/article/details/108213095',ipRegion:'',updatedByUid:0,createdAt:'2025-03-28 16:54:45',updatedAt:'2025-03-30 11:39:32',mentionNum:0,mentionedBy:[],mentionUsers:[],likeUsers:[],},],usersMap:new Map([[15364,{uid:15364,url:'/u/342a07346a045d72636c526f16073a71',avatar:'/a/342a07346a045d72636c526f16073a71',username:'wuligao🤖',}],[3774,{uid:3774,url:'/u/620d43216a045c74676d526f11051213',avatar:'/a/620d43216a045c74676d526f11051213',username:'zyp38263547🤖',}],[162,{uid:162,url:'/u/0f3a413b6a045c77616c546f445c6075',avatar:'/a/0f3a413b6a045c77616c546f445c6075',username:'bzw875🤖',}],[15365,{uid:15365,url:'/u/132c015d6a045d72636c536f430a201e',avatar:'/a/132c015d6a045d72636c536f430a201e',username:'Goalonez🤖',}],[12844,{uid:12844,url:'/u/3170631c6a045d75686e526f4f041b2c',avatar:'/a/3170631c6a045d75686e526f4f041b2c',username:'Ffffanwu🤖',}],[10795,{uid:10795,url:'/u/220e401d6a045d776763536f323b3f08',avatar:'/a/220e401d6a045d776763536f323b3f08',username:'lanisle🤖',}],[6511,{uid:6511,url:'/u/633104286a045c71656b576f18023e14',avatar:'/a/633104286a045c71656b576f18023e14',username:'andyskaura🤖',}],[18,{uid:18,url:'/u/187f001b6a045c77606b5e6f00016033',avatar:'/a/187f001b6a045c77606b5e6f00016033',username:'NoOneNoBody🤖',}],[3790,{uid:3790,url:'/u/342b73386a045c746763566f14023604',avatar:'/a/342b73386a045c746763566f14023604',username:'vorabend🤖',}],]),related:[{title:'回顾 2024 年及以前你入手的迷你主机',url:'/d/690846086a045c77606a567a4551616a542d3d03',},{title:'玩 NAS 的人到底是被它的什么吸引了?',url:'/d/3c3150186a045c77606a567a455a6b6a2d2d323e',},{title:'晚上睡觉大家是否被光猫/路由器/Nas 的网口灯闪烁困扰?',url:'/d/3b1146396a045c77606a567a4758666a09083117',},{title:'ts-464c 便宜不',url:'/d/3633045e6a045c77606a5675425d666a3c2c2514',},{title:'寻找一款支持 SSD 的 NAS 升级现有 DS218+',url:'/d/6f7a412e6a045c77606a5675445b636a3412231a',},{title:'发几个馒头药',url:'/d/037e7c2b6a045c77606a5675455b666a3e042321',},{title:'qnap 威联通 nas 是我用过最难用的 nas,谨慎避坑',url:'/d/1b0a763a6a045c77606a5675475e646a1d112a63',},{title:'NAS 求推荐,绿联 DXP2800 vs 群晖 DS224+ (轻度使用+注重隐私)',url:'/d/303864176a045c77606a5675475e656a0e190418',},{title:'Nas 求推荐 少折腾、备份文件、至少 8t、不算盘 3000 左右',url:'/d/363150086a045c77606a5675475d6a6a2f160125',},{title:'小体积低功耗+ECC 内存的 NAS 有没有解',url:'/d/1d3a6a556a045c77606a5675475b606a08131522',},{title:'n150 的性能是物理飞牛还是虚拟飞牛?',url:'/d/220f56596a045c77606a56744e59626a20310b37',},{title:'没有 nas, win10 电脑里的片,能刮削么?',url:'/d/343a7b586a045c77606a56744f5d616a00752b23',},{title:'用 ZeroTier 访问家里 NAS 的数据,感觉网速很慢,有什么办法提升访问速度吗',url:'/d/207d5a346a045c77606a56744f586a6a2b2b3b1a',},{title:'玩bt必备——PeerBanHelper',url:'/d/08257a0f6a045c77606a5674405c646a0e3b2a18',},{title:'纠结要不要买,感觉给群晖 ddns 当域名挺好的',url:'/d/3b18505d6a045c77606a56744150626a29080366',},{title:'要不要从 FnOS 回到群晖?',url:'/d/2b2d581b6a045c77606a567441596b6a59306300',},{title:'6 路监控摄像头 存储到 nas 有什么好的方案吗?',url:'/d/140b5b0a6a045c77606a56744159616a15243433',},{title:'群晖 NAS DS920+如何实现在 iPad 上任何格式视频都能播放的效果?目前很多视频播放不了。',url:'/d/037b022e6a045c77606a5674425d636a2a33631d',},{title:'玩 pt 的硬盘,不适合开 windows server 的重复数据删除',url:'/d/6e3979356a045c77606a567444516a6a28280a65',},{title:'想把 nas 卖了用回 n1 盒子',url:'/d/1728672b6a045c77606a56744451606a582f3b64',},],} const App={setup(){const goTo=useGoTo() const{mdAndUp}=useDisplay() return{goTo,mdAndUp}},data(){return data;},mounted(){const themeDark=localStorage.getItem("themeDark") if(themeDark!==null){this.theme.dark=JSON.parse(themeDark)} if(this.nav.post.total>(this.nav.post.currentPage-1)*100+20){let moreLen=100 if(this.nav.post.total({id:null,num:(this.nav.post.currentPage-1)*100+v,uid:null,content:null,ipRegion:null,updatedByUid:null,createdAt:null,updatedAt:null,mentionNum:null,mentionedBy:null,mentionUsers:null,likeUsers:null,})) this.posts.push(...morePosts.slice(20))} this.workerStart() const hash=window.location.hash const match=hash.match(/#(\d+)/) if(match){const n=parseInt(match[1],10) if(n>=(this.nav.post.currentPage-1)*100&&n{this.jumpTo(n)})}} this.$nextTick(()=>{this.addHeadingIds() tocbot.init({tocSelector:'.toc',contentSelector:'#post-content-0',headingSelector:'h2, h3, h4',headingsOffset:100,scrollSmoothOffset:-100,scrollSmooth:true,collapseDepth:6,onClick:function(e){setTimeout(()=>{history.replaceState(null,'',window.location.pathname+window.location.search)},0)},}) tocbot.refresh()});},beforeUnmount(){this.workerStop() if(this.quill){this.quill.destroy() this.quill=null}},computed:{dposts(){return this.posts.slice(20);},},created(){},methods:{successAlert(msg){this.alert={show:true,color:'success',text:msg,timeout:1500,}},failureAlert(msg){this.alert={show:true,color:'error',text:msg,timeout:5000,}},flipThemeDark(){this.theme.dark=!this.theme.dark localStorage.setItem("themeDark",JSON.stringify(this.theme.dark))},toSearch(){if(!this.search.text){this.failureAlert('搜索词不能为空') return} let keywords=this.search.text.trim() if(keywords.length<1){this.failureAlert('搜索词不能为空') return} if(keywords.length>100){this.failureAlert('搜索词过长') return} this.doSearch(keywords)},toReg(){window.location.href="/reg"},toLogin(){window.location.href="/login"},toPage(){let url=window.location.href url=url.replace(/(\/\d+)?(#[0-9]+)?$/,this.nav.post.targetPage>1?`/${this.nav.post.targetPage}`:'') window.location.href=url},toLoadRelated({done}){if(this.my&&this.my.uid){this.apiLoadRelated({done})}else{done('ok')}},workerStart(){this.nav.post.worker=setInterval(()=>{this.workerLoad()},500);},workerStop(){if(this.nav.post.worker){clearInterval(this.nav.post.worker);this.nav.post.worker=null;}},async jumpTo(num){const page=Math.floor(num/100)+1 const i=num-(page-1)*100 if(page===this.nav.post.currentPage){this.goTo("#post-"+num,this.nav.post.goToOptions) if(!this.posts[i].id){const block=Math.floor(num/20)+1 this.nav.post.apiLock[block]=true await this.apiLoadPosts(block) this.$nextTick(()=>{this.goTo("#post-"+num,this.nav.post.goToOptions)})}}else{let url=window.location.href url=url.replace(/(\/\d+)?(#[0-9]+)?$/,page>1?`/${page}`:'') url=url+"#"+num window.location.href=url}},postIntersect(num){return(isIntersecting,entries,observer)=>{if(isIntersecting){this.nav.post.task.push(num) this.nav.post.active.push(num) this.nav.post.active=this.nav.post.active.filter(item=>Math.abs(item-num)<=5) this.nav.post.active.sort((a,b)=>a-b)}else{this.nav.post.active=this.nav.post.active.filter(item=>item!==num)} if(this.nav.post.active[0]){this.nav.post.anchor=this.nav.post.active[0]}else{this.nav.post.anchor=0}}},async apiLoadPosts(block){try{const response=await axios.post('/fapi/v1/post/block/'+block,{discussionId:this.nav.post.discussionId,}) if(response.data.code===0){response.data.data.posts.forEach(post=>{const i=post.num%100 Object.assign(this.posts[i],post)}) response.data.data.users.forEach(user=>{this.usersMap.set(user.uid,user)})}else{this.failureAlert('回帖数据加载失败: '+response.data.msg)}}catch(error){this.failureAlert('回帖数据加载失败: '+error)} this.nav.post.apiLock[block]=false},workerLoad(){while(this.nav.post.task.length){const num=this.nav.post.task.pop() const i=num-(this.nav.post.currentPage-1)*100 if(!this.posts[i].id){const block=Math.floor(num/20)+1 if(!this.nav.post.apiLock[block]){this.nav.post.apiLock[block]=true this.apiLoadPosts(block)}}}},getTimeInfo(t){if(!t){return ""} const now=new Date();const then=new Date(t);const diff=now-then;const minute=60*1000;const hour=minute*60;const day=hour*24;const month=day*30;const year=month*12;if(diffpost.num===num) if(!post){return "#"+num} const uid=post.uid const username=this.usersMap.get(uid)?.username if(!username){return "#"+num} return username},getUsernameByPostId(id){const post=this.posts.find(post=>post.id===id) if(!post){return "#"+this.getPostNumByPostId(id)} const uid=post.uid const username=this.usersMap.get(uid).username if(!username){return "#"+this.getPostNumByPostId(id)} return username},getPostNumByPostId(id){const post=this.posts.find(post=>post.id===id) return post.num},getPostById(id){const post=this.posts.find(post=>post.id===id) return post},getPostByNum(num){const post=this.posts.find(post=>post.num===num) return post},getAvatarByUid(uid){const avatar=this.usersMap.get(uid)?.avatar if(!avatar){return this.getRandomAvatar()} return avatar},getAvatarByPostNum(num){const post=this.posts.find(post=>post.num===num) if(!post){return this.getRandomAvatar()} const uid=post.uid return this.getAvatarByUid(uid)},getRandomAvatar(){const num=Math.floor(Math.random()*100) return "https://randomuser.me/api/portraits/men/"+num+".jpg"},getUrlByUid(uid){const url=this.usersMap.get(uid)?.url if(!url){return ""} return url},getTextByPostNum(num){const post=this.posts.find(post=>post.num===num) if(!post||!post.content){return '点击跳转到#'+num+'查看'} const parser=new DOMParser() const doc=parser.parseFromString(post.content,'text/html') const text=doc.body.textContent||'' return text.slice(0,100)},addHeadingIds(){const content=document.getElementById('post-content-0') if(!content){this.nav.showTOC=false return} const headings=content.querySelectorAll('h2, h3, h4') headings.forEach((heading,index)=>{if(!heading.id){heading.id=`toc-nav-${index}`}}) if(headings.length==0){this.nav.showTOC=false}},async doSearch(keywords){this.search.loading=true try{const response=await axios.post('/fapi/v1/search',{keywords:keywords,}) if(response.data.code===0){if(response.data.data.hash&&response.data.data.hash.length===32){window.location.href="/s/"+response.data.data.hash}else{this.failureAlert('搜索失败: 搜索服务异常')}}else{this.failureAlert('搜索失败: '+response.data.msg)}}catch(error){this.failureAlert('搜索失败: '+error)} this.search.loading=false},debounce(fn,delay){let timer=null return function(...args){if(timer)clearTimeout(timer) timer=setTimeout(()=>{fn.apply(this,args)},delay);};},},watch:{'nav.post.targetPage':{handler:async function(newV,oldV){this.toPage()},immediate:false},},} const vuetify=createVuetify({defaults:{global:{ripple:true,},},}) const app=createApp(App) app.use(vuetify).mount("#app")