2 |
DENIED
|
moderate
|
App\Entity\Entry {#1790
+user: Proxies\__CG__\App\Entity\User {#1913 …}
+magazine: App\Entity\Magazine {#316
+icon: Proxies\__CG__\App\Entity\Image {#297 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#326
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#288 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#284 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#273 …}
+entries: Doctrine\ORM\PersistentCollection {#231 …}
+posts: Doctrine\ORM\PersistentCollection {#189 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#251 …}
+bans: Doctrine\ORM\PersistentCollection {#168 …}
+reports: Doctrine\ORM\PersistentCollection {#154 …}
+badges: Doctrine\ORM\PersistentCollection {#132 …}
+logs: Doctrine\ORM\PersistentCollection {#122 …}
+awards: Doctrine\ORM\PersistentCollection {#111 …}
+categories: Doctrine\ORM\PersistentCollection {#98 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#320
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#319
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1837 …}
+slug: "Bcache-is-amazing-Making-HDD-way-faster"
+title: "Bcache is amazing!: Making HDD way faster!"
+url: null
+body: """
Okay, I love Linux. But I always surprised that I can love Linux ever more everyday. The possibility is basically endless!\n
\n
I asked about raid0 last week and got a lot of helpful answers. However, this[ answer ](https://lemmy.ml/comment/5577205)from [d3Xter](https://lemmy.ml/u/d3Xt3r@lemmy.nz) really helped me figures how I actually want to [configure my system](https://lemmy.ml/post/7585833). I decided to buy 2x500GB HDD and 120GB NVME SSD. It’s cheap, very cheap. Like $15 total. If there is anything wrong with them, I lost nothing. But boy did I get surprised. I tested BG3, a game that requires SSD to perform well and I see no difference between my old SSD and my new setup. It loads as fast (well, maybe 10-15s slower, but who cares?), and I do not need to wait for the textures to load, at all. Boot time is amazing. I notice no difference at all between this HDD and my last SSD setup. Which is insane!\n
\n
But the installation is confusing as hell. I write this pseudo-guide for anyone intersted.\n
\n
FIRST: DO NOT STORE ANY DATA IN THIS SETUP FOR ANYTHING REMOTE TO IMPORTANT!\n
\n
I favor performance for the cheapest possible above all else. Unless you want to buy 4 HDD to get raid10, do not store anything other than games and your apps on it. Do not use raid5 in this setup, [it sucks.](https://www.phoronix.com/news/Btrfs-RAID-56-Is-Bad)\n
\n
Second: Get yourself an Arch live USB stick with at least 8GB (4 might works, but smallest one I have is 8GB). I think you can use it on other distro, but Arch is the easiest if you want to install IT on the bcache drive. And make sure you booted into UEFI by typing:\n
\n
`ls /sys/firmware/efi/efivars/`\n
\n
Third: Installing bcache. After you have internet on your live system, remount your live iso so we can use the AUR.\n
\n
`mount -o remount,size=8G /run/archiso/cowspace`\n
\n
Then, install base-devel and git\n
\n
`pacman -S base-devel git --ignore linux`\n
\n
If you have slow internet, you can go to 2nd tty by pressing ctrl + alt + f2 and login as root there to do the next step, otherwise wait for the process to finish. We need to setup a user since makepkg wont run on root. So, type:\n
\n
`useradd -m -G wheel user && passwd user` and set your password Then we need the user to able to act as superuser. So, we edit `visudo` and add this line at the bottom: `user ALL=(ALL:ALL)ALL` save it and press ctrl + alt + f3, login as user you just set. Clone the bcache-tools AUR repo: `git clone https://aur.archlinux.org/bcache-tools.git && cd bcache-tools`\n
\n
If you want you can inspect the PKGBUILD, but we will proceed to make it, type:\n
\n
`makepkg -sri`\n
\n
Once it is done, it will throw error about vmliuz is not found, but the package itself is installed, you just need to tell the kernel to load it. We can achieve that by executing:\n
\n
`sudo modprobe bcache && sudo partprobe`\n
\n
Fouth: Configuring the bcache, btrfs, and raid0 List your drive with `lsblk` identify your HDD and your SSD. Let’s say in this instance, we have /dev/sda and /dev/sdb as our HDD and /dev/nvme0n1 as our SSD. I use cfdisk to partition my drive, but you can use whatever you want. I make one partition for both HDD, sda1 and sdb1, and make 3 partitions for my SSD. DO NOT FORMATI IT YET. /dev/sda1 : 500 GB HDD with 500GB partition /dev/sdb1 : same as before /dev/nvme0n1p1 : 118G SSD partition as the cache /dev/nvme0n1p2 : 1G partition as /boot. Even if you have one kernel, do not make a /boot partition less than 1G. I knew it in hard way. /dev/nvme0n1p3 : 200M partition as /boot/efi. Same as before, better safe than sorry. YOU NEED TO HAVE SEPARATE BOOT AND EFI PARTITION, OTHERWISE YOU WILL HAVE AN UNBOOTABLE SYSTEM!\n
\n
Okay, now we configure our raid.\n
\n
`make-bcache -B /dev/sda1 /dev/sdb1`\n
\n
This command will make a partition (?) called bcache0 and bcache1 under both /dev/sdb and /dev/sda if you use\n
\n
`lsblk`\n
\n
Now, we make raid out of those two.\n
\n
`mkfs.btrfs -L ARCHACHED -d raid0 /dev/bcache0 /dev/bcache1`\n
\n
Then the cache.\n
\n
`make-bcache -C /dev/nvme0n1p1`\n
\n
We can register the cache for our raid setup by its cset.uuid. To know what is the uuid, we can use this command.\n
\n
`bcache-super-show /dev/nvme0n1p1 |grep cset.uuid`\n
\n
Example of the output is:\n
\n
`cset.uuid fc3aac3b-9663-4067-88af-c5066a6c661b`\n
\n
From that, we can register it by using this command:\n
\n
`echo fc3aac3b-9663-4067-88af-c5066a6c661b > /sys/block/bcache0/bcache/attach`\n
\n
`echo fc3aac3b-9663-4067-88af-c5066a6c661b > /sys/block/bcache1/bcache/attach`\n
\n
Done! If you `lsblk` now, you can see that there is bcache0 and bcache1 under the nvme0n1p1 partition.\n
\n
Now, we can configure our boot partition.\n
\n
`mkfs.ext4 /dev/nvme0n1p2` (Remember, this is the 1G partition)\n
\n
`mkfs.vfat -F 32 /dev/nvme0n1p3` (Remember, this is the 200M partition)\n
\n
We can then mount all of those drive to install Arch.\n
\n
`mount /dev/bcache0 /mnt`\n
\n
`btrfs subvolume create /mnt/root`\n
\n
`btrfs subvolume create /mnt/var` (optional)\n
\n
`btrfs subvolume create /mnt/home` (optional)\n
\n
`umount /mnt`\n
\n
`mount /dev/bcache0 -o subvol=root,compress=lzo /mnt/`\n
\n
`mount --mkdir /dev/bcache0 -o subvol=home,compress=lzo /mnt/home`\n
\n
`mount --mkdir /dev/bcache0 -o subvol=var,compress=lzo /mnt/var`\n
\n
`mount --mkdir /dev/nvme0n1p2 /mnt/boot`\n
\n
`mount --mkdir /dev/nvme0n1p3 /mnt/boot/efi`\n
\n
Fifth: Install Arch Follow arch wiki, lol.\n
\n
Last: bcache-tools, mkinitcpio, and grub. Go back to tty3, the user one. And copy the bcache-tools package to your newly installed /mnt\n
\n
`sudo cp bcache-tools-1.1-1-x86_64.pkg.tar.zst /mnt`\n
\n
Then go back tty1 and install it on you arch-chroot.\n
\n
`pacman -U bcache-tools-1.1-1-x86_64.pkg.tar.zst`\n
\n
Now, we configure the mkinitcpio. Edit your mkinitcpio by using you editor of choice. And add bcache in in MODULES so it looks like this:\n
\n
`MODULES=(bcache)`\n
\n
And in HOOKS, add it after block and before filesystem. Example:\n
\n
`HOOKS=(base udev block bcache flesystem)`\n
\n
Make your initcpio by executing this command:\n
\n
`mkinitcpio -p linux`\n
\n
Grub is the last. Install it as usual. Just make sure you did the partition right, as mentioned before.\n
\n
That’s it. You just install Arch Linux on a bcache system. It’s complicated, and headache inducing for sure, but I assure you it is totally worth that pain.\n
\n
Note: If you have problem after you reboot, and want to arch-chroot, you need to install bcache-tools again. If you want to reformat anything and it shows the device as busy after you did the `partprobe`, you need to tell the kernel to stop any activity to the drive. In this example the sda is the one you want to edit.\n
\n
`echo 1 > /sys/block/sda/sda1/bcache/stop`\n
\n
Now, if you accidentally execute the command, you can use `partprobe` again to show it up.\n
\n
Reference: [wiki.archlinux.org/title/bcache](https://wiki.archlinux.org/title/bcache)[wiki.archlinux.org/title/btrfs](https://wiki.archlinux.org/title/btrfs)[gist.github.com/…/4c1492f537d9785e19406eb5cd99173…](https://gist.github.com/HardenedArray/4c1492f537d9785e19406eb5cd991735)[…kernel.org/…/Using_Btrfs_with_Multiple_Devices.h…](https://archive.kernel.org/oldwiki/btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices.html)
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 22
+favouriteCount: 131
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700152658 {#2445
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#2388 …}
+votes: Doctrine\ORM\PersistentCollection {#1916 …}
+reports: Doctrine\ORM\PersistentCollection {#1861 …}
+favourites: Doctrine\ORM\PersistentCollection {#1950 …}
+notifications: Doctrine\ORM\PersistentCollection {#1903 …}
+badges: Doctrine\ORM\PersistentCollection {#1364 …}
+children: []
-id: 13261
-titleTs: "'amaz':3 'bcach':1 'faster':7 'hdd':5 'make':4 'way':6"
-bodyTs: "'-15':125 '-4067':748,766,775 '-88':749,767,776 '-9663':747,765,774 '/4c1492f537d9785e19406eb5cd99173':1131 '/bcache-tools.git':448 '/boot':606,617 '/boot/efi':632 '/comment/5577205)from':40 '/dev/bcache0':700,836,855,864,873 '/dev/bcache1':701 '/dev/nvme0n1':544 '/dev/nvme0n1p1':595,709,737 '/dev/nvme0n1p2':602,807,882 '/dev/nvme0n1p3':628,817,886 '/dev/sda':537,682 '/dev/sda1':584,666 '/dev/sdb':539,680 '/dev/sdb1':591,667 '/hardenedarray/4c1492f537d9785e19406eb5cd991735)[':1134 '/mnt':837,853,861,920,924 '/mnt/boot':883 '/mnt/boot/efi':887 '/mnt/home':850,870 '/mnt/root':841 '/mnt/var':845,879 '/news/btrfs-raid-56-is-bad)':239 '/oldwiki/btrfs.wiki.kernel.org/index.php/using_btrfs_with_multiple_devices.html)':1139 '/post/7585833).':59 '/run/archiso/cowspace':323 '/sys/block/bcache0/bcache/attach':771 '/sys/block/bcache1/bcache/attach':780 '/sys/block/sda/sda1/bcache/stop':1110 '/sys/firmware/efi/efivars':296 '/title/bcache](https://wiki.archlinux.org/title/bcache)[wiki.archlinux.org/title/btrfs](https://wiki.archlinux.org/title/btrfs)[gist.github.com/':1130 '/u/d3xt3r@lemmy.nz)':44 '/using_btrfs_with_multiple_devices.h':1136 '1':1109 '10':124 '118g':596 '120gb':67 '15':76 '1g':603,621,812 '200m':629,822 '2nd':348 '2x500gb':64 '3':574 '32':816 '4':211,252 '500':585 '500gb':589 '8g':322 '8gb':251,261 'abl':403 'accident':1114 'achiev':502 'act':405 'activ':1092 'actual':51 'add':413,955,970 'af':751,769,778 'af-c5066a6c661b':750,768,777 'alt':353,429 'alway':7 'amaz':148 'answer':34,37 'anyon':180 'anyth':81,192,219,1070 'app':225 'arch':244,272,834,890,892,935,1019,1055 'arch-chroot':934,1054 'archach':697 'archive.kernel.org':1138 'archive.kernel.org/oldwiki/btrfs.wiki.kernel.org/index.php/using_btrfs_with_multiple_devices.html)':1137 'ask':23 'assur':1035 'aur':317,442 'aur.archlinux.org':447 'aur.archlinux.org/bcache-tools.git':446 'b':665 'back':903,927 'base':327,334,979 'base-devel':326,333 'basic':20 'bcach':284,299,440,451,508,514,664,707,734,897,913,956,966,982,1023,1062 'bcache-super-show':733 'bcache-tool':439,450,896,912,1061 'bcache-tools-1.1-1-x86_64.pkg.tar.zst':923,939 'bcache0':675,792 'bcache1':677,794 'better':636 'bg3':96 'block':973,981 'boot':145,290,645,804 'bottom':418 'boy':89 'btrfs':515,838,842,847 'busi':1077 'buy':63,210 'c':708 'c5066a6c661b':752,770,779 'cach':601,704,714 'call':674 'care':130 'cd':449 'cfdisk':550 'cheap':72,74 'cheapest':201 'choic':953 'chroot':936,1056 'clone':437,445 'command':669,732,762,990,1117 'complic':1027 'compress':859,868,877 'configur':54,512,659,802,942 'confus':170 'copi':910 'cp':922 'creat':840,844,849 'cset.uuid':721,739,745 'ctrl':352,428 'd':698 'd3xter':41 'data':187 'decid':61 'devel':328,335 'devic':1075 'differ':109,152 'distro':270 'done':474,781 'drive':285,520,554,831,1095 'easiest':275 'echo':763,772,1108 'edit':410,945,1107 'editor':951 'efi':647 'els':205 'endless':21 'error':478 'even':607 'ever':14 'everyday':16 'exampl':740,977,1098 'execut':505,988,1115 'f':815 'f2':354 'f3':430 'fast':121 'favor':197 'fc3aac3b':746,764,773 'fifth':888 'figur':48 'filesystem':976 'finish':371 'first':182 'flesystem':983 'follow':891 'formati':581 'found':483 'fouth':511 'g':388 'game':98,222 'gb':586 'get':92,214,241 'gist.github.com':1133 'gist.github.com/hardenedarray/4c1492f537d9785e19406eb5cd991735)[':1132 'git':330,336,444 'go':346,902,926 'got':29 'grep':738 'grub':901,994 'guid':178 'hard':626 'hdd':65,157,212,525,542,568,587 'headach':1029 'hell':172 'help':33,46 'home':867 'hook':969,978 'howev':35 'identifi':523 'ignor':337 'import':195 'induc':1030 'initcpio':986 'insan':165 'inspect':458 'instal':168,280,298,325,489,833,889,919,930,998,1018,1060 'instanc':534 'internet':303,343 'interst':181 'iso':311 'kernel':496,612,1088 'kernel.org':1135 'knew':623 'know':723 'l':696 'last':26,160,895,997 'least':250 'lemmy.ml':39,43,58 'lemmy.ml/comment/5577205)from':38 'lemmy.ml/post/7585833).':57 'lemmy.ml/u/d3xt3r@lemmy.nz)':42 'less':619 'let':529 'like':75,963 'line':415 'linux':4,13,338,993,1020 'list':518 'live':245,306,310 'load':119,142,498 'login':356,431 'lol':894 'look':962 'lost':86 'lot':31 'love':3,12 'ls':295 'lsblk':522,686,784 'lzo':860,869,878 'm':387 'make':287,466,563,573,615,663,671,689,706,984,1003 'make-bcach':662,705 'makepkg':379,469 'mayb':123 'mention':1011 'might':253 'mkdir':863,872,881,885 'mkfs.btrfs':695 'mkfs.ext4':806 'mkfs.vfat':814 'mkinitcpio':899,944,947,991 'modprob':507 'modul':959,965 'mount':318,827,835,854,862,871,880,884 'need':135,373,399,492,641,1058,1084 'new':116 'newli':918 'next':363 'note':1043 'noth':87 'notic':150 'nvme':68 'nvme0n1p1':797 'o':319,856,865,874 'okay':1,656 'old':112 'one':257,564,611,908,1103 'option':846,851 'otherwis':365,649 'output':743 'p':992 'packag':486,915 'pacman':331,937 'pain':1042 'partit':552,565,575,590,598,604,618,630,648,673,798,805,813,823,1008 'partprob':510,1082,1121 'passwd':391 'password':396 'perform':103,198 'pkgbuild':460 'possibl':18,202 'press':351,427 'problem':1047 'proceed':464 'process':369 'pseudo':177 'pseudo-guid':176 'raid':661,690,717 'raid0':25,517,699 'raid10':215 'raid5':231 'realli':45 'reboot':1050 'refer':1127 'reformat':1069 'regist':712,757 'rememb':808,818 'remot':193 'remount':308,320 'repo':443 'requir':100 'right':1009 'root':358,383,858 'run':381 'safe':637 'save':424 'say':531 'sda':1100 'sda1':569 'sdb1':571 'second':240 'see':107,788 'separ':644 'set':394,436 'setup':117,162,190,234,375,718 'show':736,1073,1124 'sinc':378 'size':321 'slow':342 'slower':127 'smallest':256 'sorri':639 'sri':470 'ssd':69,101,113,161,528,547,578,597 'step':364 'stick':247 'stop':1090 'store':185,218 'subvol':857,866,875 'subvolum':839,843,848 'suck':236 'sudo':506,509,921 'super':735 'superus':407 'sure':288,1004,1032 'surpris':8,93 'system':56,307,655,1024 'tell':494,1086 'test':95 'textur':140 'think':263 'third':297 'throw':477 'time':146 'tool':441,452,898,914,1063 'total':77,1039 'tti':349 'tty1':928 'tty3':905 'two':694 'type':294,385,468 'u':938 'udev':980 'uefi':292 'umount':852 'unboot':654 'unless':206 'usb':246 'use':230,266,315,549,558,685,730,760,949,1120 'user':377,390,392,401,419,433,907 'useradd':386 'usual':1001 'uuid':727 'var':876 'visudo':411 'vmliuz':480 'wait':137,366 'want':52,208,278,455,561,1052,1067,1105 'way':627 'week':27 'well':104,122 'whatev':559 'wheel':389 'wiki':893 'wiki.archlinux.org':1129 'wiki.archlinux.org/title/bcache](https://wiki.archlinux.org/title/bcache)[wiki.archlinux.org/title/btrfs](https://wiki.archlinux.org/title/btrfs)[gist.github.com/':1128 'wont':380 'work':254 'worth':1040 'write':174 'wrong':82 'www.phoronix.com':238 'www.phoronix.com/news/btrfs-raid-56-is-bad)':237 'yet':583"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1700146309
+visibility: "visible "
+apId: "https://lemmy.ml/post/8002348"
+editedAt: DateTimeImmutable @1700319306 {#102
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2390
date: 2023-11-15 15:51:49.0 +01:00
}
} |
3 |
DENIED
|
edit
|
App\Entity\Entry {#1790
+user: Proxies\__CG__\App\Entity\User {#1913 …}
+magazine: App\Entity\Magazine {#316
+icon: Proxies\__CG__\App\Entity\Image {#297 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#326
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#288 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#284 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#273 …}
+entries: Doctrine\ORM\PersistentCollection {#231 …}
+posts: Doctrine\ORM\PersistentCollection {#189 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#251 …}
+bans: Doctrine\ORM\PersistentCollection {#168 …}
+reports: Doctrine\ORM\PersistentCollection {#154 …}
+badges: Doctrine\ORM\PersistentCollection {#132 …}
+logs: Doctrine\ORM\PersistentCollection {#122 …}
+awards: Doctrine\ORM\PersistentCollection {#111 …}
+categories: Doctrine\ORM\PersistentCollection {#98 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#320
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#319
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1837 …}
+slug: "Bcache-is-amazing-Making-HDD-way-faster"
+title: "Bcache is amazing!: Making HDD way faster!"
+url: null
+body: """
Okay, I love Linux. But I always surprised that I can love Linux ever more everyday. The possibility is basically endless!\n
\n
I asked about raid0 last week and got a lot of helpful answers. However, this[ answer ](https://lemmy.ml/comment/5577205)from [d3Xter](https://lemmy.ml/u/d3Xt3r@lemmy.nz) really helped me figures how I actually want to [configure my system](https://lemmy.ml/post/7585833). I decided to buy 2x500GB HDD and 120GB NVME SSD. It’s cheap, very cheap. Like $15 total. If there is anything wrong with them, I lost nothing. But boy did I get surprised. I tested BG3, a game that requires SSD to perform well and I see no difference between my old SSD and my new setup. It loads as fast (well, maybe 10-15s slower, but who cares?), and I do not need to wait for the textures to load, at all. Boot time is amazing. I notice no difference at all between this HDD and my last SSD setup. Which is insane!\n
\n
But the installation is confusing as hell. I write this pseudo-guide for anyone intersted.\n
\n
FIRST: DO NOT STORE ANY DATA IN THIS SETUP FOR ANYTHING REMOTE TO IMPORTANT!\n
\n
I favor performance for the cheapest possible above all else. Unless you want to buy 4 HDD to get raid10, do not store anything other than games and your apps on it. Do not use raid5 in this setup, [it sucks.](https://www.phoronix.com/news/Btrfs-RAID-56-Is-Bad)\n
\n
Second: Get yourself an Arch live USB stick with at least 8GB (4 might works, but smallest one I have is 8GB). I think you can use it on other distro, but Arch is the easiest if you want to install IT on the bcache drive. And make sure you booted into UEFI by typing:\n
\n
`ls /sys/firmware/efi/efivars/`\n
\n
Third: Installing bcache. After you have internet on your live system, remount your live iso so we can use the AUR.\n
\n
`mount -o remount,size=8G /run/archiso/cowspace`\n
\n
Then, install base-devel and git\n
\n
`pacman -S base-devel git --ignore linux`\n
\n
If you have slow internet, you can go to 2nd tty by pressing ctrl + alt + f2 and login as root there to do the next step, otherwise wait for the process to finish. We need to setup a user since makepkg wont run on root. So, type:\n
\n
`useradd -m -G wheel user && passwd user` and set your password Then we need the user to able to act as superuser. So, we edit `visudo` and add this line at the bottom: `user ALL=(ALL:ALL)ALL` save it and press ctrl + alt + f3, login as user you just set. Clone the bcache-tools AUR repo: `git clone https://aur.archlinux.org/bcache-tools.git && cd bcache-tools`\n
\n
If you want you can inspect the PKGBUILD, but we will proceed to make it, type:\n
\n
`makepkg -sri`\n
\n
Once it is done, it will throw error about vmliuz is not found, but the package itself is installed, you just need to tell the kernel to load it. We can achieve that by executing:\n
\n
`sudo modprobe bcache && sudo partprobe`\n
\n
Fouth: Configuring the bcache, btrfs, and raid0 List your drive with `lsblk` identify your HDD and your SSD. Let’s say in this instance, we have /dev/sda and /dev/sdb as our HDD and /dev/nvme0n1 as our SSD. I use cfdisk to partition my drive, but you can use whatever you want. I make one partition for both HDD, sda1 and sdb1, and make 3 partitions for my SSD. DO NOT FORMATI IT YET. /dev/sda1 : 500 GB HDD with 500GB partition /dev/sdb1 : same as before /dev/nvme0n1p1 : 118G SSD partition as the cache /dev/nvme0n1p2 : 1G partition as /boot. Even if you have one kernel, do not make a /boot partition less than 1G. I knew it in hard way. /dev/nvme0n1p3 : 200M partition as /boot/efi. Same as before, better safe than sorry. YOU NEED TO HAVE SEPARATE BOOT AND EFI PARTITION, OTHERWISE YOU WILL HAVE AN UNBOOTABLE SYSTEM!\n
\n
Okay, now we configure our raid.\n
\n
`make-bcache -B /dev/sda1 /dev/sdb1`\n
\n
This command will make a partition (?) called bcache0 and bcache1 under both /dev/sdb and /dev/sda if you use\n
\n
`lsblk`\n
\n
Now, we make raid out of those two.\n
\n
`mkfs.btrfs -L ARCHACHED -d raid0 /dev/bcache0 /dev/bcache1`\n
\n
Then the cache.\n
\n
`make-bcache -C /dev/nvme0n1p1`\n
\n
We can register the cache for our raid setup by its cset.uuid. To know what is the uuid, we can use this command.\n
\n
`bcache-super-show /dev/nvme0n1p1 |grep cset.uuid`\n
\n
Example of the output is:\n
\n
`cset.uuid fc3aac3b-9663-4067-88af-c5066a6c661b`\n
\n
From that, we can register it by using this command:\n
\n
`echo fc3aac3b-9663-4067-88af-c5066a6c661b > /sys/block/bcache0/bcache/attach`\n
\n
`echo fc3aac3b-9663-4067-88af-c5066a6c661b > /sys/block/bcache1/bcache/attach`\n
\n
Done! If you `lsblk` now, you can see that there is bcache0 and bcache1 under the nvme0n1p1 partition.\n
\n
Now, we can configure our boot partition.\n
\n
`mkfs.ext4 /dev/nvme0n1p2` (Remember, this is the 1G partition)\n
\n
`mkfs.vfat -F 32 /dev/nvme0n1p3` (Remember, this is the 200M partition)\n
\n
We can then mount all of those drive to install Arch.\n
\n
`mount /dev/bcache0 /mnt`\n
\n
`btrfs subvolume create /mnt/root`\n
\n
`btrfs subvolume create /mnt/var` (optional)\n
\n
`btrfs subvolume create /mnt/home` (optional)\n
\n
`umount /mnt`\n
\n
`mount /dev/bcache0 -o subvol=root,compress=lzo /mnt/`\n
\n
`mount --mkdir /dev/bcache0 -o subvol=home,compress=lzo /mnt/home`\n
\n
`mount --mkdir /dev/bcache0 -o subvol=var,compress=lzo /mnt/var`\n
\n
`mount --mkdir /dev/nvme0n1p2 /mnt/boot`\n
\n
`mount --mkdir /dev/nvme0n1p3 /mnt/boot/efi`\n
\n
Fifth: Install Arch Follow arch wiki, lol.\n
\n
Last: bcache-tools, mkinitcpio, and grub. Go back to tty3, the user one. And copy the bcache-tools package to your newly installed /mnt\n
\n
`sudo cp bcache-tools-1.1-1-x86_64.pkg.tar.zst /mnt`\n
\n
Then go back tty1 and install it on you arch-chroot.\n
\n
`pacman -U bcache-tools-1.1-1-x86_64.pkg.tar.zst`\n
\n
Now, we configure the mkinitcpio. Edit your mkinitcpio by using you editor of choice. And add bcache in in MODULES so it looks like this:\n
\n
`MODULES=(bcache)`\n
\n
And in HOOKS, add it after block and before filesystem. Example:\n
\n
`HOOKS=(base udev block bcache flesystem)`\n
\n
Make your initcpio by executing this command:\n
\n
`mkinitcpio -p linux`\n
\n
Grub is the last. Install it as usual. Just make sure you did the partition right, as mentioned before.\n
\n
That’s it. You just install Arch Linux on a bcache system. It’s complicated, and headache inducing for sure, but I assure you it is totally worth that pain.\n
\n
Note: If you have problem after you reboot, and want to arch-chroot, you need to install bcache-tools again. If you want to reformat anything and it shows the device as busy after you did the `partprobe`, you need to tell the kernel to stop any activity to the drive. In this example the sda is the one you want to edit.\n
\n
`echo 1 > /sys/block/sda/sda1/bcache/stop`\n
\n
Now, if you accidentally execute the command, you can use `partprobe` again to show it up.\n
\n
Reference: [wiki.archlinux.org/title/bcache](https://wiki.archlinux.org/title/bcache)[wiki.archlinux.org/title/btrfs](https://wiki.archlinux.org/title/btrfs)[gist.github.com/…/4c1492f537d9785e19406eb5cd99173…](https://gist.github.com/HardenedArray/4c1492f537d9785e19406eb5cd991735)[…kernel.org/…/Using_Btrfs_with_Multiple_Devices.h…](https://archive.kernel.org/oldwiki/btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices.html)
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 22
+favouriteCount: 131
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700152658 {#2445
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#2388 …}
+votes: Doctrine\ORM\PersistentCollection {#1916 …}
+reports: Doctrine\ORM\PersistentCollection {#1861 …}
+favourites: Doctrine\ORM\PersistentCollection {#1950 …}
+notifications: Doctrine\ORM\PersistentCollection {#1903 …}
+badges: Doctrine\ORM\PersistentCollection {#1364 …}
+children: []
-id: 13261
-titleTs: "'amaz':3 'bcach':1 'faster':7 'hdd':5 'make':4 'way':6"
-bodyTs: "'-15':125 '-4067':748,766,775 '-88':749,767,776 '-9663':747,765,774 '/4c1492f537d9785e19406eb5cd99173':1131 '/bcache-tools.git':448 '/boot':606,617 '/boot/efi':632 '/comment/5577205)from':40 '/dev/bcache0':700,836,855,864,873 '/dev/bcache1':701 '/dev/nvme0n1':544 '/dev/nvme0n1p1':595,709,737 '/dev/nvme0n1p2':602,807,882 '/dev/nvme0n1p3':628,817,886 '/dev/sda':537,682 '/dev/sda1':584,666 '/dev/sdb':539,680 '/dev/sdb1':591,667 '/hardenedarray/4c1492f537d9785e19406eb5cd991735)[':1134 '/mnt':837,853,861,920,924 '/mnt/boot':883 '/mnt/boot/efi':887 '/mnt/home':850,870 '/mnt/root':841 '/mnt/var':845,879 '/news/btrfs-raid-56-is-bad)':239 '/oldwiki/btrfs.wiki.kernel.org/index.php/using_btrfs_with_multiple_devices.html)':1139 '/post/7585833).':59 '/run/archiso/cowspace':323 '/sys/block/bcache0/bcache/attach':771 '/sys/block/bcache1/bcache/attach':780 '/sys/block/sda/sda1/bcache/stop':1110 '/sys/firmware/efi/efivars':296 '/title/bcache](https://wiki.archlinux.org/title/bcache)[wiki.archlinux.org/title/btrfs](https://wiki.archlinux.org/title/btrfs)[gist.github.com/':1130 '/u/d3xt3r@lemmy.nz)':44 '/using_btrfs_with_multiple_devices.h':1136 '1':1109 '10':124 '118g':596 '120gb':67 '15':76 '1g':603,621,812 '200m':629,822 '2nd':348 '2x500gb':64 '3':574 '32':816 '4':211,252 '500':585 '500gb':589 '8g':322 '8gb':251,261 'abl':403 'accident':1114 'achiev':502 'act':405 'activ':1092 'actual':51 'add':413,955,970 'af':751,769,778 'af-c5066a6c661b':750,768,777 'alt':353,429 'alway':7 'amaz':148 'answer':34,37 'anyon':180 'anyth':81,192,219,1070 'app':225 'arch':244,272,834,890,892,935,1019,1055 'arch-chroot':934,1054 'archach':697 'archive.kernel.org':1138 'archive.kernel.org/oldwiki/btrfs.wiki.kernel.org/index.php/using_btrfs_with_multiple_devices.html)':1137 'ask':23 'assur':1035 'aur':317,442 'aur.archlinux.org':447 'aur.archlinux.org/bcache-tools.git':446 'b':665 'back':903,927 'base':327,334,979 'base-devel':326,333 'basic':20 'bcach':284,299,440,451,508,514,664,707,734,897,913,956,966,982,1023,1062 'bcache-super-show':733 'bcache-tool':439,450,896,912,1061 'bcache-tools-1.1-1-x86_64.pkg.tar.zst':923,939 'bcache0':675,792 'bcache1':677,794 'better':636 'bg3':96 'block':973,981 'boot':145,290,645,804 'bottom':418 'boy':89 'btrfs':515,838,842,847 'busi':1077 'buy':63,210 'c':708 'c5066a6c661b':752,770,779 'cach':601,704,714 'call':674 'care':130 'cd':449 'cfdisk':550 'cheap':72,74 'cheapest':201 'choic':953 'chroot':936,1056 'clone':437,445 'command':669,732,762,990,1117 'complic':1027 'compress':859,868,877 'configur':54,512,659,802,942 'confus':170 'copi':910 'cp':922 'creat':840,844,849 'cset.uuid':721,739,745 'ctrl':352,428 'd':698 'd3xter':41 'data':187 'decid':61 'devel':328,335 'devic':1075 'differ':109,152 'distro':270 'done':474,781 'drive':285,520,554,831,1095 'easiest':275 'echo':763,772,1108 'edit':410,945,1107 'editor':951 'efi':647 'els':205 'endless':21 'error':478 'even':607 'ever':14 'everyday':16 'exampl':740,977,1098 'execut':505,988,1115 'f':815 'f2':354 'f3':430 'fast':121 'favor':197 'fc3aac3b':746,764,773 'fifth':888 'figur':48 'filesystem':976 'finish':371 'first':182 'flesystem':983 'follow':891 'formati':581 'found':483 'fouth':511 'g':388 'game':98,222 'gb':586 'get':92,214,241 'gist.github.com':1133 'gist.github.com/hardenedarray/4c1492f537d9785e19406eb5cd991735)[':1132 'git':330,336,444 'go':346,902,926 'got':29 'grep':738 'grub':901,994 'guid':178 'hard':626 'hdd':65,157,212,525,542,568,587 'headach':1029 'hell':172 'help':33,46 'home':867 'hook':969,978 'howev':35 'identifi':523 'ignor':337 'import':195 'induc':1030 'initcpio':986 'insan':165 'inspect':458 'instal':168,280,298,325,489,833,889,919,930,998,1018,1060 'instanc':534 'internet':303,343 'interst':181 'iso':311 'kernel':496,612,1088 'kernel.org':1135 'knew':623 'know':723 'l':696 'last':26,160,895,997 'least':250 'lemmy.ml':39,43,58 'lemmy.ml/comment/5577205)from':38 'lemmy.ml/post/7585833).':57 'lemmy.ml/u/d3xt3r@lemmy.nz)':42 'less':619 'let':529 'like':75,963 'line':415 'linux':4,13,338,993,1020 'list':518 'live':245,306,310 'load':119,142,498 'login':356,431 'lol':894 'look':962 'lost':86 'lot':31 'love':3,12 'ls':295 'lsblk':522,686,784 'lzo':860,869,878 'm':387 'make':287,466,563,573,615,663,671,689,706,984,1003 'make-bcach':662,705 'makepkg':379,469 'mayb':123 'mention':1011 'might':253 'mkdir':863,872,881,885 'mkfs.btrfs':695 'mkfs.ext4':806 'mkfs.vfat':814 'mkinitcpio':899,944,947,991 'modprob':507 'modul':959,965 'mount':318,827,835,854,862,871,880,884 'need':135,373,399,492,641,1058,1084 'new':116 'newli':918 'next':363 'note':1043 'noth':87 'notic':150 'nvme':68 'nvme0n1p1':797 'o':319,856,865,874 'okay':1,656 'old':112 'one':257,564,611,908,1103 'option':846,851 'otherwis':365,649 'output':743 'p':992 'packag':486,915 'pacman':331,937 'pain':1042 'partit':552,565,575,590,598,604,618,630,648,673,798,805,813,823,1008 'partprob':510,1082,1121 'passwd':391 'password':396 'perform':103,198 'pkgbuild':460 'possibl':18,202 'press':351,427 'problem':1047 'proceed':464 'process':369 'pseudo':177 'pseudo-guid':176 'raid':661,690,717 'raid0':25,517,699 'raid10':215 'raid5':231 'realli':45 'reboot':1050 'refer':1127 'reformat':1069 'regist':712,757 'rememb':808,818 'remot':193 'remount':308,320 'repo':443 'requir':100 'right':1009 'root':358,383,858 'run':381 'safe':637 'save':424 'say':531 'sda':1100 'sda1':569 'sdb1':571 'second':240 'see':107,788 'separ':644 'set':394,436 'setup':117,162,190,234,375,718 'show':736,1073,1124 'sinc':378 'size':321 'slow':342 'slower':127 'smallest':256 'sorri':639 'sri':470 'ssd':69,101,113,161,528,547,578,597 'step':364 'stick':247 'stop':1090 'store':185,218 'subvol':857,866,875 'subvolum':839,843,848 'suck':236 'sudo':506,509,921 'super':735 'superus':407 'sure':288,1004,1032 'surpris':8,93 'system':56,307,655,1024 'tell':494,1086 'test':95 'textur':140 'think':263 'third':297 'throw':477 'time':146 'tool':441,452,898,914,1063 'total':77,1039 'tti':349 'tty1':928 'tty3':905 'two':694 'type':294,385,468 'u':938 'udev':980 'uefi':292 'umount':852 'unboot':654 'unless':206 'usb':246 'use':230,266,315,549,558,685,730,760,949,1120 'user':377,390,392,401,419,433,907 'useradd':386 'usual':1001 'uuid':727 'var':876 'visudo':411 'vmliuz':480 'wait':137,366 'want':52,208,278,455,561,1052,1067,1105 'way':627 'week':27 'well':104,122 'whatev':559 'wheel':389 'wiki':893 'wiki.archlinux.org':1129 'wiki.archlinux.org/title/bcache](https://wiki.archlinux.org/title/bcache)[wiki.archlinux.org/title/btrfs](https://wiki.archlinux.org/title/btrfs)[gist.github.com/':1128 'wont':380 'work':254 'worth':1040 'write':174 'wrong':82 'www.phoronix.com':238 'www.phoronix.com/news/btrfs-raid-56-is-bad)':237 'yet':583"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1700146309
+visibility: "visible "
+apId: "https://lemmy.ml/post/8002348"
+editedAt: DateTimeImmutable @1700319306 {#102
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2390
date: 2023-11-15 15:51:49.0 +01:00
}
} |
4 |
DENIED
|
moderate
|
App\Entity\Entry {#1790
+user: Proxies\__CG__\App\Entity\User {#1913 …}
+magazine: App\Entity\Magazine {#316
+icon: Proxies\__CG__\App\Entity\Image {#297 …}
+name: "linux@lemmy.ml"
+title: "linux"
+description: """
From Wikipedia, the free encyclopedia\n
\n
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).\n
\n
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.\n
\n
### Rules\n
\n
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.\n
- No misinformation\n
- No NSFW content\n
- No hate speech, bigotry, etc\n
\n
### Related Communities\n
\n
- [!opensource@lemmy.ml](https://lemmy.ml/c/opensource)\n
- [!libre_culture@lemmy.ml](https://lemmy.ml/c/libre_culture)\n
- [!technology@lemmy.ml](https://lemmy.ml/c/technology)\n
- [!libre_hardware@lemmy.ml](https://lemmy.ml/c/libre_hardware)\n
\n
Community icon by [Alpár-Etele Méder](https://www.iconfinder.com/pocike), licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
"""
+rules: null
+subscriptionsCount: 1
+entryCount: 1406
+entryCommentCount: 28632
+postCount: 6
+postCommentCount: 214
+isAdult: false
+customCss: null
+lastActive: DateTime @1729583542 {#326
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#288 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#284 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#273 …}
+entries: Doctrine\ORM\PersistentCollection {#231 …}
+posts: Doctrine\ORM\PersistentCollection {#189 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#251 …}
+bans: Doctrine\ORM\PersistentCollection {#168 …}
+reports: Doctrine\ORM\PersistentCollection {#154 …}
+badges: Doctrine\ORM\PersistentCollection {#132 …}
+logs: Doctrine\ORM\PersistentCollection {#122 …}
+awards: Doctrine\ORM\PersistentCollection {#111 …}
+categories: Doctrine\ORM\PersistentCollection {#98 …}
-id: 73
+apId: "linux@lemmy.ml"
+apProfileId: "https://lemmy.ml/c/linux"
+apPublicUrl: "https://lemmy.ml/c/linux"
+apFollowersUrl: "https://lemmy.ml/c/linux/followers"
+apInboxUrl: "https://lemmy.ml/inbox"
+apDomain: "lemmy.ml"
+apPreferredUsername: "linux"
+apDiscoverable: true
+apManuallyApprovesFollowers: null
+privateKey: null
+publicKey: null
+apFetchedAt: DateTime @1729583596 {#320
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#319
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1837 …}
+slug: "Bcache-is-amazing-Making-HDD-way-faster"
+title: "Bcache is amazing!: Making HDD way faster!"
+url: null
+body: """
Okay, I love Linux. But I always surprised that I can love Linux ever more everyday. The possibility is basically endless!\n
\n
I asked about raid0 last week and got a lot of helpful answers. However, this[ answer ](https://lemmy.ml/comment/5577205)from [d3Xter](https://lemmy.ml/u/d3Xt3r@lemmy.nz) really helped me figures how I actually want to [configure my system](https://lemmy.ml/post/7585833). I decided to buy 2x500GB HDD and 120GB NVME SSD. It’s cheap, very cheap. Like $15 total. If there is anything wrong with them, I lost nothing. But boy did I get surprised. I tested BG3, a game that requires SSD to perform well and I see no difference between my old SSD and my new setup. It loads as fast (well, maybe 10-15s slower, but who cares?), and I do not need to wait for the textures to load, at all. Boot time is amazing. I notice no difference at all between this HDD and my last SSD setup. Which is insane!\n
\n
But the installation is confusing as hell. I write this pseudo-guide for anyone intersted.\n
\n
FIRST: DO NOT STORE ANY DATA IN THIS SETUP FOR ANYTHING REMOTE TO IMPORTANT!\n
\n
I favor performance for the cheapest possible above all else. Unless you want to buy 4 HDD to get raid10, do not store anything other than games and your apps on it. Do not use raid5 in this setup, [it sucks.](https://www.phoronix.com/news/Btrfs-RAID-56-Is-Bad)\n
\n
Second: Get yourself an Arch live USB stick with at least 8GB (4 might works, but smallest one I have is 8GB). I think you can use it on other distro, but Arch is the easiest if you want to install IT on the bcache drive. And make sure you booted into UEFI by typing:\n
\n
`ls /sys/firmware/efi/efivars/`\n
\n
Third: Installing bcache. After you have internet on your live system, remount your live iso so we can use the AUR.\n
\n
`mount -o remount,size=8G /run/archiso/cowspace`\n
\n
Then, install base-devel and git\n
\n
`pacman -S base-devel git --ignore linux`\n
\n
If you have slow internet, you can go to 2nd tty by pressing ctrl + alt + f2 and login as root there to do the next step, otherwise wait for the process to finish. We need to setup a user since makepkg wont run on root. So, type:\n
\n
`useradd -m -G wheel user && passwd user` and set your password Then we need the user to able to act as superuser. So, we edit `visudo` and add this line at the bottom: `user ALL=(ALL:ALL)ALL` save it and press ctrl + alt + f3, login as user you just set. Clone the bcache-tools AUR repo: `git clone https://aur.archlinux.org/bcache-tools.git && cd bcache-tools`\n
\n
If you want you can inspect the PKGBUILD, but we will proceed to make it, type:\n
\n
`makepkg -sri`\n
\n
Once it is done, it will throw error about vmliuz is not found, but the package itself is installed, you just need to tell the kernel to load it. We can achieve that by executing:\n
\n
`sudo modprobe bcache && sudo partprobe`\n
\n
Fouth: Configuring the bcache, btrfs, and raid0 List your drive with `lsblk` identify your HDD and your SSD. Let’s say in this instance, we have /dev/sda and /dev/sdb as our HDD and /dev/nvme0n1 as our SSD. I use cfdisk to partition my drive, but you can use whatever you want. I make one partition for both HDD, sda1 and sdb1, and make 3 partitions for my SSD. DO NOT FORMATI IT YET. /dev/sda1 : 500 GB HDD with 500GB partition /dev/sdb1 : same as before /dev/nvme0n1p1 : 118G SSD partition as the cache /dev/nvme0n1p2 : 1G partition as /boot. Even if you have one kernel, do not make a /boot partition less than 1G. I knew it in hard way. /dev/nvme0n1p3 : 200M partition as /boot/efi. Same as before, better safe than sorry. YOU NEED TO HAVE SEPARATE BOOT AND EFI PARTITION, OTHERWISE YOU WILL HAVE AN UNBOOTABLE SYSTEM!\n
\n
Okay, now we configure our raid.\n
\n
`make-bcache -B /dev/sda1 /dev/sdb1`\n
\n
This command will make a partition (?) called bcache0 and bcache1 under both /dev/sdb and /dev/sda if you use\n
\n
`lsblk`\n
\n
Now, we make raid out of those two.\n
\n
`mkfs.btrfs -L ARCHACHED -d raid0 /dev/bcache0 /dev/bcache1`\n
\n
Then the cache.\n
\n
`make-bcache -C /dev/nvme0n1p1`\n
\n
We can register the cache for our raid setup by its cset.uuid. To know what is the uuid, we can use this command.\n
\n
`bcache-super-show /dev/nvme0n1p1 |grep cset.uuid`\n
\n
Example of the output is:\n
\n
`cset.uuid fc3aac3b-9663-4067-88af-c5066a6c661b`\n
\n
From that, we can register it by using this command:\n
\n
`echo fc3aac3b-9663-4067-88af-c5066a6c661b > /sys/block/bcache0/bcache/attach`\n
\n
`echo fc3aac3b-9663-4067-88af-c5066a6c661b > /sys/block/bcache1/bcache/attach`\n
\n
Done! If you `lsblk` now, you can see that there is bcache0 and bcache1 under the nvme0n1p1 partition.\n
\n
Now, we can configure our boot partition.\n
\n
`mkfs.ext4 /dev/nvme0n1p2` (Remember, this is the 1G partition)\n
\n
`mkfs.vfat -F 32 /dev/nvme0n1p3` (Remember, this is the 200M partition)\n
\n
We can then mount all of those drive to install Arch.\n
\n
`mount /dev/bcache0 /mnt`\n
\n
`btrfs subvolume create /mnt/root`\n
\n
`btrfs subvolume create /mnt/var` (optional)\n
\n
`btrfs subvolume create /mnt/home` (optional)\n
\n
`umount /mnt`\n
\n
`mount /dev/bcache0 -o subvol=root,compress=lzo /mnt/`\n
\n
`mount --mkdir /dev/bcache0 -o subvol=home,compress=lzo /mnt/home`\n
\n
`mount --mkdir /dev/bcache0 -o subvol=var,compress=lzo /mnt/var`\n
\n
`mount --mkdir /dev/nvme0n1p2 /mnt/boot`\n
\n
`mount --mkdir /dev/nvme0n1p3 /mnt/boot/efi`\n
\n
Fifth: Install Arch Follow arch wiki, lol.\n
\n
Last: bcache-tools, mkinitcpio, and grub. Go back to tty3, the user one. And copy the bcache-tools package to your newly installed /mnt\n
\n
`sudo cp bcache-tools-1.1-1-x86_64.pkg.tar.zst /mnt`\n
\n
Then go back tty1 and install it on you arch-chroot.\n
\n
`pacman -U bcache-tools-1.1-1-x86_64.pkg.tar.zst`\n
\n
Now, we configure the mkinitcpio. Edit your mkinitcpio by using you editor of choice. And add bcache in in MODULES so it looks like this:\n
\n
`MODULES=(bcache)`\n
\n
And in HOOKS, add it after block and before filesystem. Example:\n
\n
`HOOKS=(base udev block bcache flesystem)`\n
\n
Make your initcpio by executing this command:\n
\n
`mkinitcpio -p linux`\n
\n
Grub is the last. Install it as usual. Just make sure you did the partition right, as mentioned before.\n
\n
That’s it. You just install Arch Linux on a bcache system. It’s complicated, and headache inducing for sure, but I assure you it is totally worth that pain.\n
\n
Note: If you have problem after you reboot, and want to arch-chroot, you need to install bcache-tools again. If you want to reformat anything and it shows the device as busy after you did the `partprobe`, you need to tell the kernel to stop any activity to the drive. In this example the sda is the one you want to edit.\n
\n
`echo 1 > /sys/block/sda/sda1/bcache/stop`\n
\n
Now, if you accidentally execute the command, you can use `partprobe` again to show it up.\n
\n
Reference: [wiki.archlinux.org/title/bcache](https://wiki.archlinux.org/title/bcache)[wiki.archlinux.org/title/btrfs](https://wiki.archlinux.org/title/btrfs)[gist.github.com/…/4c1492f537d9785e19406eb5cd99173…](https://gist.github.com/HardenedArray/4c1492f537d9785e19406eb5cd991735)[…kernel.org/…/Using_Btrfs_with_Multiple_Devices.h…](https://archive.kernel.org/oldwiki/btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices.html)
"""
+type: "article"
+lang: "en"
+isOc: false
+hasEmbed: false
+commentCount: 22
+favouriteCount: 131
+score: 0
+isAdult: false
+sticky: false
+lastActive: DateTime @1700152658 {#2445
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#2388 …}
+votes: Doctrine\ORM\PersistentCollection {#1916 …}
+reports: Doctrine\ORM\PersistentCollection {#1861 …}
+favourites: Doctrine\ORM\PersistentCollection {#1950 …}
+notifications: Doctrine\ORM\PersistentCollection {#1903 …}
+badges: Doctrine\ORM\PersistentCollection {#1364 …}
+children: []
-id: 13261
-titleTs: "'amaz':3 'bcach':1 'faster':7 'hdd':5 'make':4 'way':6"
-bodyTs: "'-15':125 '-4067':748,766,775 '-88':749,767,776 '-9663':747,765,774 '/4c1492f537d9785e19406eb5cd99173':1131 '/bcache-tools.git':448 '/boot':606,617 '/boot/efi':632 '/comment/5577205)from':40 '/dev/bcache0':700,836,855,864,873 '/dev/bcache1':701 '/dev/nvme0n1':544 '/dev/nvme0n1p1':595,709,737 '/dev/nvme0n1p2':602,807,882 '/dev/nvme0n1p3':628,817,886 '/dev/sda':537,682 '/dev/sda1':584,666 '/dev/sdb':539,680 '/dev/sdb1':591,667 '/hardenedarray/4c1492f537d9785e19406eb5cd991735)[':1134 '/mnt':837,853,861,920,924 '/mnt/boot':883 '/mnt/boot/efi':887 '/mnt/home':850,870 '/mnt/root':841 '/mnt/var':845,879 '/news/btrfs-raid-56-is-bad)':239 '/oldwiki/btrfs.wiki.kernel.org/index.php/using_btrfs_with_multiple_devices.html)':1139 '/post/7585833).':59 '/run/archiso/cowspace':323 '/sys/block/bcache0/bcache/attach':771 '/sys/block/bcache1/bcache/attach':780 '/sys/block/sda/sda1/bcache/stop':1110 '/sys/firmware/efi/efivars':296 '/title/bcache](https://wiki.archlinux.org/title/bcache)[wiki.archlinux.org/title/btrfs](https://wiki.archlinux.org/title/btrfs)[gist.github.com/':1130 '/u/d3xt3r@lemmy.nz)':44 '/using_btrfs_with_multiple_devices.h':1136 '1':1109 '10':124 '118g':596 '120gb':67 '15':76 '1g':603,621,812 '200m':629,822 '2nd':348 '2x500gb':64 '3':574 '32':816 '4':211,252 '500':585 '500gb':589 '8g':322 '8gb':251,261 'abl':403 'accident':1114 'achiev':502 'act':405 'activ':1092 'actual':51 'add':413,955,970 'af':751,769,778 'af-c5066a6c661b':750,768,777 'alt':353,429 'alway':7 'amaz':148 'answer':34,37 'anyon':180 'anyth':81,192,219,1070 'app':225 'arch':244,272,834,890,892,935,1019,1055 'arch-chroot':934,1054 'archach':697 'archive.kernel.org':1138 'archive.kernel.org/oldwiki/btrfs.wiki.kernel.org/index.php/using_btrfs_with_multiple_devices.html)':1137 'ask':23 'assur':1035 'aur':317,442 'aur.archlinux.org':447 'aur.archlinux.org/bcache-tools.git':446 'b':665 'back':903,927 'base':327,334,979 'base-devel':326,333 'basic':20 'bcach':284,299,440,451,508,514,664,707,734,897,913,956,966,982,1023,1062 'bcache-super-show':733 'bcache-tool':439,450,896,912,1061 'bcache-tools-1.1-1-x86_64.pkg.tar.zst':923,939 'bcache0':675,792 'bcache1':677,794 'better':636 'bg3':96 'block':973,981 'boot':145,290,645,804 'bottom':418 'boy':89 'btrfs':515,838,842,847 'busi':1077 'buy':63,210 'c':708 'c5066a6c661b':752,770,779 'cach':601,704,714 'call':674 'care':130 'cd':449 'cfdisk':550 'cheap':72,74 'cheapest':201 'choic':953 'chroot':936,1056 'clone':437,445 'command':669,732,762,990,1117 'complic':1027 'compress':859,868,877 'configur':54,512,659,802,942 'confus':170 'copi':910 'cp':922 'creat':840,844,849 'cset.uuid':721,739,745 'ctrl':352,428 'd':698 'd3xter':41 'data':187 'decid':61 'devel':328,335 'devic':1075 'differ':109,152 'distro':270 'done':474,781 'drive':285,520,554,831,1095 'easiest':275 'echo':763,772,1108 'edit':410,945,1107 'editor':951 'efi':647 'els':205 'endless':21 'error':478 'even':607 'ever':14 'everyday':16 'exampl':740,977,1098 'execut':505,988,1115 'f':815 'f2':354 'f3':430 'fast':121 'favor':197 'fc3aac3b':746,764,773 'fifth':888 'figur':48 'filesystem':976 'finish':371 'first':182 'flesystem':983 'follow':891 'formati':581 'found':483 'fouth':511 'g':388 'game':98,222 'gb':586 'get':92,214,241 'gist.github.com':1133 'gist.github.com/hardenedarray/4c1492f537d9785e19406eb5cd991735)[':1132 'git':330,336,444 'go':346,902,926 'got':29 'grep':738 'grub':901,994 'guid':178 'hard':626 'hdd':65,157,212,525,542,568,587 'headach':1029 'hell':172 'help':33,46 'home':867 'hook':969,978 'howev':35 'identifi':523 'ignor':337 'import':195 'induc':1030 'initcpio':986 'insan':165 'inspect':458 'instal':168,280,298,325,489,833,889,919,930,998,1018,1060 'instanc':534 'internet':303,343 'interst':181 'iso':311 'kernel':496,612,1088 'kernel.org':1135 'knew':623 'know':723 'l':696 'last':26,160,895,997 'least':250 'lemmy.ml':39,43,58 'lemmy.ml/comment/5577205)from':38 'lemmy.ml/post/7585833).':57 'lemmy.ml/u/d3xt3r@lemmy.nz)':42 'less':619 'let':529 'like':75,963 'line':415 'linux':4,13,338,993,1020 'list':518 'live':245,306,310 'load':119,142,498 'login':356,431 'lol':894 'look':962 'lost':86 'lot':31 'love':3,12 'ls':295 'lsblk':522,686,784 'lzo':860,869,878 'm':387 'make':287,466,563,573,615,663,671,689,706,984,1003 'make-bcach':662,705 'makepkg':379,469 'mayb':123 'mention':1011 'might':253 'mkdir':863,872,881,885 'mkfs.btrfs':695 'mkfs.ext4':806 'mkfs.vfat':814 'mkinitcpio':899,944,947,991 'modprob':507 'modul':959,965 'mount':318,827,835,854,862,871,880,884 'need':135,373,399,492,641,1058,1084 'new':116 'newli':918 'next':363 'note':1043 'noth':87 'notic':150 'nvme':68 'nvme0n1p1':797 'o':319,856,865,874 'okay':1,656 'old':112 'one':257,564,611,908,1103 'option':846,851 'otherwis':365,649 'output':743 'p':992 'packag':486,915 'pacman':331,937 'pain':1042 'partit':552,565,575,590,598,604,618,630,648,673,798,805,813,823,1008 'partprob':510,1082,1121 'passwd':391 'password':396 'perform':103,198 'pkgbuild':460 'possibl':18,202 'press':351,427 'problem':1047 'proceed':464 'process':369 'pseudo':177 'pseudo-guid':176 'raid':661,690,717 'raid0':25,517,699 'raid10':215 'raid5':231 'realli':45 'reboot':1050 'refer':1127 'reformat':1069 'regist':712,757 'rememb':808,818 'remot':193 'remount':308,320 'repo':443 'requir':100 'right':1009 'root':358,383,858 'run':381 'safe':637 'save':424 'say':531 'sda':1100 'sda1':569 'sdb1':571 'second':240 'see':107,788 'separ':644 'set':394,436 'setup':117,162,190,234,375,718 'show':736,1073,1124 'sinc':378 'size':321 'slow':342 'slower':127 'smallest':256 'sorri':639 'sri':470 'ssd':69,101,113,161,528,547,578,597 'step':364 'stick':247 'stop':1090 'store':185,218 'subvol':857,866,875 'subvolum':839,843,848 'suck':236 'sudo':506,509,921 'super':735 'superus':407 'sure':288,1004,1032 'surpris':8,93 'system':56,307,655,1024 'tell':494,1086 'test':95 'textur':140 'think':263 'third':297 'throw':477 'time':146 'tool':441,452,898,914,1063 'total':77,1039 'tti':349 'tty1':928 'tty3':905 'two':694 'type':294,385,468 'u':938 'udev':980 'uefi':292 'umount':852 'unboot':654 'unless':206 'usb':246 'use':230,266,315,549,558,685,730,760,949,1120 'user':377,390,392,401,419,433,907 'useradd':386 'usual':1001 'uuid':727 'var':876 'visudo':411 'vmliuz':480 'wait':137,366 'want':52,208,278,455,561,1052,1067,1105 'way':627 'week':27 'well':104,122 'whatev':559 'wheel':389 'wiki':893 'wiki.archlinux.org':1129 'wiki.archlinux.org/title/bcache](https://wiki.archlinux.org/title/bcache)[wiki.archlinux.org/title/btrfs](https://wiki.archlinux.org/title/btrfs)[gist.github.com/':1128 'wont':380 'work':254 'worth':1040 'write':174 'wrong':82 'www.phoronix.com':238 'www.phoronix.com/news/btrfs-raid-56-is-bad)':237 'yet':583"
+cross: false
+upVotes: 0
+downVotes: 0
+ranking: 1700146309
+visibility: "visible "
+apId: "https://lemmy.ml/post/8002348"
+editedAt: DateTimeImmutable @1700319306 {#102
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2390
date: 2023-11-15 15:51:49.0 +01:00
}
} |