1 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
2 |
DENIED
|
moderate
|
App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
} |
|
Show voter details
|
3 |
DENIED
|
edit
|
App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
} |
|
Show voter details
|
4 |
DENIED
|
moderate
|
App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
} |
|
Show voter details
|
5 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
6 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4342
+user: App\Entity\User {#4290 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
I have a cache drive in my NAS for reads, thinking about putting a second drive in there so I can have a read/write cache array. It makes a huge difference over just having spinning rust. I’d love an all-flash array, but 36TB of SSD would be very expensive right now.\n
\n
Note to others reading this: If your main use case is gaming (or anything other than storing/processing buttloads of data), I’d suggest just getting a bigger pcie3 drive instead of a faster pcie4/5 drive. Going with a faster drive won’t be a noticeable difference, but having 2-3x the capacity (for the same price) will help.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1707246266 {#4351
date: 2024-02-06 20:04:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4340 …}
+nested: Doctrine\ORM\PersistentCollection {#4338 …}
+votes: Doctrine\ORM\PersistentCollection {#4336 …}
+reports: Doctrine\ORM\PersistentCollection {#4334 …}
+favourites: Doctrine\ORM\PersistentCollection {#4302 …}
+notifications: Doctrine\ORM\PersistentCollection {#4306 …}
-id: 149996
-bodyTs: "'-3':104 '2':103 '36tb':46 'all-flash':41 'anyth':68 'array':26,44 'bigger':81 'buttload':72 'cach':4,25 'capac':107 'case':64 'd':38,76 'data':74 'differ':31,100 'drive':5,16,83,89,94 'expens':52 'faster':87,93 'flash':43 'game':66 'get':79 'go':90 'help':113 'huge':30 'instead':84 'love':39 'main':62 'make':28 'nas':8 'note':55 'notic':99 'other':57 'pcie3':82 'pcie4/5':88 'price':111 'put':13 'read':10,58 'read/write':24 'right':53 'rust':36 'second':15 'spin':35 'ssd':48 'storing/processing':71 'suggest':77 'think':11 'use':63 'won':95 'would':49 'x':105"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1650754"
+editedAt: null
+createdAt: DateTimeImmutable @1700061729 {#4287
date: 2023-11-15 16:22:09.0 +01:00
}
} |
|
Show voter details
|
7 |
DENIED
|
edit
|
App\Entity\EntryComment {#4342
+user: App\Entity\User {#4290 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
I have a cache drive in my NAS for reads, thinking about putting a second drive in there so I can have a read/write cache array. It makes a huge difference over just having spinning rust. I’d love an all-flash array, but 36TB of SSD would be very expensive right now.\n
\n
Note to others reading this: If your main use case is gaming (or anything other than storing/processing buttloads of data), I’d suggest just getting a bigger pcie3 drive instead of a faster pcie4/5 drive. Going with a faster drive won’t be a noticeable difference, but having 2-3x the capacity (for the same price) will help.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1707246266 {#4351
date: 2024-02-06 20:04:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4340 …}
+nested: Doctrine\ORM\PersistentCollection {#4338 …}
+votes: Doctrine\ORM\PersistentCollection {#4336 …}
+reports: Doctrine\ORM\PersistentCollection {#4334 …}
+favourites: Doctrine\ORM\PersistentCollection {#4302 …}
+notifications: Doctrine\ORM\PersistentCollection {#4306 …}
-id: 149996
-bodyTs: "'-3':104 '2':103 '36tb':46 'all-flash':41 'anyth':68 'array':26,44 'bigger':81 'buttload':72 'cach':4,25 'capac':107 'case':64 'd':38,76 'data':74 'differ':31,100 'drive':5,16,83,89,94 'expens':52 'faster':87,93 'flash':43 'game':66 'get':79 'go':90 'help':113 'huge':30 'instead':84 'love':39 'main':62 'make':28 'nas':8 'note':55 'notic':99 'other':57 'pcie3':82 'pcie4/5':88 'price':111 'put':13 'read':10,58 'read/write':24 'right':53 'rust':36 'second':15 'spin':35 'ssd':48 'storing/processing':71 'suggest':77 'think':11 'use':63 'won':95 'would':49 'x':105"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1650754"
+editedAt: null
+createdAt: DateTimeImmutable @1700061729 {#4287
date: 2023-11-15 16:22:09.0 +01:00
}
} |
|
Show voter details
|
8 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4342
+user: App\Entity\User {#4290 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
I have a cache drive in my NAS for reads, thinking about putting a second drive in there so I can have a read/write cache array. It makes a huge difference over just having spinning rust. I’d love an all-flash array, but 36TB of SSD would be very expensive right now.\n
\n
Note to others reading this: If your main use case is gaming (or anything other than storing/processing buttloads of data), I’d suggest just getting a bigger pcie3 drive instead of a faster pcie4/5 drive. Going with a faster drive won’t be a noticeable difference, but having 2-3x the capacity (for the same price) will help.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1707246266 {#4351
date: 2024-02-06 20:04:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4340 …}
+nested: Doctrine\ORM\PersistentCollection {#4338 …}
+votes: Doctrine\ORM\PersistentCollection {#4336 …}
+reports: Doctrine\ORM\PersistentCollection {#4334 …}
+favourites: Doctrine\ORM\PersistentCollection {#4302 …}
+notifications: Doctrine\ORM\PersistentCollection {#4306 …}
-id: 149996
-bodyTs: "'-3':104 '2':103 '36tb':46 'all-flash':41 'anyth':68 'array':26,44 'bigger':81 'buttload':72 'cach':4,25 'capac':107 'case':64 'd':38,76 'data':74 'differ':31,100 'drive':5,16,83,89,94 'expens':52 'faster':87,93 'flash':43 'game':66 'get':79 'go':90 'help':113 'huge':30 'instead':84 'love':39 'main':62 'make':28 'nas':8 'note':55 'notic':99 'other':57 'pcie3':82 'pcie4/5':88 'price':111 'put':13 'read':10,58 'read/write':24 'right':53 'rust':36 'second':15 'spin':35 'ssd':48 'storing/processing':71 'suggest':77 'think':11 'use':63 'won':95 'would':49 'x':105"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1650754"
+editedAt: null
+createdAt: DateTimeImmutable @1700061729 {#4287
date: 2023-11-15 16:22:09.0 +01:00
}
} |
|
Show voter details
|
9 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
10 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5018
+user: Proxies\__CG__\App\Entity\User {#5019 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4342
+user: App\Entity\User {#4290 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
I have a cache drive in my NAS for reads, thinking about putting a second drive in there so I can have a read/write cache array. It makes a huge difference over just having spinning rust. I’d love an all-flash array, but 36TB of SSD would be very expensive right now.\n
\n
Note to others reading this: If your main use case is gaming (or anything other than storing/processing buttloads of data), I’d suggest just getting a bigger pcie3 drive instead of a faster pcie4/5 drive. Going with a faster drive won’t be a noticeable difference, but having 2-3x the capacity (for the same price) will help.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1707246266 {#4351
date: 2024-02-06 20:04:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4340 …}
+nested: Doctrine\ORM\PersistentCollection {#4338 …}
+votes: Doctrine\ORM\PersistentCollection {#4336 …}
+reports: Doctrine\ORM\PersistentCollection {#4334 …}
+favourites: Doctrine\ORM\PersistentCollection {#4302 …}
+notifications: Doctrine\ORM\PersistentCollection {#4306 …}
-id: 149996
-bodyTs: "'-3':104 '2':103 '36tb':46 'all-flash':41 'anyth':68 'array':26,44 'bigger':81 'buttload':72 'cach':4,25 'capac':107 'case':64 'd':38,76 'data':74 'differ':31,100 'drive':5,16,83,89,94 'expens':52 'faster':87,93 'flash':43 'game':66 'get':79 'go':90 'help':113 'huge':30 'instead':84 'love':39 'main':62 'make':28 'nas':8 'note':55 'notic':99 'other':57 'pcie3':82 'pcie4/5':88 'price':111 'put':13 'read':10,58 'read/write':24 'right':53 'rust':36 'second':15 'spin':35 'ssd':48 'storing/processing':71 'suggest':77 'think':11 'use':63 'won':95 'would':49 'x':105"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1650754"
+editedAt: null
+createdAt: DateTimeImmutable @1700061729 {#4287
date: 2023-11-15 16:22:09.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: "You’re using btrfs for raid?!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700063264 {#5016
date: 2023-11-15 16:47:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
]
+children: Doctrine\ORM\PersistentCollection {#5020 …}
+nested: Doctrine\ORM\PersistentCollection {#5022 …}
+votes: Doctrine\ORM\PersistentCollection {#5024 …}
+reports: Doctrine\ORM\PersistentCollection {#5026 …}
+favourites: Doctrine\ORM\PersistentCollection {#5028 …}
+notifications: Doctrine\ORM\PersistentCollection {#5030 …}
-id: 171359
-bodyTs: "'btrfs':4 'raid':6 're':2 'use':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5824232"
+editedAt: null
+createdAt: DateTimeImmutable @1700063264 {#5017
date: 2023-11-15 16:47:44.0 +01:00
}
} |
|
Show voter details
|
11 |
DENIED
|
edit
|
App\Entity\EntryComment {#5018
+user: Proxies\__CG__\App\Entity\User {#5019 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4342
+user: App\Entity\User {#4290 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
I have a cache drive in my NAS for reads, thinking about putting a second drive in there so I can have a read/write cache array. It makes a huge difference over just having spinning rust. I’d love an all-flash array, but 36TB of SSD would be very expensive right now.\n
\n
Note to others reading this: If your main use case is gaming (or anything other than storing/processing buttloads of data), I’d suggest just getting a bigger pcie3 drive instead of a faster pcie4/5 drive. Going with a faster drive won’t be a noticeable difference, but having 2-3x the capacity (for the same price) will help.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1707246266 {#4351
date: 2024-02-06 20:04:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4340 …}
+nested: Doctrine\ORM\PersistentCollection {#4338 …}
+votes: Doctrine\ORM\PersistentCollection {#4336 …}
+reports: Doctrine\ORM\PersistentCollection {#4334 …}
+favourites: Doctrine\ORM\PersistentCollection {#4302 …}
+notifications: Doctrine\ORM\PersistentCollection {#4306 …}
-id: 149996
-bodyTs: "'-3':104 '2':103 '36tb':46 'all-flash':41 'anyth':68 'array':26,44 'bigger':81 'buttload':72 'cach':4,25 'capac':107 'case':64 'd':38,76 'data':74 'differ':31,100 'drive':5,16,83,89,94 'expens':52 'faster':87,93 'flash':43 'game':66 'get':79 'go':90 'help':113 'huge':30 'instead':84 'love':39 'main':62 'make':28 'nas':8 'note':55 'notic':99 'other':57 'pcie3':82 'pcie4/5':88 'price':111 'put':13 'read':10,58 'read/write':24 'right':53 'rust':36 'second':15 'spin':35 'ssd':48 'storing/processing':71 'suggest':77 'think':11 'use':63 'won':95 'would':49 'x':105"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1650754"
+editedAt: null
+createdAt: DateTimeImmutable @1700061729 {#4287
date: 2023-11-15 16:22:09.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: "You’re using btrfs for raid?!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700063264 {#5016
date: 2023-11-15 16:47:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
]
+children: Doctrine\ORM\PersistentCollection {#5020 …}
+nested: Doctrine\ORM\PersistentCollection {#5022 …}
+votes: Doctrine\ORM\PersistentCollection {#5024 …}
+reports: Doctrine\ORM\PersistentCollection {#5026 …}
+favourites: Doctrine\ORM\PersistentCollection {#5028 …}
+notifications: Doctrine\ORM\PersistentCollection {#5030 …}
-id: 171359
-bodyTs: "'btrfs':4 'raid':6 're':2 'use':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5824232"
+editedAt: null
+createdAt: DateTimeImmutable @1700063264 {#5017
date: 2023-11-15 16:47:44.0 +01:00
}
} |
|
Show voter details
|
12 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5018
+user: Proxies\__CG__\App\Entity\User {#5019 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4342
+user: App\Entity\User {#4290 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
I have a cache drive in my NAS for reads, thinking about putting a second drive in there so I can have a read/write cache array. It makes a huge difference over just having spinning rust. I’d love an all-flash array, but 36TB of SSD would be very expensive right now.\n
\n
Note to others reading this: If your main use case is gaming (or anything other than storing/processing buttloads of data), I’d suggest just getting a bigger pcie3 drive instead of a faster pcie4/5 drive. Going with a faster drive won’t be a noticeable difference, but having 2-3x the capacity (for the same price) will help.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1707246266 {#4351
date: 2024-02-06 20:04:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4340 …}
+nested: Doctrine\ORM\PersistentCollection {#4338 …}
+votes: Doctrine\ORM\PersistentCollection {#4336 …}
+reports: Doctrine\ORM\PersistentCollection {#4334 …}
+favourites: Doctrine\ORM\PersistentCollection {#4302 …}
+notifications: Doctrine\ORM\PersistentCollection {#4306 …}
-id: 149996
-bodyTs: "'-3':104 '2':103 '36tb':46 'all-flash':41 'anyth':68 'array':26,44 'bigger':81 'buttload':72 'cach':4,25 'capac':107 'case':64 'd':38,76 'data':74 'differ':31,100 'drive':5,16,83,89,94 'expens':52 'faster':87,93 'flash':43 'game':66 'get':79 'go':90 'help':113 'huge':30 'instead':84 'love':39 'main':62 'make':28 'nas':8 'note':55 'notic':99 'other':57 'pcie3':82 'pcie4/5':88 'price':111 'put':13 'read':10,58 'read/write':24 'right':53 'rust':36 'second':15 'spin':35 'ssd':48 'storing/processing':71 'suggest':77 'think':11 'use':63 'won':95 'would':49 'x':105"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1650754"
+editedAt: null
+createdAt: DateTimeImmutable @1700061729 {#4287
date: 2023-11-15 16:22:09.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: "You’re using btrfs for raid?!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700063264 {#5016
date: 2023-11-15 16:47:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
]
+children: Doctrine\ORM\PersistentCollection {#5020 …}
+nested: Doctrine\ORM\PersistentCollection {#5022 …}
+votes: Doctrine\ORM\PersistentCollection {#5024 …}
+reports: Doctrine\ORM\PersistentCollection {#5026 …}
+favourites: Doctrine\ORM\PersistentCollection {#5028 …}
+notifications: Doctrine\ORM\PersistentCollection {#5030 …}
-id: 171359
-bodyTs: "'btrfs':4 'raid':6 're':2 'use':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5824232"
+editedAt: null
+createdAt: DateTimeImmutable @1700063264 {#5017
date: 2023-11-15 16:47:44.0 +01:00
}
} |
|
Show voter details
|
13 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
14 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5088
+user: Proxies\__CG__\App\Entity\User {#5089 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#5018
+user: Proxies\__CG__\App\Entity\User {#5019 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4342
+user: App\Entity\User {#4290 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
I have a cache drive in my NAS for reads, thinking about putting a second drive in there so I can have a read/write cache array. It makes a huge difference over just having spinning rust. I’d love an all-flash array, but 36TB of SSD would be very expensive right now.\n
\n
Note to others reading this: If your main use case is gaming (or anything other than storing/processing buttloads of data), I’d suggest just getting a bigger pcie3 drive instead of a faster pcie4/5 drive. Going with a faster drive won’t be a noticeable difference, but having 2-3x the capacity (for the same price) will help.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1707246266 {#4351
date: 2024-02-06 20:04:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4340 …}
+nested: Doctrine\ORM\PersistentCollection {#4338 …}
+votes: Doctrine\ORM\PersistentCollection {#4336 …}
+reports: Doctrine\ORM\PersistentCollection {#4334 …}
+favourites: Doctrine\ORM\PersistentCollection {#4302 …}
+notifications: Doctrine\ORM\PersistentCollection {#4306 …}
-id: 149996
-bodyTs: "'-3':104 '2':103 '36tb':46 'all-flash':41 'anyth':68 'array':26,44 'bigger':81 'buttload':72 'cach':4,25 'capac':107 'case':64 'd':38,76 'data':74 'differ':31,100 'drive':5,16,83,89,94 'expens':52 'faster':87,93 'flash':43 'game':66 'get':79 'go':90 'help':113 'huge':30 'instead':84 'love':39 'main':62 'make':28 'nas':8 'note':55 'notic':99 'other':57 'pcie3':82 'pcie4/5':88 'price':111 'put':13 'read':10,58 'read/write':24 'right':53 'rust':36 'second':15 'spin':35 'ssd':48 'storing/processing':71 'suggest':77 'think':11 'use':63 'won':95 'would':49 'x':105"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1650754"
+editedAt: null
+createdAt: DateTimeImmutable @1700061729 {#4287
date: 2023-11-15 16:22:09.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: "You’re using btrfs for raid?!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700063264 {#5016
date: 2023-11-15 16:47:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
]
+children: Doctrine\ORM\PersistentCollection {#5020 …}
+nested: Doctrine\ORM\PersistentCollection {#5022 …}
+votes: Doctrine\ORM\PersistentCollection {#5024 …}
+reports: Doctrine\ORM\PersistentCollection {#5026 …}
+favourites: Doctrine\ORM\PersistentCollection {#5028 …}
+notifications: Doctrine\ORM\PersistentCollection {#5030 …}
-id: 171359
-bodyTs: "'btrfs':4 'raid':6 're':2 'use':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5824232"
+editedAt: null
+createdAt: DateTimeImmutable @1700063264 {#5017
date: 2023-11-15 16:47:44.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: """
Not who you responded to, but I have a similar setup using ZFS.\n
\n
6 drives in raid 6, and then an SSD cache.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700066443 {#5086
date: 2023-11-15 17:40:43.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
"@const_void@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#5090 …}
+nested: Doctrine\ORM\PersistentCollection {#5092 …}
+votes: Doctrine\ORM\PersistentCollection {#5094 …}
+reports: Doctrine\ORM\PersistentCollection {#5096 …}
+favourites: Doctrine\ORM\PersistentCollection {#5098 …}
+notifications: Doctrine\ORM\PersistentCollection {#5100 …}
-id: 201629
-bodyTs: "'6':14,18 'cach':23 'drive':15 'raid':17 'respond':4 'setup':11 'similar':10 'ssd':22 'use':12 'zfs':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1651139"
+editedAt: null
+createdAt: DateTimeImmutable @1700066443 {#5087
date: 2023-11-15 17:40:43.0 +01:00
}
} |
|
Show voter details
|
15 |
DENIED
|
edit
|
App\Entity\EntryComment {#5088
+user: Proxies\__CG__\App\Entity\User {#5089 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#5018
+user: Proxies\__CG__\App\Entity\User {#5019 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4342
+user: App\Entity\User {#4290 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
I have a cache drive in my NAS for reads, thinking about putting a second drive in there so I can have a read/write cache array. It makes a huge difference over just having spinning rust. I’d love an all-flash array, but 36TB of SSD would be very expensive right now.\n
\n
Note to others reading this: If your main use case is gaming (or anything other than storing/processing buttloads of data), I’d suggest just getting a bigger pcie3 drive instead of a faster pcie4/5 drive. Going with a faster drive won’t be a noticeable difference, but having 2-3x the capacity (for the same price) will help.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1707246266 {#4351
date: 2024-02-06 20:04:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4340 …}
+nested: Doctrine\ORM\PersistentCollection {#4338 …}
+votes: Doctrine\ORM\PersistentCollection {#4336 …}
+reports: Doctrine\ORM\PersistentCollection {#4334 …}
+favourites: Doctrine\ORM\PersistentCollection {#4302 …}
+notifications: Doctrine\ORM\PersistentCollection {#4306 …}
-id: 149996
-bodyTs: "'-3':104 '2':103 '36tb':46 'all-flash':41 'anyth':68 'array':26,44 'bigger':81 'buttload':72 'cach':4,25 'capac':107 'case':64 'd':38,76 'data':74 'differ':31,100 'drive':5,16,83,89,94 'expens':52 'faster':87,93 'flash':43 'game':66 'get':79 'go':90 'help':113 'huge':30 'instead':84 'love':39 'main':62 'make':28 'nas':8 'note':55 'notic':99 'other':57 'pcie3':82 'pcie4/5':88 'price':111 'put':13 'read':10,58 'read/write':24 'right':53 'rust':36 'second':15 'spin':35 'ssd':48 'storing/processing':71 'suggest':77 'think':11 'use':63 'won':95 'would':49 'x':105"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1650754"
+editedAt: null
+createdAt: DateTimeImmutable @1700061729 {#4287
date: 2023-11-15 16:22:09.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: "You’re using btrfs for raid?!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700063264 {#5016
date: 2023-11-15 16:47:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
]
+children: Doctrine\ORM\PersistentCollection {#5020 …}
+nested: Doctrine\ORM\PersistentCollection {#5022 …}
+votes: Doctrine\ORM\PersistentCollection {#5024 …}
+reports: Doctrine\ORM\PersistentCollection {#5026 …}
+favourites: Doctrine\ORM\PersistentCollection {#5028 …}
+notifications: Doctrine\ORM\PersistentCollection {#5030 …}
-id: 171359
-bodyTs: "'btrfs':4 'raid':6 're':2 'use':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5824232"
+editedAt: null
+createdAt: DateTimeImmutable @1700063264 {#5017
date: 2023-11-15 16:47:44.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: """
Not who you responded to, but I have a similar setup using ZFS.\n
\n
6 drives in raid 6, and then an SSD cache.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700066443 {#5086
date: 2023-11-15 17:40:43.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
"@const_void@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#5090 …}
+nested: Doctrine\ORM\PersistentCollection {#5092 …}
+votes: Doctrine\ORM\PersistentCollection {#5094 …}
+reports: Doctrine\ORM\PersistentCollection {#5096 …}
+favourites: Doctrine\ORM\PersistentCollection {#5098 …}
+notifications: Doctrine\ORM\PersistentCollection {#5100 …}
-id: 201629
-bodyTs: "'6':14,18 'cach':23 'drive':15 'raid':17 'respond':4 'setup':11 'similar':10 'ssd':22 'use':12 'zfs':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1651139"
+editedAt: null
+createdAt: DateTimeImmutable @1700066443 {#5087
date: 2023-11-15 17:40:43.0 +01:00
}
} |
|
Show voter details
|
16 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5088
+user: Proxies\__CG__\App\Entity\User {#5089 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#5018
+user: Proxies\__CG__\App\Entity\User {#5019 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4342
+user: App\Entity\User {#4290 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
I have a cache drive in my NAS for reads, thinking about putting a second drive in there so I can have a read/write cache array. It makes a huge difference over just having spinning rust. I’d love an all-flash array, but 36TB of SSD would be very expensive right now.\n
\n
Note to others reading this: If your main use case is gaming (or anything other than storing/processing buttloads of data), I’d suggest just getting a bigger pcie3 drive instead of a faster pcie4/5 drive. Going with a faster drive won’t be a noticeable difference, but having 2-3x the capacity (for the same price) will help.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1707246266 {#4351
date: 2024-02-06 20:04:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4340 …}
+nested: Doctrine\ORM\PersistentCollection {#4338 …}
+votes: Doctrine\ORM\PersistentCollection {#4336 …}
+reports: Doctrine\ORM\PersistentCollection {#4334 …}
+favourites: Doctrine\ORM\PersistentCollection {#4302 …}
+notifications: Doctrine\ORM\PersistentCollection {#4306 …}
-id: 149996
-bodyTs: "'-3':104 '2':103 '36tb':46 'all-flash':41 'anyth':68 'array':26,44 'bigger':81 'buttload':72 'cach':4,25 'capac':107 'case':64 'd':38,76 'data':74 'differ':31,100 'drive':5,16,83,89,94 'expens':52 'faster':87,93 'flash':43 'game':66 'get':79 'go':90 'help':113 'huge':30 'instead':84 'love':39 'main':62 'make':28 'nas':8 'note':55 'notic':99 'other':57 'pcie3':82 'pcie4/5':88 'price':111 'put':13 'read':10,58 'read/write':24 'right':53 'rust':36 'second':15 'spin':35 'ssd':48 'storing/processing':71 'suggest':77 'think':11 'use':63 'won':95 'would':49 'x':105"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1650754"
+editedAt: null
+createdAt: DateTimeImmutable @1700061729 {#4287
date: 2023-11-15 16:22:09.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: "You’re using btrfs for raid?!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700063264 {#5016
date: 2023-11-15 16:47:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
]
+children: Doctrine\ORM\PersistentCollection {#5020 …}
+nested: Doctrine\ORM\PersistentCollection {#5022 …}
+votes: Doctrine\ORM\PersistentCollection {#5024 …}
+reports: Doctrine\ORM\PersistentCollection {#5026 …}
+favourites: Doctrine\ORM\PersistentCollection {#5028 …}
+notifications: Doctrine\ORM\PersistentCollection {#5030 …}
-id: 171359
-bodyTs: "'btrfs':4 'raid':6 're':2 'use':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5824232"
+editedAt: null
+createdAt: DateTimeImmutable @1700063264 {#5017
date: 2023-11-15 16:47:44.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: """
Not who you responded to, but I have a similar setup using ZFS.\n
\n
6 drives in raid 6, and then an SSD cache.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700066443 {#5086
date: 2023-11-15 17:40:43.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
"@const_void@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#5090 …}
+nested: Doctrine\ORM\PersistentCollection {#5092 …}
+votes: Doctrine\ORM\PersistentCollection {#5094 …}
+reports: Doctrine\ORM\PersistentCollection {#5096 …}
+favourites: Doctrine\ORM\PersistentCollection {#5098 …}
+notifications: Doctrine\ORM\PersistentCollection {#5100 …}
-id: 201629
-bodyTs: "'6':14,18 'cach':23 'drive':15 'raid':17 'respond':4 'setup':11 'similar':10 'ssd':22 'use':12 'zfs':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1651139"
+editedAt: null
+createdAt: DateTimeImmutable @1700066443 {#5087
date: 2023-11-15 17:40:43.0 +01:00
}
} |
|
Show voter details
|
17 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
18 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5127
+user: Proxies\__CG__\App\Entity\User {#5128 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#5088
+user: Proxies\__CG__\App\Entity\User {#5089 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#5018
+user: Proxies\__CG__\App\Entity\User {#5019 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4342
+user: App\Entity\User {#4290 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
I have a cache drive in my NAS for reads, thinking about putting a second drive in there so I can have a read/write cache array. It makes a huge difference over just having spinning rust. I’d love an all-flash array, but 36TB of SSD would be very expensive right now.\n
\n
Note to others reading this: If your main use case is gaming (or anything other than storing/processing buttloads of data), I’d suggest just getting a bigger pcie3 drive instead of a faster pcie4/5 drive. Going with a faster drive won’t be a noticeable difference, but having 2-3x the capacity (for the same price) will help.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1707246266 {#4351
date: 2024-02-06 20:04:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4340 …}
+nested: Doctrine\ORM\PersistentCollection {#4338 …}
+votes: Doctrine\ORM\PersistentCollection {#4336 …}
+reports: Doctrine\ORM\PersistentCollection {#4334 …}
+favourites: Doctrine\ORM\PersistentCollection {#4302 …}
+notifications: Doctrine\ORM\PersistentCollection {#4306 …}
-id: 149996
-bodyTs: "'-3':104 '2':103 '36tb':46 'all-flash':41 'anyth':68 'array':26,44 'bigger':81 'buttload':72 'cach':4,25 'capac':107 'case':64 'd':38,76 'data':74 'differ':31,100 'drive':5,16,83,89,94 'expens':52 'faster':87,93 'flash':43 'game':66 'get':79 'go':90 'help':113 'huge':30 'instead':84 'love':39 'main':62 'make':28 'nas':8 'note':55 'notic':99 'other':57 'pcie3':82 'pcie4/5':88 'price':111 'put':13 'read':10,58 'read/write':24 'right':53 'rust':36 'second':15 'spin':35 'ssd':48 'storing/processing':71 'suggest':77 'think':11 'use':63 'won':95 'would':49 'x':105"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1650754"
+editedAt: null
+createdAt: DateTimeImmutable @1700061729 {#4287
date: 2023-11-15 16:22:09.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: "You’re using btrfs for raid?!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700063264 {#5016
date: 2023-11-15 16:47:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
]
+children: Doctrine\ORM\PersistentCollection {#5020 …}
+nested: Doctrine\ORM\PersistentCollection {#5022 …}
+votes: Doctrine\ORM\PersistentCollection {#5024 …}
+reports: Doctrine\ORM\PersistentCollection {#5026 …}
+favourites: Doctrine\ORM\PersistentCollection {#5028 …}
+notifications: Doctrine\ORM\PersistentCollection {#5030 …}
-id: 171359
-bodyTs: "'btrfs':4 'raid':6 're':2 'use':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5824232"
+editedAt: null
+createdAt: DateTimeImmutable @1700063264 {#5017
date: 2023-11-15 16:47:44.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: """
Not who you responded to, but I have a similar setup using ZFS.\n
\n
6 drives in raid 6, and then an SSD cache.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700066443 {#5086
date: 2023-11-15 17:40:43.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
"@const_void@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#5090 …}
+nested: Doctrine\ORM\PersistentCollection {#5092 …}
+votes: Doctrine\ORM\PersistentCollection {#5094 …}
+reports: Doctrine\ORM\PersistentCollection {#5096 …}
+favourites: Doctrine\ORM\PersistentCollection {#5098 …}
+notifications: Doctrine\ORM\PersistentCollection {#5100 …}
-id: 201629
-bodyTs: "'6':14,18 'cach':23 'drive':15 'raid':17 'respond':4 'setup':11 'similar':10 'ssd':22 'use':12 'zfs':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1651139"
+editedAt: null
+createdAt: DateTimeImmutable @1700066443 {#5087
date: 2023-11-15 17:40:43.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: "What kind of SSD cache? L2ARC?"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700067868 {#5125
date: 2023-11-15 18:04:28.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
"@const_void@lemmy.ml"
"@1993_toyota_camry@beehaw.org"
]
+children: Doctrine\ORM\PersistentCollection {#5129 …}
+nested: Doctrine\ORM\PersistentCollection {#5131 …}
+votes: Doctrine\ORM\PersistentCollection {#5133 …}
+reports: Doctrine\ORM\PersistentCollection {#5135 …}
+favourites: Doctrine\ORM\PersistentCollection {#5137 …}
+notifications: Doctrine\ORM\PersistentCollection {#5139 …}
-id: 247659
-bodyTs: "'cach':5 'kind':2 'l2arc':6 'ssd':4"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://ttrpg.network/comment/3317759"
+editedAt: null
+createdAt: DateTimeImmutable @1700067868 {#5126
date: 2023-11-15 18:04:28.0 +01:00
}
} |
|
Show voter details
|
19 |
DENIED
|
edit
|
App\Entity\EntryComment {#5127
+user: Proxies\__CG__\App\Entity\User {#5128 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#5088
+user: Proxies\__CG__\App\Entity\User {#5089 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#5018
+user: Proxies\__CG__\App\Entity\User {#5019 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4342
+user: App\Entity\User {#4290 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
I have a cache drive in my NAS for reads, thinking about putting a second drive in there so I can have a read/write cache array. It makes a huge difference over just having spinning rust. I’d love an all-flash array, but 36TB of SSD would be very expensive right now.\n
\n
Note to others reading this: If your main use case is gaming (or anything other than storing/processing buttloads of data), I’d suggest just getting a bigger pcie3 drive instead of a faster pcie4/5 drive. Going with a faster drive won’t be a noticeable difference, but having 2-3x the capacity (for the same price) will help.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1707246266 {#4351
date: 2024-02-06 20:04:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4340 …}
+nested: Doctrine\ORM\PersistentCollection {#4338 …}
+votes: Doctrine\ORM\PersistentCollection {#4336 …}
+reports: Doctrine\ORM\PersistentCollection {#4334 …}
+favourites: Doctrine\ORM\PersistentCollection {#4302 …}
+notifications: Doctrine\ORM\PersistentCollection {#4306 …}
-id: 149996
-bodyTs: "'-3':104 '2':103 '36tb':46 'all-flash':41 'anyth':68 'array':26,44 'bigger':81 'buttload':72 'cach':4,25 'capac':107 'case':64 'd':38,76 'data':74 'differ':31,100 'drive':5,16,83,89,94 'expens':52 'faster':87,93 'flash':43 'game':66 'get':79 'go':90 'help':113 'huge':30 'instead':84 'love':39 'main':62 'make':28 'nas':8 'note':55 'notic':99 'other':57 'pcie3':82 'pcie4/5':88 'price':111 'put':13 'read':10,58 'read/write':24 'right':53 'rust':36 'second':15 'spin':35 'ssd':48 'storing/processing':71 'suggest':77 'think':11 'use':63 'won':95 'would':49 'x':105"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1650754"
+editedAt: null
+createdAt: DateTimeImmutable @1700061729 {#4287
date: 2023-11-15 16:22:09.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: "You’re using btrfs for raid?!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700063264 {#5016
date: 2023-11-15 16:47:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
]
+children: Doctrine\ORM\PersistentCollection {#5020 …}
+nested: Doctrine\ORM\PersistentCollection {#5022 …}
+votes: Doctrine\ORM\PersistentCollection {#5024 …}
+reports: Doctrine\ORM\PersistentCollection {#5026 …}
+favourites: Doctrine\ORM\PersistentCollection {#5028 …}
+notifications: Doctrine\ORM\PersistentCollection {#5030 …}
-id: 171359
-bodyTs: "'btrfs':4 'raid':6 're':2 'use':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5824232"
+editedAt: null
+createdAt: DateTimeImmutable @1700063264 {#5017
date: 2023-11-15 16:47:44.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: """
Not who you responded to, but I have a similar setup using ZFS.\n
\n
6 drives in raid 6, and then an SSD cache.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700066443 {#5086
date: 2023-11-15 17:40:43.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
"@const_void@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#5090 …}
+nested: Doctrine\ORM\PersistentCollection {#5092 …}
+votes: Doctrine\ORM\PersistentCollection {#5094 …}
+reports: Doctrine\ORM\PersistentCollection {#5096 …}
+favourites: Doctrine\ORM\PersistentCollection {#5098 …}
+notifications: Doctrine\ORM\PersistentCollection {#5100 …}
-id: 201629
-bodyTs: "'6':14,18 'cach':23 'drive':15 'raid':17 'respond':4 'setup':11 'similar':10 'ssd':22 'use':12 'zfs':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1651139"
+editedAt: null
+createdAt: DateTimeImmutable @1700066443 {#5087
date: 2023-11-15 17:40:43.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: "What kind of SSD cache? L2ARC?"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700067868 {#5125
date: 2023-11-15 18:04:28.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
"@const_void@lemmy.ml"
"@1993_toyota_camry@beehaw.org"
]
+children: Doctrine\ORM\PersistentCollection {#5129 …}
+nested: Doctrine\ORM\PersistentCollection {#5131 …}
+votes: Doctrine\ORM\PersistentCollection {#5133 …}
+reports: Doctrine\ORM\PersistentCollection {#5135 …}
+favourites: Doctrine\ORM\PersistentCollection {#5137 …}
+notifications: Doctrine\ORM\PersistentCollection {#5139 …}
-id: 247659
-bodyTs: "'cach':5 'kind':2 'l2arc':6 'ssd':4"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://ttrpg.network/comment/3317759"
+editedAt: null
+createdAt: DateTimeImmutable @1700067868 {#5126
date: 2023-11-15 18:04:28.0 +01:00
}
} |
|
Show voter details
|
20 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5127
+user: Proxies\__CG__\App\Entity\User {#5128 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#5088
+user: Proxies\__CG__\App\Entity\User {#5089 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#5018
+user: Proxies\__CG__\App\Entity\User {#5019 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4342
+user: App\Entity\User {#4290 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
I have a cache drive in my NAS for reads, thinking about putting a second drive in there so I can have a read/write cache array. It makes a huge difference over just having spinning rust. I’d love an all-flash array, but 36TB of SSD would be very expensive right now.\n
\n
Note to others reading this: If your main use case is gaming (or anything other than storing/processing buttloads of data), I’d suggest just getting a bigger pcie3 drive instead of a faster pcie4/5 drive. Going with a faster drive won’t be a noticeable difference, but having 2-3x the capacity (for the same price) will help.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 4
+score: 0
+lastActive: DateTime @1707246266 {#4351
date: 2024-02-06 20:04:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4340 …}
+nested: Doctrine\ORM\PersistentCollection {#4338 …}
+votes: Doctrine\ORM\PersistentCollection {#4336 …}
+reports: Doctrine\ORM\PersistentCollection {#4334 …}
+favourites: Doctrine\ORM\PersistentCollection {#4302 …}
+notifications: Doctrine\ORM\PersistentCollection {#4306 …}
-id: 149996
-bodyTs: "'-3':104 '2':103 '36tb':46 'all-flash':41 'anyth':68 'array':26,44 'bigger':81 'buttload':72 'cach':4,25 'capac':107 'case':64 'd':38,76 'data':74 'differ':31,100 'drive':5,16,83,89,94 'expens':52 'faster':87,93 'flash':43 'game':66 'get':79 'go':90 'help':113 'huge':30 'instead':84 'love':39 'main':62 'make':28 'nas':8 'note':55 'notic':99 'other':57 'pcie3':82 'pcie4/5':88 'price':111 'put':13 'read':10,58 'read/write':24 'right':53 'rust':36 'second':15 'spin':35 'ssd':48 'storing/processing':71 'suggest':77 'think':11 'use':63 'won':95 'would':49 'x':105"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1650754"
+editedAt: null
+createdAt: DateTimeImmutable @1700061729 {#4287
date: 2023-11-15 16:22:09.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: "You’re using btrfs for raid?!"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700063264 {#5016
date: 2023-11-15 16:47:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
]
+children: Doctrine\ORM\PersistentCollection {#5020 …}
+nested: Doctrine\ORM\PersistentCollection {#5022 …}
+votes: Doctrine\ORM\PersistentCollection {#5024 …}
+reports: Doctrine\ORM\PersistentCollection {#5026 …}
+favourites: Doctrine\ORM\PersistentCollection {#5028 …}
+notifications: Doctrine\ORM\PersistentCollection {#5030 …}
-id: 171359
-bodyTs: "'btrfs':4 'raid':6 're':2 'use':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5824232"
+editedAt: null
+createdAt: DateTimeImmutable @1700063264 {#5017
date: 2023-11-15 16:47:44.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: """
Not who you responded to, but I have a similar setup using ZFS.\n
\n
6 drives in raid 6, and then an SSD cache.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700066443 {#5086
date: 2023-11-15 17:40:43.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
"@const_void@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#5090 …}
+nested: Doctrine\ORM\PersistentCollection {#5092 …}
+votes: Doctrine\ORM\PersistentCollection {#5094 …}
+reports: Doctrine\ORM\PersistentCollection {#5096 …}
+favourites: Doctrine\ORM\PersistentCollection {#5098 …}
+notifications: Doctrine\ORM\PersistentCollection {#5100 …}
-id: 201629
-bodyTs: "'6':14,18 'cach':23 'drive':15 'raid':17 'respond':4 'setup':11 'similar':10 'ssd':22 'use':12 'zfs':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://beehaw.org/comment/1651139"
+editedAt: null
+createdAt: DateTimeImmutable @1700066443 {#5087
date: 2023-11-15 17:40:43.0 +01:00
}
}
+root: App\Entity\EntryComment {#4342}
+body: "What kind of SSD cache? L2ARC?"
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700067868 {#5125
date: 2023-11-15 18:04:28.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@dark_stang@beehaw.org"
"@const_void@lemmy.ml"
"@1993_toyota_camry@beehaw.org"
]
+children: Doctrine\ORM\PersistentCollection {#5129 …}
+nested: Doctrine\ORM\PersistentCollection {#5131 …}
+votes: Doctrine\ORM\PersistentCollection {#5133 …}
+reports: Doctrine\ORM\PersistentCollection {#5135 …}
+favourites: Doctrine\ORM\PersistentCollection {#5137 …}
+notifications: Doctrine\ORM\PersistentCollection {#5139 …}
-id: 247659
-bodyTs: "'cach':5 'kind':2 'l2arc':6 'ssd':4"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://ttrpg.network/comment/3317759"
+editedAt: null
+createdAt: DateTimeImmutable @1700067868 {#5126
date: 2023-11-15 18:04:28.0 +01:00
}
} |
|
Show voter details
|
21 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
22 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4379
+user: App\Entity\User {#4362 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "And in kernel 6.7 BcacheFS will arrive!"
+lang: "it"
+isAdult: false
+favouriteCount: 21
+score: 0
+lastActive: DateTime @1700077184 {#4385
date: 2023-11-15 20:39:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4377 …}
+nested: Doctrine\ORM\PersistentCollection {#4375 …}
+votes: Doctrine\ORM\PersistentCollection {#4373 …}
+reports: Doctrine\ORM\PersistentCollection {#4370 …}
+favourites: Doctrine\ORM\PersistentCollection {#4366 …}
+notifications: Doctrine\ORM\PersistentCollection {#4364 …}
-id: 127849
-bodyTs: "'6.7':4 'arriv':7 'bcachef':5 'kernel':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://livellosegreto.it/users/Instrument_Data/statuses/111416258341294417"
+editedAt: null
+createdAt: DateTimeImmutable @1700077184 {#4383
date: 2023-11-15 20:39:44.0 +01:00
}
} |
|
Show voter details
|
23 |
DENIED
|
edit
|
App\Entity\EntryComment {#4379
+user: App\Entity\User {#4362 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "And in kernel 6.7 BcacheFS will arrive!"
+lang: "it"
+isAdult: false
+favouriteCount: 21
+score: 0
+lastActive: DateTime @1700077184 {#4385
date: 2023-11-15 20:39:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4377 …}
+nested: Doctrine\ORM\PersistentCollection {#4375 …}
+votes: Doctrine\ORM\PersistentCollection {#4373 …}
+reports: Doctrine\ORM\PersistentCollection {#4370 …}
+favourites: Doctrine\ORM\PersistentCollection {#4366 …}
+notifications: Doctrine\ORM\PersistentCollection {#4364 …}
-id: 127849
-bodyTs: "'6.7':4 'arriv':7 'bcachef':5 'kernel':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://livellosegreto.it/users/Instrument_Data/statuses/111416258341294417"
+editedAt: null
+createdAt: DateTimeImmutable @1700077184 {#4383
date: 2023-11-15 20:39:44.0 +01:00
}
} |
|
Show voter details
|
24 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4379
+user: App\Entity\User {#4362 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "And in kernel 6.7 BcacheFS will arrive!"
+lang: "it"
+isAdult: false
+favouriteCount: 21
+score: 0
+lastActive: DateTime @1700077184 {#4385
date: 2023-11-15 20:39:44.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4377 …}
+nested: Doctrine\ORM\PersistentCollection {#4375 …}
+votes: Doctrine\ORM\PersistentCollection {#4373 …}
+reports: Doctrine\ORM\PersistentCollection {#4370 …}
+favourites: Doctrine\ORM\PersistentCollection {#4366 …}
+notifications: Doctrine\ORM\PersistentCollection {#4364 …}
-id: 127849
-bodyTs: "'6.7':4 'arriv':7 'bcachef':5 'kernel':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://livellosegreto.it/users/Instrument_Data/statuses/111416258341294417"
+editedAt: null
+createdAt: DateTimeImmutable @1700077184 {#4383
date: 2023-11-15 20:39:44.0 +01:00
}
} |
|
Show voter details
|
25 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
26 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4460
+user: App\Entity\User {#4473 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I use ext4 on bcache with an SSD and 5TB HDD for my home drive. Can recommend. Gonna try the new bcachefs soon too."
+lang: "en"
+isAdult: false
+favouriteCount: 7
+score: 0
+lastActive: DateTime @1700365066 {#4455
date: 2023-11-19 04:37:46.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4461 …}
+nested: Doctrine\ORM\PersistentCollection {#4463 …}
+votes: Doctrine\ORM\PersistentCollection {#4465 …}
+reports: Doctrine\ORM\PersistentCollection {#4467 …}
+favourites: Doctrine\ORM\PersistentCollection {#4469 …}
+notifications: Doctrine\ORM\PersistentCollection {#4471 …}
-id: 127851
-bodyTs: "'5tb':10 'bcach':5 'bcachef':22 'drive':15 'ext4':3 'gonna':18 'hdd':11 'home':14 'new':21 'recommend':17 'soon':23 'ssd':8 'tri':19 'use':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://discuss.tchncs.de/comment/4888853"
+editedAt: null
+createdAt: DateTimeImmutable @1700077220 {#4456
date: 2023-11-15 20:40:20.0 +01:00
}
} |
|
Show voter details
|
27 |
DENIED
|
edit
|
App\Entity\EntryComment {#4460
+user: App\Entity\User {#4473 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I use ext4 on bcache with an SSD and 5TB HDD for my home drive. Can recommend. Gonna try the new bcachefs soon too."
+lang: "en"
+isAdult: false
+favouriteCount: 7
+score: 0
+lastActive: DateTime @1700365066 {#4455
date: 2023-11-19 04:37:46.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4461 …}
+nested: Doctrine\ORM\PersistentCollection {#4463 …}
+votes: Doctrine\ORM\PersistentCollection {#4465 …}
+reports: Doctrine\ORM\PersistentCollection {#4467 …}
+favourites: Doctrine\ORM\PersistentCollection {#4469 …}
+notifications: Doctrine\ORM\PersistentCollection {#4471 …}
-id: 127851
-bodyTs: "'5tb':10 'bcach':5 'bcachef':22 'drive':15 'ext4':3 'gonna':18 'hdd':11 'home':14 'new':21 'recommend':17 'soon':23 'ssd':8 'tri':19 'use':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://discuss.tchncs.de/comment/4888853"
+editedAt: null
+createdAt: DateTimeImmutable @1700077220 {#4456
date: 2023-11-15 20:40:20.0 +01:00
}
} |
|
Show voter details
|
28 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4460
+user: App\Entity\User {#4473 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I use ext4 on bcache with an SSD and 5TB HDD for my home drive. Can recommend. Gonna try the new bcachefs soon too."
+lang: "en"
+isAdult: false
+favouriteCount: 7
+score: 0
+lastActive: DateTime @1700365066 {#4455
date: 2023-11-19 04:37:46.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4461 …}
+nested: Doctrine\ORM\PersistentCollection {#4463 …}
+votes: Doctrine\ORM\PersistentCollection {#4465 …}
+reports: Doctrine\ORM\PersistentCollection {#4467 …}
+favourites: Doctrine\ORM\PersistentCollection {#4469 …}
+notifications: Doctrine\ORM\PersistentCollection {#4471 …}
-id: 127851
-bodyTs: "'5tb':10 'bcach':5 'bcachef':22 'drive':15 'ext4':3 'gonna':18 'hdd':11 'home':14 'new':21 'recommend':17 'soon':23 'ssd':8 'tri':19 'use':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://discuss.tchncs.de/comment/4888853"
+editedAt: null
+createdAt: DateTimeImmutable @1700077220 {#4456
date: 2023-11-15 20:40:20.0 +01:00
}
} |
|
Show voter details
|
29 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
30 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4905
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4460
+user: App\Entity\User {#4473 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I use ext4 on bcache with an SSD and 5TB HDD for my home drive. Can recommend. Gonna try the new bcachefs soon too."
+lang: "en"
+isAdult: false
+favouriteCount: 7
+score: 0
+lastActive: DateTime @1700365066 {#4455
date: 2023-11-19 04:37:46.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4461 …}
+nested: Doctrine\ORM\PersistentCollection {#4463 …}
+votes: Doctrine\ORM\PersistentCollection {#4465 …}
+reports: Doctrine\ORM\PersistentCollection {#4467 …}
+favourites: Doctrine\ORM\PersistentCollection {#4469 …}
+notifications: Doctrine\ORM\PersistentCollection {#4471 …}
-id: 127851
-bodyTs: "'5tb':10 'bcach':5 'bcachef':22 'drive':15 'ext4':3 'gonna':18 'hdd':11 'home':14 'new':21 'recommend':17 'soon':23 'ssd':8 'tri':19 'use':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://discuss.tchncs.de/comment/4888853"
+editedAt: null
+createdAt: DateTimeImmutable @1700077220 {#4456
date: 2023-11-15 20:40:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4460}
+body: "I’m using btrfs so I can add more drive on the fly. Saving myself from a headache. But I think bcachefs will make it infinitely easier."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700098993 {#4904
date: 2023-11-16 02:43:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@2xsaiko@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4910 …}
+nested: Doctrine\ORM\PersistentCollection {#4911 …}
+votes: Doctrine\ORM\PersistentCollection {#4913 …}
+reports: Doctrine\ORM\PersistentCollection {#4917 …}
+favourites: Doctrine\ORM\PersistentCollection {#4919 …}
+notifications: Doctrine\ORM\PersistentCollection {#4921 …}
-id: 128690
-bodyTs: "'add':8 'bcachef':22 'btrfs':4 'drive':10 'easier':27 'fli':13 'headach':18 'infinit':26 'm':2 'make':24 'save':14 'think':21 'use':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5838455"
+editedAt: null
+createdAt: DateTimeImmutable @1700098993 {#4907
date: 2023-11-16 02:43:13.0 +01:00
}
} |
|
Show voter details
|
31 |
DENIED
|
edit
|
App\Entity\EntryComment {#4905
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4460
+user: App\Entity\User {#4473 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I use ext4 on bcache with an SSD and 5TB HDD for my home drive. Can recommend. Gonna try the new bcachefs soon too."
+lang: "en"
+isAdult: false
+favouriteCount: 7
+score: 0
+lastActive: DateTime @1700365066 {#4455
date: 2023-11-19 04:37:46.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4461 …}
+nested: Doctrine\ORM\PersistentCollection {#4463 …}
+votes: Doctrine\ORM\PersistentCollection {#4465 …}
+reports: Doctrine\ORM\PersistentCollection {#4467 …}
+favourites: Doctrine\ORM\PersistentCollection {#4469 …}
+notifications: Doctrine\ORM\PersistentCollection {#4471 …}
-id: 127851
-bodyTs: "'5tb':10 'bcach':5 'bcachef':22 'drive':15 'ext4':3 'gonna':18 'hdd':11 'home':14 'new':21 'recommend':17 'soon':23 'ssd':8 'tri':19 'use':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://discuss.tchncs.de/comment/4888853"
+editedAt: null
+createdAt: DateTimeImmutable @1700077220 {#4456
date: 2023-11-15 20:40:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4460}
+body: "I’m using btrfs so I can add more drive on the fly. Saving myself from a headache. But I think bcachefs will make it infinitely easier."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700098993 {#4904
date: 2023-11-16 02:43:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@2xsaiko@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4910 …}
+nested: Doctrine\ORM\PersistentCollection {#4911 …}
+votes: Doctrine\ORM\PersistentCollection {#4913 …}
+reports: Doctrine\ORM\PersistentCollection {#4917 …}
+favourites: Doctrine\ORM\PersistentCollection {#4919 …}
+notifications: Doctrine\ORM\PersistentCollection {#4921 …}
-id: 128690
-bodyTs: "'add':8 'bcachef':22 'btrfs':4 'drive':10 'easier':27 'fli':13 'headach':18 'infinit':26 'm':2 'make':24 'save':14 'think':21 'use':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5838455"
+editedAt: null
+createdAt: DateTimeImmutable @1700098993 {#4907
date: 2023-11-16 02:43:13.0 +01:00
}
} |
|
Show voter details
|
32 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4905
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4460
+user: App\Entity\User {#4473 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I use ext4 on bcache with an SSD and 5TB HDD for my home drive. Can recommend. Gonna try the new bcachefs soon too."
+lang: "en"
+isAdult: false
+favouriteCount: 7
+score: 0
+lastActive: DateTime @1700365066 {#4455
date: 2023-11-19 04:37:46.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4461 …}
+nested: Doctrine\ORM\PersistentCollection {#4463 …}
+votes: Doctrine\ORM\PersistentCollection {#4465 …}
+reports: Doctrine\ORM\PersistentCollection {#4467 …}
+favourites: Doctrine\ORM\PersistentCollection {#4469 …}
+notifications: Doctrine\ORM\PersistentCollection {#4471 …}
-id: 127851
-bodyTs: "'5tb':10 'bcach':5 'bcachef':22 'drive':15 'ext4':3 'gonna':18 'hdd':11 'home':14 'new':21 'recommend':17 'soon':23 'ssd':8 'tri':19 'use':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://discuss.tchncs.de/comment/4888853"
+editedAt: null
+createdAt: DateTimeImmutable @1700077220 {#4456
date: 2023-11-15 20:40:20.0 +01:00
}
}
+root: App\Entity\EntryComment {#4460}
+body: "I’m using btrfs so I can add more drive on the fly. Saving myself from a headache. But I think bcachefs will make it infinitely easier."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700098993 {#4904
date: 2023-11-16 02:43:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@2xsaiko@discuss.tchncs.de"
]
+children: Doctrine\ORM\PersistentCollection {#4910 …}
+nested: Doctrine\ORM\PersistentCollection {#4911 …}
+votes: Doctrine\ORM\PersistentCollection {#4913 …}
+reports: Doctrine\ORM\PersistentCollection {#4917 …}
+favourites: Doctrine\ORM\PersistentCollection {#4919 …}
+notifications: Doctrine\ORM\PersistentCollection {#4921 …}
-id: 128690
-bodyTs: "'add':8 'bcachef':22 'btrfs':4 'drive':10 'easier':27 'fli':13 'headach':18 'infinit':26 'm':2 'make':24 'save':14 'think':21 'use':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5838455"
+editedAt: null
+createdAt: DateTimeImmutable @1700098993 {#4907
date: 2023-11-16 02:43:13.0 +01:00
}
} |
|
Show voter details
|
33 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
34 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4534
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Any chance there’s a Debian repo for bcachefs? I’d want to see how it does on an extra drive in my server. Or will I have to compile it the old fashioned way?"
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700418986 {#4529
date: 2023-11-19 19:36:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4535 …}
+nested: Doctrine\ORM\PersistentCollection {#4537 …}
+votes: Doctrine\ORM\PersistentCollection {#4539 …}
+reports: Doctrine\ORM\PersistentCollection {#4541 …}
+favourites: Doctrine\ORM\PersistentCollection {#4543 …}
+notifications: Doctrine\ORM\PersistentCollection {#4545 …}
-id: 127876
-bodyTs: "'bcachef':9 'chanc':2 'compil':30 'd':11 'debian':6 'drive':21 'extra':20 'fashion':34 'old':33 'repo':7 'see':14 'server':24 'want':12 'way':35"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5556117"
+editedAt: null
+createdAt: DateTimeImmutable @1700077829 {#4530
date: 2023-11-15 20:50:29.0 +01:00
}
} |
|
Show voter details
|
35 |
DENIED
|
edit
|
App\Entity\EntryComment {#4534
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Any chance there’s a Debian repo for bcachefs? I’d want to see how it does on an extra drive in my server. Or will I have to compile it the old fashioned way?"
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700418986 {#4529
date: 2023-11-19 19:36:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4535 …}
+nested: Doctrine\ORM\PersistentCollection {#4537 …}
+votes: Doctrine\ORM\PersistentCollection {#4539 …}
+reports: Doctrine\ORM\PersistentCollection {#4541 …}
+favourites: Doctrine\ORM\PersistentCollection {#4543 …}
+notifications: Doctrine\ORM\PersistentCollection {#4545 …}
-id: 127876
-bodyTs: "'bcachef':9 'chanc':2 'compil':30 'd':11 'debian':6 'drive':21 'extra':20 'fashion':34 'old':33 'repo':7 'see':14 'server':24 'want':12 'way':35"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5556117"
+editedAt: null
+createdAt: DateTimeImmutable @1700077829 {#4530
date: 2023-11-15 20:50:29.0 +01:00
}
} |
|
Show voter details
|
36 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4534
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Any chance there’s a Debian repo for bcachefs? I’d want to see how it does on an extra drive in my server. Or will I have to compile it the old fashioned way?"
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700418986 {#4529
date: 2023-11-19 19:36:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4535 …}
+nested: Doctrine\ORM\PersistentCollection {#4537 …}
+votes: Doctrine\ORM\PersistentCollection {#4539 …}
+reports: Doctrine\ORM\PersistentCollection {#4541 …}
+favourites: Doctrine\ORM\PersistentCollection {#4543 …}
+notifications: Doctrine\ORM\PersistentCollection {#4545 …}
-id: 127876
-bodyTs: "'bcachef':9 'chanc':2 'compil':30 'd':11 'debian':6 'drive':21 'extra':20 'fashion':34 'old':33 'repo':7 'see':14 'server':24 'want':12 'way':35"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5556117"
+editedAt: null
+createdAt: DateTimeImmutable @1700077829 {#4530
date: 2023-11-15 20:50:29.0 +01:00
}
} |
|
Show voter details
|
37 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
38 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4925
+user: Proxies\__CG__\App\Entity\User {#4926 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4534
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Any chance there’s a Debian repo for bcachefs? I’d want to see how it does on an extra drive in my server. Or will I have to compile it the old fashioned way?"
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700418986 {#4529
date: 2023-11-19 19:36:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4535 …}
+nested: Doctrine\ORM\PersistentCollection {#4537 …}
+votes: Doctrine\ORM\PersistentCollection {#4539 …}
+reports: Doctrine\ORM\PersistentCollection {#4541 …}
+favourites: Doctrine\ORM\PersistentCollection {#4543 …}
+notifications: Doctrine\ORM\PersistentCollection {#4545 …}
-id: 127876
-bodyTs: "'bcachef':9 'chanc':2 'compil':30 'd':11 'debian':6 'drive':21 'extra':20 'fashion':34 'old':33 'repo':7 'see':14 'server':24 'want':12 'way':35"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5556117"
+editedAt: null
+createdAt: DateTimeImmutable @1700077829 {#4530
date: 2023-11-15 20:50:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4534}
+body: "Note that bcache and bcache**fs** are different things. The latter is extremely new and not ready for “production” yet. This post is about bcache."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700126707 {#4923
date: 2023-11-16 10:25:07.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@kugmo@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4927 …}
+nested: Doctrine\ORM\PersistentCollection {#4929 …}
+votes: Doctrine\ORM\PersistentCollection {#4931 …}
+reports: Doctrine\ORM\PersistentCollection {#4933 …}
+favourites: Doctrine\ORM\PersistentCollection {#4935 …}
+notifications: Doctrine\ORM\PersistentCollection {#4937 …}
-id: 129610
-bodyTs: "'bcach':3,5,25 'differ':8 'extrem':13 'fs':6 'latter':11 'new':14 'note':1 'post':22 'product':19 'readi':17 'thing':9 'yet':20"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5846412"
+editedAt: null
+createdAt: DateTimeImmutable @1700126707 {#4924
date: 2023-11-16 10:25:07.0 +01:00
}
} |
|
Show voter details
|
39 |
DENIED
|
edit
|
App\Entity\EntryComment {#4925
+user: Proxies\__CG__\App\Entity\User {#4926 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4534
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Any chance there’s a Debian repo for bcachefs? I’d want to see how it does on an extra drive in my server. Or will I have to compile it the old fashioned way?"
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700418986 {#4529
date: 2023-11-19 19:36:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4535 …}
+nested: Doctrine\ORM\PersistentCollection {#4537 …}
+votes: Doctrine\ORM\PersistentCollection {#4539 …}
+reports: Doctrine\ORM\PersistentCollection {#4541 …}
+favourites: Doctrine\ORM\PersistentCollection {#4543 …}
+notifications: Doctrine\ORM\PersistentCollection {#4545 …}
-id: 127876
-bodyTs: "'bcachef':9 'chanc':2 'compil':30 'd':11 'debian':6 'drive':21 'extra':20 'fashion':34 'old':33 'repo':7 'see':14 'server':24 'want':12 'way':35"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5556117"
+editedAt: null
+createdAt: DateTimeImmutable @1700077829 {#4530
date: 2023-11-15 20:50:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4534}
+body: "Note that bcache and bcache**fs** are different things. The latter is extremely new and not ready for “production” yet. This post is about bcache."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700126707 {#4923
date: 2023-11-16 10:25:07.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@kugmo@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4927 …}
+nested: Doctrine\ORM\PersistentCollection {#4929 …}
+votes: Doctrine\ORM\PersistentCollection {#4931 …}
+reports: Doctrine\ORM\PersistentCollection {#4933 …}
+favourites: Doctrine\ORM\PersistentCollection {#4935 …}
+notifications: Doctrine\ORM\PersistentCollection {#4937 …}
-id: 129610
-bodyTs: "'bcach':3,5,25 'differ':8 'extrem':13 'fs':6 'latter':11 'new':14 'note':1 'post':22 'product':19 'readi':17 'thing':9 'yet':20"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5846412"
+editedAt: null
+createdAt: DateTimeImmutable @1700126707 {#4924
date: 2023-11-16 10:25:07.0 +01:00
}
} |
|
Show voter details
|
40 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4925
+user: Proxies\__CG__\App\Entity\User {#4926 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4534
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Any chance there’s a Debian repo for bcachefs? I’d want to see how it does on an extra drive in my server. Or will I have to compile it the old fashioned way?"
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700418986 {#4529
date: 2023-11-19 19:36:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4535 …}
+nested: Doctrine\ORM\PersistentCollection {#4537 …}
+votes: Doctrine\ORM\PersistentCollection {#4539 …}
+reports: Doctrine\ORM\PersistentCollection {#4541 …}
+favourites: Doctrine\ORM\PersistentCollection {#4543 …}
+notifications: Doctrine\ORM\PersistentCollection {#4545 …}
-id: 127876
-bodyTs: "'bcachef':9 'chanc':2 'compil':30 'd':11 'debian':6 'drive':21 'extra':20 'fashion':34 'old':33 'repo':7 'see':14 'server':24 'want':12 'way':35"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5556117"
+editedAt: null
+createdAt: DateTimeImmutable @1700077829 {#4530
date: 2023-11-15 20:50:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4534}
+body: "Note that bcache and bcache**fs** are different things. The latter is extremely new and not ready for “production” yet. This post is about bcache."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700126707 {#4923
date: 2023-11-16 10:25:07.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@kugmo@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4927 …}
+nested: Doctrine\ORM\PersistentCollection {#4929 …}
+votes: Doctrine\ORM\PersistentCollection {#4931 …}
+reports: Doctrine\ORM\PersistentCollection {#4933 …}
+favourites: Doctrine\ORM\PersistentCollection {#4935 …}
+notifications: Doctrine\ORM\PersistentCollection {#4937 …}
-id: 129610
-bodyTs: "'bcach':3,5,25 'differ':8 'extrem':13 'fs':6 'latter':11 'new':14 'note':1 'post':22 'product':19 'readi':17 'thing':9 'yet':20"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5846412"
+editedAt: null
+createdAt: DateTimeImmutable @1700126707 {#4924
date: 2023-11-16 10:25:07.0 +01:00
}
} |
|
Show voter details
|
41 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
42 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5073
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4925
+user: Proxies\__CG__\App\Entity\User {#4926 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4534
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Any chance there’s a Debian repo for bcachefs? I’d want to see how it does on an extra drive in my server. Or will I have to compile it the old fashioned way?"
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700418986 {#4529
date: 2023-11-19 19:36:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4535 …}
+nested: Doctrine\ORM\PersistentCollection {#4537 …}
+votes: Doctrine\ORM\PersistentCollection {#4539 …}
+reports: Doctrine\ORM\PersistentCollection {#4541 …}
+favourites: Doctrine\ORM\PersistentCollection {#4543 …}
+notifications: Doctrine\ORM\PersistentCollection {#4545 …}
-id: 127876
-bodyTs: "'bcachef':9 'chanc':2 'compil':30 'd':11 'debian':6 'drive':21 'extra':20 'fashion':34 'old':33 'repo':7 'see':14 'server':24 'want':12 'way':35"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5556117"
+editedAt: null
+createdAt: DateTimeImmutable @1700077829 {#4530
date: 2023-11-15 20:50:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4534}
+body: "Note that bcache and bcache**fs** are different things. The latter is extremely new and not ready for “production” yet. This post is about bcache."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700126707 {#4923
date: 2023-11-16 10:25:07.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@kugmo@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4927 …}
+nested: Doctrine\ORM\PersistentCollection {#4929 …}
+votes: Doctrine\ORM\PersistentCollection {#4931 …}
+reports: Doctrine\ORM\PersistentCollection {#4933 …}
+favourites: Doctrine\ORM\PersistentCollection {#4935 …}
+notifications: Doctrine\ORM\PersistentCollection {#4937 …}
-id: 129610
-bodyTs: "'bcach':3,5,25 'differ':8 'extrem':13 'fs':6 'latter':11 'new':14 'note':1 'post':22 'product':19 'readi':17 'thing':9 'yet':20"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5846412"
+editedAt: null
+createdAt: DateTimeImmutable @1700126707 {#4924
date: 2023-11-16 10:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4534}
+body: "Didn’t know there was a stand-alone bcache, I’ll have to look into that then."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700152658 {#5071
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@kugmo@sh.itjust.works"
"@Atemu@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#5074 …}
+nested: Doctrine\ORM\PersistentCollection {#5076 …}
+votes: Doctrine\ORM\PersistentCollection {#5078 …}
+reports: Doctrine\ORM\PersistentCollection {#5080 …}
+favourites: Doctrine\ORM\PersistentCollection {#5082 …}
+notifications: Doctrine\ORM\PersistentCollection {#5084 …}
-id: 130722
-bodyTs: "'alon':9 'bcach':10 'didn':1 'know':3 'll':12 'look':15 'stand':8 'stand-alon':7"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5588380"
+editedAt: null
+createdAt: DateTimeImmutable @1700152658 {#5072
date: 2023-11-16 17:37:38.0 +01:00
}
} |
|
Show voter details
|
43 |
DENIED
|
edit
|
App\Entity\EntryComment {#5073
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4925
+user: Proxies\__CG__\App\Entity\User {#4926 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4534
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Any chance there’s a Debian repo for bcachefs? I’d want to see how it does on an extra drive in my server. Or will I have to compile it the old fashioned way?"
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700418986 {#4529
date: 2023-11-19 19:36:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4535 …}
+nested: Doctrine\ORM\PersistentCollection {#4537 …}
+votes: Doctrine\ORM\PersistentCollection {#4539 …}
+reports: Doctrine\ORM\PersistentCollection {#4541 …}
+favourites: Doctrine\ORM\PersistentCollection {#4543 …}
+notifications: Doctrine\ORM\PersistentCollection {#4545 …}
-id: 127876
-bodyTs: "'bcachef':9 'chanc':2 'compil':30 'd':11 'debian':6 'drive':21 'extra':20 'fashion':34 'old':33 'repo':7 'see':14 'server':24 'want':12 'way':35"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5556117"
+editedAt: null
+createdAt: DateTimeImmutable @1700077829 {#4530
date: 2023-11-15 20:50:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4534}
+body: "Note that bcache and bcache**fs** are different things. The latter is extremely new and not ready for “production” yet. This post is about bcache."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700126707 {#4923
date: 2023-11-16 10:25:07.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@kugmo@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4927 …}
+nested: Doctrine\ORM\PersistentCollection {#4929 …}
+votes: Doctrine\ORM\PersistentCollection {#4931 …}
+reports: Doctrine\ORM\PersistentCollection {#4933 …}
+favourites: Doctrine\ORM\PersistentCollection {#4935 …}
+notifications: Doctrine\ORM\PersistentCollection {#4937 …}
-id: 129610
-bodyTs: "'bcach':3,5,25 'differ':8 'extrem':13 'fs':6 'latter':11 'new':14 'note':1 'post':22 'product':19 'readi':17 'thing':9 'yet':20"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5846412"
+editedAt: null
+createdAt: DateTimeImmutable @1700126707 {#4924
date: 2023-11-16 10:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4534}
+body: "Didn’t know there was a stand-alone bcache, I’ll have to look into that then."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700152658 {#5071
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@kugmo@sh.itjust.works"
"@Atemu@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#5074 …}
+nested: Doctrine\ORM\PersistentCollection {#5076 …}
+votes: Doctrine\ORM\PersistentCollection {#5078 …}
+reports: Doctrine\ORM\PersistentCollection {#5080 …}
+favourites: Doctrine\ORM\PersistentCollection {#5082 …}
+notifications: Doctrine\ORM\PersistentCollection {#5084 …}
-id: 130722
-bodyTs: "'alon':9 'bcach':10 'didn':1 'know':3 'll':12 'look':15 'stand':8 'stand-alon':7"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5588380"
+editedAt: null
+createdAt: DateTimeImmutable @1700152658 {#5072
date: 2023-11-16 17:37:38.0 +01:00
}
} |
|
Show voter details
|
44 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5073
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4925
+user: Proxies\__CG__\App\Entity\User {#4926 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4534
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Any chance there’s a Debian repo for bcachefs? I’d want to see how it does on an extra drive in my server. Or will I have to compile it the old fashioned way?"
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700418986 {#4529
date: 2023-11-19 19:36:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4535 …}
+nested: Doctrine\ORM\PersistentCollection {#4537 …}
+votes: Doctrine\ORM\PersistentCollection {#4539 …}
+reports: Doctrine\ORM\PersistentCollection {#4541 …}
+favourites: Doctrine\ORM\PersistentCollection {#4543 …}
+notifications: Doctrine\ORM\PersistentCollection {#4545 …}
-id: 127876
-bodyTs: "'bcachef':9 'chanc':2 'compil':30 'd':11 'debian':6 'drive':21 'extra':20 'fashion':34 'old':33 'repo':7 'see':14 'server':24 'want':12 'way':35"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5556117"
+editedAt: null
+createdAt: DateTimeImmutable @1700077829 {#4530
date: 2023-11-15 20:50:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4534}
+body: "Note that bcache and bcache**fs** are different things. The latter is extremely new and not ready for “production” yet. This post is about bcache."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700126707 {#4923
date: 2023-11-16 10:25:07.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@kugmo@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4927 …}
+nested: Doctrine\ORM\PersistentCollection {#4929 …}
+votes: Doctrine\ORM\PersistentCollection {#4931 …}
+reports: Doctrine\ORM\PersistentCollection {#4933 …}
+favourites: Doctrine\ORM\PersistentCollection {#4935 …}
+notifications: Doctrine\ORM\PersistentCollection {#4937 …}
-id: 129610
-bodyTs: "'bcach':3,5,25 'differ':8 'extrem':13 'fs':6 'latter':11 'new':14 'note':1 'post':22 'product':19 'readi':17 'thing':9 'yet':20"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5846412"
+editedAt: null
+createdAt: DateTimeImmutable @1700126707 {#4924
date: 2023-11-16 10:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4534}
+body: "Didn’t know there was a stand-alone bcache, I’ll have to look into that then."
+lang: "en"
+isAdult: false
+favouriteCount: 1
+score: 0
+lastActive: DateTime @1700152658 {#5071
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@kugmo@sh.itjust.works"
"@Atemu@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#5074 …}
+nested: Doctrine\ORM\PersistentCollection {#5076 …}
+votes: Doctrine\ORM\PersistentCollection {#5078 …}
+reports: Doctrine\ORM\PersistentCollection {#5080 …}
+favourites: Doctrine\ORM\PersistentCollection {#5082 …}
+notifications: Doctrine\ORM\PersistentCollection {#5084 …}
-id: 130722
-bodyTs: "'alon':9 'bcach':10 'didn':1 'know':3 'll':12 'look':15 'stand':8 'stand-alon':7"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5588380"
+editedAt: null
+createdAt: DateTimeImmutable @1700152658 {#5072
date: 2023-11-16 17:37:38.0 +01:00
}
} |
|
Show voter details
|
45 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
46 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4941
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4534
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Any chance there’s a Debian repo for bcachefs? I’d want to see how it does on an extra drive in my server. Or will I have to compile it the old fashioned way?"
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700418986 {#4529
date: 2023-11-19 19:36:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4535 …}
+nested: Doctrine\ORM\PersistentCollection {#4537 …}
+votes: Doctrine\ORM\PersistentCollection {#4539 …}
+reports: Doctrine\ORM\PersistentCollection {#4541 …}
+favourites: Doctrine\ORM\PersistentCollection {#4543 …}
+notifications: Doctrine\ORM\PersistentCollection {#4545 …}
-id: 127876
-bodyTs: "'bcachef':9 'chanc':2 'compil':30 'd':11 'debian':6 'drive':21 'extra':20 'fashion':34 'old':33 'repo':7 'see':14 'server':24 'want':12 'way':35"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5556117"
+editedAt: null
+createdAt: DateTimeImmutable @1700077829 {#4530
date: 2023-11-15 20:50:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4534}
+body: "For bcache, it is available in apt, I think. You just need to set the ppa. For bcache**fs**, I think you need to wait for 6.7 to land on Debian or compile it yourself."
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1700098821 {#4939
date: 2023-11-16 02:40:21.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@kugmo@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4942 …}
+nested: Doctrine\ORM\PersistentCollection {#4944 …}
+votes: Doctrine\ORM\PersistentCollection {#4946 …}
+reports: Doctrine\ORM\PersistentCollection {#4948 …}
+favourites: Doctrine\ORM\PersistentCollection {#4950 …}
+notifications: Doctrine\ORM\PersistentCollection {#4952 …}
-id: 128684
-bodyTs: "'6.7':27 'apt':7 'avail':5 'bcach':2,18 'compil':33 'debian':31 'fs':19 'land':29 'need':12,23 'ppa':16 'set':14 'think':9,21 'wait':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5838392"
+editedAt: null
+createdAt: DateTimeImmutable @1700098821 {#4940
date: 2023-11-16 02:40:21.0 +01:00
}
} |
|
Show voter details
|
47 |
DENIED
|
edit
|
App\Entity\EntryComment {#4941
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4534
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Any chance there’s a Debian repo for bcachefs? I’d want to see how it does on an extra drive in my server. Or will I have to compile it the old fashioned way?"
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700418986 {#4529
date: 2023-11-19 19:36:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4535 …}
+nested: Doctrine\ORM\PersistentCollection {#4537 …}
+votes: Doctrine\ORM\PersistentCollection {#4539 …}
+reports: Doctrine\ORM\PersistentCollection {#4541 …}
+favourites: Doctrine\ORM\PersistentCollection {#4543 …}
+notifications: Doctrine\ORM\PersistentCollection {#4545 …}
-id: 127876
-bodyTs: "'bcachef':9 'chanc':2 'compil':30 'd':11 'debian':6 'drive':21 'extra':20 'fashion':34 'old':33 'repo':7 'see':14 'server':24 'want':12 'way':35"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5556117"
+editedAt: null
+createdAt: DateTimeImmutable @1700077829 {#4530
date: 2023-11-15 20:50:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4534}
+body: "For bcache, it is available in apt, I think. You just need to set the ppa. For bcache**fs**, I think you need to wait for 6.7 to land on Debian or compile it yourself."
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1700098821 {#4939
date: 2023-11-16 02:40:21.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@kugmo@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4942 …}
+nested: Doctrine\ORM\PersistentCollection {#4944 …}
+votes: Doctrine\ORM\PersistentCollection {#4946 …}
+reports: Doctrine\ORM\PersistentCollection {#4948 …}
+favourites: Doctrine\ORM\PersistentCollection {#4950 …}
+notifications: Doctrine\ORM\PersistentCollection {#4952 …}
-id: 128684
-bodyTs: "'6.7':27 'apt':7 'avail':5 'bcach':2,18 'compil':33 'debian':31 'fs':19 'land':29 'need':12,23 'ppa':16 'set':14 'think':9,21 'wait':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5838392"
+editedAt: null
+createdAt: DateTimeImmutable @1700098821 {#4940
date: 2023-11-16 02:40:21.0 +01:00
}
} |
|
Show voter details
|
48 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4941
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4534
+user: App\Entity\User {#4547 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Any chance there’s a Debian repo for bcachefs? I’d want to see how it does on an extra drive in my server. Or will I have to compile it the old fashioned way?"
+lang: "en"
+isAdult: false
+favouriteCount: 5
+score: 0
+lastActive: DateTime @1700418986 {#4529
date: 2023-11-19 19:36:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4535 …}
+nested: Doctrine\ORM\PersistentCollection {#4537 …}
+votes: Doctrine\ORM\PersistentCollection {#4539 …}
+reports: Doctrine\ORM\PersistentCollection {#4541 …}
+favourites: Doctrine\ORM\PersistentCollection {#4543 …}
+notifications: Doctrine\ORM\PersistentCollection {#4545 …}
-id: 127876
-bodyTs: "'bcachef':9 'chanc':2 'compil':30 'd':11 'debian':6 'drive':21 'extra':20 'fashion':34 'old':33 'repo':7 'see':14 'server':24 'want':12 'way':35"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://sh.itjust.works/comment/5556117"
+editedAt: null
+createdAt: DateTimeImmutable @1700077829 {#4530
date: 2023-11-15 20:50:29.0 +01:00
}
}
+root: App\Entity\EntryComment {#4534}
+body: "For bcache, it is available in apt, I think. You just need to set the ppa. For bcache**fs**, I think you need to wait for 6.7 to land on Debian or compile it yourself."
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1700098821 {#4939
date: 2023-11-16 02:40:21.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@kugmo@sh.itjust.works"
]
+children: Doctrine\ORM\PersistentCollection {#4942 …}
+nested: Doctrine\ORM\PersistentCollection {#4944 …}
+votes: Doctrine\ORM\PersistentCollection {#4946 …}
+reports: Doctrine\ORM\PersistentCollection {#4948 …}
+favourites: Doctrine\ORM\PersistentCollection {#4950 …}
+notifications: Doctrine\ORM\PersistentCollection {#4952 …}
-id: 128684
-bodyTs: "'6.7':27 'apt':7 'avail':5 'bcach':2,18 'compil':33 'debian':31 'fs':19 'land':29 'need':12,23 'ppa':16 'set':14 'think':9,21 'wait':25"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5838392"
+editedAt: null
+createdAt: DateTimeImmutable @1700098821 {#4940
date: 2023-11-16 02:40:21.0 +01:00
}
} |
|
Show voter details
|
49 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
50 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
} |
|
Show voter details
|
51 |
DENIED
|
edit
|
App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
} |
|
Show voter details
|
52 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
} |
|
Show voter details
|
53 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
54 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4956
+user: Proxies\__CG__\App\Entity\User {#4926 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
> except for hdds without cache\n
\n
The “cache” on HDDs is extremely tiny. Maybe a few seconds worth of sequential access at max. It does not exist to cache significant amounts of data for much longer than that.\n
\n
At the sizes at which bcache is used, you could permanently hold almost all of your performance-critical data on flash storage while having enough space for tonnes of performance-uncritical data; all in the same storage “package”.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1700126620 {#4954
date: 2023-11-16 10:23:40.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4957 …}
+nested: Doctrine\ORM\PersistentCollection {#4959 …}
+votes: Doctrine\ORM\PersistentCollection {#4961 …}
+reports: Doctrine\ORM\PersistentCollection {#4963 …}
+favourites: Doctrine\ORM\PersistentCollection {#4965 …}
+notifications: Doctrine\ORM\PersistentCollection {#4967 …}
-id: 129609
-bodyTs: "'access':20 'almost':50 'amount':30 'bcach':43 'cach':5,7,28 'could':47 'critic':56 'data':32,57,71 'enough':63 'except':1 'exist':26 'extrem':11 'flash':59 'hdds':3,9 'hold':49 'longer':35 'max':22 'mayb':13 'much':34 'packag':77 'perform':55,69 'performance-crit':54 'performance-uncrit':68 'perman':48 'second':16 'sequenti':19 'signific':29 'size':40 'space':64 'storag':60,76 'tini':12 'tonn':66 'uncrit':70 'use':45 'without':4 'worth':17"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5846392"
+editedAt: null
+createdAt: DateTimeImmutable @1700126620 {#4955
date: 2023-11-16 10:23:40.0 +01:00
}
} |
|
Show voter details
|
55 |
DENIED
|
edit
|
App\Entity\EntryComment {#4956
+user: Proxies\__CG__\App\Entity\User {#4926 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
> except for hdds without cache\n
\n
The “cache” on HDDs is extremely tiny. Maybe a few seconds worth of sequential access at max. It does not exist to cache significant amounts of data for much longer than that.\n
\n
At the sizes at which bcache is used, you could permanently hold almost all of your performance-critical data on flash storage while having enough space for tonnes of performance-uncritical data; all in the same storage “package”.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1700126620 {#4954
date: 2023-11-16 10:23:40.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4957 …}
+nested: Doctrine\ORM\PersistentCollection {#4959 …}
+votes: Doctrine\ORM\PersistentCollection {#4961 …}
+reports: Doctrine\ORM\PersistentCollection {#4963 …}
+favourites: Doctrine\ORM\PersistentCollection {#4965 …}
+notifications: Doctrine\ORM\PersistentCollection {#4967 …}
-id: 129609
-bodyTs: "'access':20 'almost':50 'amount':30 'bcach':43 'cach':5,7,28 'could':47 'critic':56 'data':32,57,71 'enough':63 'except':1 'exist':26 'extrem':11 'flash':59 'hdds':3,9 'hold':49 'longer':35 'max':22 'mayb':13 'much':34 'packag':77 'perform':55,69 'performance-crit':54 'performance-uncrit':68 'perman':48 'second':16 'sequenti':19 'signific':29 'size':40 'space':64 'storag':60,76 'tini':12 'tonn':66 'uncrit':70 'use':45 'without':4 'worth':17"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5846392"
+editedAt: null
+createdAt: DateTimeImmutable @1700126620 {#4955
date: 2023-11-16 10:23:40.0 +01:00
}
} |
|
Show voter details
|
56 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4956
+user: Proxies\__CG__\App\Entity\User {#4926 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
> except for hdds without cache\n
\n
The “cache” on HDDs is extremely tiny. Maybe a few seconds worth of sequential access at max. It does not exist to cache significant amounts of data for much longer than that.\n
\n
At the sizes at which bcache is used, you could permanently hold almost all of your performance-critical data on flash storage while having enough space for tonnes of performance-uncritical data; all in the same storage “package”.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1700126620 {#4954
date: 2023-11-16 10:23:40.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4957 …}
+nested: Doctrine\ORM\PersistentCollection {#4959 …}
+votes: Doctrine\ORM\PersistentCollection {#4961 …}
+reports: Doctrine\ORM\PersistentCollection {#4963 …}
+favourites: Doctrine\ORM\PersistentCollection {#4965 …}
+notifications: Doctrine\ORM\PersistentCollection {#4967 …}
-id: 129609
-bodyTs: "'access':20 'almost':50 'amount':30 'bcach':43 'cach':5,7,28 'could':47 'critic':56 'data':32,57,71 'enough':63 'except':1 'exist':26 'extrem':11 'flash':59 'hdds':3,9 'hold':49 'longer':35 'max':22 'mayb':13 'much':34 'packag':77 'perform':55,69 'performance-crit':54 'performance-uncrit':68 'perman':48 'second':16 'sequenti':19 'signific':29 'size':40 'space':64 'storag':60,76 'tini':12 'tonn':66 'uncrit':70 'use':45 'without':4 'worth':17"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5846392"
+editedAt: null
+createdAt: DateTimeImmutable @1700126620 {#4955
date: 2023-11-16 10:23:40.0 +01:00
}
} |
|
Show voter details
|
57 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
58 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4971
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
In my case, it basically helps me improve random read significantly. My NVMe is fast, like 3GB/s in sequential and 500MB/s in random, but it’s only 120GB. By using it as a cache in a bcache system, once a random read is performed, the data will be copied from HDD to SSD and if the data is requested again the random read will happen from SSD instead of HDD.\n
\n
Thus, using it to play modern gaming is actually do able. Game that requires fast random read, like Baldur’s Gate 3 and Starfield.\n
\n
As a lot of people in my og post mentioned, random is more important that sequential. Bcache by default disable sequential cache so you wont fill you cache to fast if a big data is being read, like watching movie, copying video, etc. That’s where Raid0 comes to the rescue. Having Raid0 with 2 drives basically double my sequential read and having 3 triples it.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1700097766 {#4969
date: 2023-11-16 02:22:46.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4972 …}
+nested: Doctrine\ORM\PersistentCollection {#4974 …}
+votes: Doctrine\ORM\PersistentCollection {#4976 …}
+reports: Doctrine\ORM\PersistentCollection {#4978 …}
+favourites: Doctrine\ORM\PersistentCollection {#4980 …}
+notifications: Doctrine\ORM\PersistentCollection {#4982 …}
-id: 128651
-bodyTs: "'120gb':28 '2':149 '3':92,158 '3gb/s':17 '500mb/s':21 'abl':81 'actual':79 'baldur':89 'basic':5,151 'bcach':37,111 'big':127 'cach':34,116,122 'case':3 'come':142 'copi':49,135 'data':46,57,128 'default':113 'disabl':114 'doubl':152 'drive':150 'etc':137 'fast':15,85,124 'fill':120 'game':77,82 'gate':91 'happen':65 'hdd':51,70 'help':6 'import':108 'improv':8 'instead':68 'like':16,88,132 'lot':97 'mention':104 'modern':76 'movi':134 'nvme':13 'og':102 'peopl':99 'perform':44 'play':75 'post':103 'raid0':141,147 'random':9,23,41,62,86,105 'read':10,42,63,87,131,155 'request':59 'requir':84 'rescu':145 'sequenti':19,110,115,154 'signific':11 'ssd':53,67 'starfield':94 'system':38 'thus':71 'tripl':159 'use':30,72 'video':136 'watch':133 'wont':119"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5837996"
+editedAt: null
+createdAt: DateTimeImmutable @1700097766 {#4970
date: 2023-11-16 02:22:46.0 +01:00
}
} |
|
Show voter details
|
59 |
DENIED
|
edit
|
App\Entity\EntryComment {#4971
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
In my case, it basically helps me improve random read significantly. My NVMe is fast, like 3GB/s in sequential and 500MB/s in random, but it’s only 120GB. By using it as a cache in a bcache system, once a random read is performed, the data will be copied from HDD to SSD and if the data is requested again the random read will happen from SSD instead of HDD.\n
\n
Thus, using it to play modern gaming is actually do able. Game that requires fast random read, like Baldur’s Gate 3 and Starfield.\n
\n
As a lot of people in my og post mentioned, random is more important that sequential. Bcache by default disable sequential cache so you wont fill you cache to fast if a big data is being read, like watching movie, copying video, etc. That’s where Raid0 comes to the rescue. Having Raid0 with 2 drives basically double my sequential read and having 3 triples it.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1700097766 {#4969
date: 2023-11-16 02:22:46.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4972 …}
+nested: Doctrine\ORM\PersistentCollection {#4974 …}
+votes: Doctrine\ORM\PersistentCollection {#4976 …}
+reports: Doctrine\ORM\PersistentCollection {#4978 …}
+favourites: Doctrine\ORM\PersistentCollection {#4980 …}
+notifications: Doctrine\ORM\PersistentCollection {#4982 …}
-id: 128651
-bodyTs: "'120gb':28 '2':149 '3':92,158 '3gb/s':17 '500mb/s':21 'abl':81 'actual':79 'baldur':89 'basic':5,151 'bcach':37,111 'big':127 'cach':34,116,122 'case':3 'come':142 'copi':49,135 'data':46,57,128 'default':113 'disabl':114 'doubl':152 'drive':150 'etc':137 'fast':15,85,124 'fill':120 'game':77,82 'gate':91 'happen':65 'hdd':51,70 'help':6 'import':108 'improv':8 'instead':68 'like':16,88,132 'lot':97 'mention':104 'modern':76 'movi':134 'nvme':13 'og':102 'peopl':99 'perform':44 'play':75 'post':103 'raid0':141,147 'random':9,23,41,62,86,105 'read':10,42,63,87,131,155 'request':59 'requir':84 'rescu':145 'sequenti':19,110,115,154 'signific':11 'ssd':53,67 'starfield':94 'system':38 'thus':71 'tripl':159 'use':30,72 'video':136 'watch':133 'wont':119"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5837996"
+editedAt: null
+createdAt: DateTimeImmutable @1700097766 {#4970
date: 2023-11-16 02:22:46.0 +01:00
}
} |
|
Show voter details
|
60 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4971
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
In my case, it basically helps me improve random read significantly. My NVMe is fast, like 3GB/s in sequential and 500MB/s in random, but it’s only 120GB. By using it as a cache in a bcache system, once a random read is performed, the data will be copied from HDD to SSD and if the data is requested again the random read will happen from SSD instead of HDD.\n
\n
Thus, using it to play modern gaming is actually do able. Game that requires fast random read, like Baldur’s Gate 3 and Starfield.\n
\n
As a lot of people in my og post mentioned, random is more important that sequential. Bcache by default disable sequential cache so you wont fill you cache to fast if a big data is being read, like watching movie, copying video, etc. That’s where Raid0 comes to the rescue. Having Raid0 with 2 drives basically double my sequential read and having 3 triples it.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1700097766 {#4969
date: 2023-11-16 02:22:46.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4972 …}
+nested: Doctrine\ORM\PersistentCollection {#4974 …}
+votes: Doctrine\ORM\PersistentCollection {#4976 …}
+reports: Doctrine\ORM\PersistentCollection {#4978 …}
+favourites: Doctrine\ORM\PersistentCollection {#4980 …}
+notifications: Doctrine\ORM\PersistentCollection {#4982 …}
-id: 128651
-bodyTs: "'120gb':28 '2':149 '3':92,158 '3gb/s':17 '500mb/s':21 'abl':81 'actual':79 'baldur':89 'basic':5,151 'bcach':37,111 'big':127 'cach':34,116,122 'case':3 'come':142 'copi':49,135 'data':46,57,128 'default':113 'disabl':114 'doubl':152 'drive':150 'etc':137 'fast':15,85,124 'fill':120 'game':77,82 'gate':91 'happen':65 'hdd':51,70 'help':6 'import':108 'improv':8 'instead':68 'like':16,88,132 'lot':97 'mention':104 'modern':76 'movi':134 'nvme':13 'og':102 'peopl':99 'perform':44 'play':75 'post':103 'raid0':141,147 'random':9,23,41,62,86,105 'read':10,42,63,87,131,155 'request':59 'requir':84 'rescu':145 'sequenti':19,110,115,154 'signific':11 'ssd':53,67 'starfield':94 'system':38 'thus':71 'tripl':159 'use':30,72 'video':136 'watch':133 'wont':119"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5837996"
+editedAt: null
+createdAt: DateTimeImmutable @1700097766 {#4970
date: 2023-11-16 02:22:46.0 +01:00
}
} |
|
Show voter details
|
61 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
62 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4986
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
Basically the idea is that if you have a lot of data, HDDs have much bigger capacities for the price, whereas large SSDs can be expensive. SSDs have gotten cheap, but you can get used enterprise drives on eBay with huge capacities for incredibly cheap. There’s 12TB HDDs for like $100. 12TB of SSDs would run you several hundreds.\n
\n
You can slap bcache on a 512GB NVMe backed by a 8TB HDD, and you get 8TB worth of storage, 512GB of which will be cached on the NVMe and thus really fast. But from the user’s perspective, it’s just one big 8TB drive. You don’t have to think about what is where, you just use it. You don’t have to be like, I’m going to use this VM so I’ll move it to the SSD and back to the HDD when done. The first time might be super slow but subsequent use will be very fast. It also caches writes too, so you can write up to 512GB really fast in this example and it’ll slowly get flushed to the HDD in the background. But from your perspective, as soon as it’s written to the SSD, the data is effectively commited to disk. If the application calls fsync to ensure data is written to disk, it’ll complete once it’s fully written to the SSD. You get NVMe read/write speeds and the space of an HDD.\n
\n
So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 26
+score: 0
+lastActive: DateTime @1700080753 {#4984
date: 2023-11-15 21:39:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4988 …}
+nested: Doctrine\ORM\PersistentCollection {#4990 …}
+votes: Doctrine\ORM\PersistentCollection {#4992 …}
+reports: Doctrine\ORM\PersistentCollection {#4994 …}
+favourites: Doctrine\ORM\PersistentCollection {#4996 …}
+notifications: Doctrine\ORM\PersistentCollection {#4998 …}
-id: 128024
-bodyTs: "'100':52 '12tb':48,53 '512gb':67,81,175 '8tb':72,77,105 'also':165 'applic':215 'back':69,144 'background':192 'basic':1 'bcach':64 'big':104,249 'bigger':16 'cach':86,166,279 'call':216 'capac':17,42 'cheap':30,45 'commit':210 'complet':227 'data':12,207,220 'disk':212,224,250 'done':149 'drive':37,106 'ebay':39 'effect':209 'ensur':219 'enterpris':36 'exampl':180 'expens':26 'fast':93,163,177 'file':273 'first':151,264 'flush':186 'fsync':217 'fulli':231 'game':272 'get':34,76,185,237,274 'go':130 'gotten':29 'hdd':73,147,189,246 'hdds':13,49 'huge':41 'hundr':60 'idea':3 'incred':44 'larg':22 'librari':254 'like':51,127 'll':137,183,226 'load':265,288 'lot':10 'm':129 'might':153,259 'most':282 'move':138 'much':15,291 'nvme':68,89,238,278,284 'one':103,248 'perform':281 'perspect':99,196 'play':258,270 'price':20 'promot':275 'read/write':239 'realli':92,176 'run':57 'screen':289 'sever':59 'shorter':292 'slap':63 'slow':156,261 'slowli':184 'soon':198 'space':243 'speed':240,285 'ssd':142,205,235 'ssds':23,27,55 'steam':253 'storag':80 'subsequ':158 'super':155 'think':112 'thus':91 'time':152 'use':35,119,132,159 'user':97 'vm':134 'whatev':256 'wherea':21 'worth':78 'would':56 'write':167,172 'written':202,222,232"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1457701"
+editedAt: null
+createdAt: DateTimeImmutable @1700080753 {#4985
date: 2023-11-15 21:39:13.0 +01:00
}
} |
|
Show voter details
|
63 |
DENIED
|
edit
|
App\Entity\EntryComment {#4986
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
Basically the idea is that if you have a lot of data, HDDs have much bigger capacities for the price, whereas large SSDs can be expensive. SSDs have gotten cheap, but you can get used enterprise drives on eBay with huge capacities for incredibly cheap. There’s 12TB HDDs for like $100. 12TB of SSDs would run you several hundreds.\n
\n
You can slap bcache on a 512GB NVMe backed by a 8TB HDD, and you get 8TB worth of storage, 512GB of which will be cached on the NVMe and thus really fast. But from the user’s perspective, it’s just one big 8TB drive. You don’t have to think about what is where, you just use it. You don’t have to be like, I’m going to use this VM so I’ll move it to the SSD and back to the HDD when done. The first time might be super slow but subsequent use will be very fast. It also caches writes too, so you can write up to 512GB really fast in this example and it’ll slowly get flushed to the HDD in the background. But from your perspective, as soon as it’s written to the SSD, the data is effectively commited to disk. If the application calls fsync to ensure data is written to disk, it’ll complete once it’s fully written to the SSD. You get NVMe read/write speeds and the space of an HDD.\n
\n
So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 26
+score: 0
+lastActive: DateTime @1700080753 {#4984
date: 2023-11-15 21:39:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4988 …}
+nested: Doctrine\ORM\PersistentCollection {#4990 …}
+votes: Doctrine\ORM\PersistentCollection {#4992 …}
+reports: Doctrine\ORM\PersistentCollection {#4994 …}
+favourites: Doctrine\ORM\PersistentCollection {#4996 …}
+notifications: Doctrine\ORM\PersistentCollection {#4998 …}
-id: 128024
-bodyTs: "'100':52 '12tb':48,53 '512gb':67,81,175 '8tb':72,77,105 'also':165 'applic':215 'back':69,144 'background':192 'basic':1 'bcach':64 'big':104,249 'bigger':16 'cach':86,166,279 'call':216 'capac':17,42 'cheap':30,45 'commit':210 'complet':227 'data':12,207,220 'disk':212,224,250 'done':149 'drive':37,106 'ebay':39 'effect':209 'ensur':219 'enterpris':36 'exampl':180 'expens':26 'fast':93,163,177 'file':273 'first':151,264 'flush':186 'fsync':217 'fulli':231 'game':272 'get':34,76,185,237,274 'go':130 'gotten':29 'hdd':73,147,189,246 'hdds':13,49 'huge':41 'hundr':60 'idea':3 'incred':44 'larg':22 'librari':254 'like':51,127 'll':137,183,226 'load':265,288 'lot':10 'm':129 'might':153,259 'most':282 'move':138 'much':15,291 'nvme':68,89,238,278,284 'one':103,248 'perform':281 'perspect':99,196 'play':258,270 'price':20 'promot':275 'read/write':239 'realli':92,176 'run':57 'screen':289 'sever':59 'shorter':292 'slap':63 'slow':156,261 'slowli':184 'soon':198 'space':243 'speed':240,285 'ssd':142,205,235 'ssds':23,27,55 'steam':253 'storag':80 'subsequ':158 'super':155 'think':112 'thus':91 'time':152 'use':35,119,132,159 'user':97 'vm':134 'whatev':256 'wherea':21 'worth':78 'would':56 'write':167,172 'written':202,222,232"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1457701"
+editedAt: null
+createdAt: DateTimeImmutable @1700080753 {#4985
date: 2023-11-15 21:39:13.0 +01:00
}
} |
|
Show voter details
|
64 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4986
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
Basically the idea is that if you have a lot of data, HDDs have much bigger capacities for the price, whereas large SSDs can be expensive. SSDs have gotten cheap, but you can get used enterprise drives on eBay with huge capacities for incredibly cheap. There’s 12TB HDDs for like $100. 12TB of SSDs would run you several hundreds.\n
\n
You can slap bcache on a 512GB NVMe backed by a 8TB HDD, and you get 8TB worth of storage, 512GB of which will be cached on the NVMe and thus really fast. But from the user’s perspective, it’s just one big 8TB drive. You don’t have to think about what is where, you just use it. You don’t have to be like, I’m going to use this VM so I’ll move it to the SSD and back to the HDD when done. The first time might be super slow but subsequent use will be very fast. It also caches writes too, so you can write up to 512GB really fast in this example and it’ll slowly get flushed to the HDD in the background. But from your perspective, as soon as it’s written to the SSD, the data is effectively commited to disk. If the application calls fsync to ensure data is written to disk, it’ll complete once it’s fully written to the SSD. You get NVMe read/write speeds and the space of an HDD.\n
\n
So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 26
+score: 0
+lastActive: DateTime @1700080753 {#4984
date: 2023-11-15 21:39:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4988 …}
+nested: Doctrine\ORM\PersistentCollection {#4990 …}
+votes: Doctrine\ORM\PersistentCollection {#4992 …}
+reports: Doctrine\ORM\PersistentCollection {#4994 …}
+favourites: Doctrine\ORM\PersistentCollection {#4996 …}
+notifications: Doctrine\ORM\PersistentCollection {#4998 …}
-id: 128024
-bodyTs: "'100':52 '12tb':48,53 '512gb':67,81,175 '8tb':72,77,105 'also':165 'applic':215 'back':69,144 'background':192 'basic':1 'bcach':64 'big':104,249 'bigger':16 'cach':86,166,279 'call':216 'capac':17,42 'cheap':30,45 'commit':210 'complet':227 'data':12,207,220 'disk':212,224,250 'done':149 'drive':37,106 'ebay':39 'effect':209 'ensur':219 'enterpris':36 'exampl':180 'expens':26 'fast':93,163,177 'file':273 'first':151,264 'flush':186 'fsync':217 'fulli':231 'game':272 'get':34,76,185,237,274 'go':130 'gotten':29 'hdd':73,147,189,246 'hdds':13,49 'huge':41 'hundr':60 'idea':3 'incred':44 'larg':22 'librari':254 'like':51,127 'll':137,183,226 'load':265,288 'lot':10 'm':129 'might':153,259 'most':282 'move':138 'much':15,291 'nvme':68,89,238,278,284 'one':103,248 'perform':281 'perspect':99,196 'play':258,270 'price':20 'promot':275 'read/write':239 'realli':92,176 'run':57 'screen':289 'sever':59 'shorter':292 'slap':63 'slow':156,261 'slowli':184 'soon':198 'space':243 'speed':240,285 'ssd':142,205,235 'ssds':23,27,55 'steam':253 'storag':80 'subsequ':158 'super':155 'think':112 'thus':91 'time':152 'use':35,119,132,159 'user':97 'vm':134 'whatev':256 'wherea':21 'worth':78 'would':56 'write':167,172 'written':202,222,232"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1457701"
+editedAt: null
+createdAt: DateTimeImmutable @1700080753 {#4985
date: 2023-11-15 21:39:13.0 +01:00
}
} |
|
Show voter details
|
65 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
66 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5036
+user: Proxies\__CG__\App\Entity\User {#5041 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4986
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
Basically the idea is that if you have a lot of data, HDDs have much bigger capacities for the price, whereas large SSDs can be expensive. SSDs have gotten cheap, but you can get used enterprise drives on eBay with huge capacities for incredibly cheap. There’s 12TB HDDs for like $100. 12TB of SSDs would run you several hundreds.\n
\n
You can slap bcache on a 512GB NVMe backed by a 8TB HDD, and you get 8TB worth of storage, 512GB of which will be cached on the NVMe and thus really fast. But from the user’s perspective, it’s just one big 8TB drive. You don’t have to think about what is where, you just use it. You don’t have to be like, I’m going to use this VM so I’ll move it to the SSD and back to the HDD when done. The first time might be super slow but subsequent use will be very fast. It also caches writes too, so you can write up to 512GB really fast in this example and it’ll slowly get flushed to the HDD in the background. But from your perspective, as soon as it’s written to the SSD, the data is effectively commited to disk. If the application calls fsync to ensure data is written to disk, it’ll complete once it’s fully written to the SSD. You get NVMe read/write speeds and the space of an HDD.\n
\n
So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 26
+score: 0
+lastActive: DateTime @1700080753 {#4984
date: 2023-11-15 21:39:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4988 …}
+nested: Doctrine\ORM\PersistentCollection {#4990 …}
+votes: Doctrine\ORM\PersistentCollection {#4992 …}
+reports: Doctrine\ORM\PersistentCollection {#4994 …}
+favourites: Doctrine\ORM\PersistentCollection {#4996 …}
+notifications: Doctrine\ORM\PersistentCollection {#4998 …}
-id: 128024
-bodyTs: "'100':52 '12tb':48,53 '512gb':67,81,175 '8tb':72,77,105 'also':165 'applic':215 'back':69,144 'background':192 'basic':1 'bcach':64 'big':104,249 'bigger':16 'cach':86,166,279 'call':216 'capac':17,42 'cheap':30,45 'commit':210 'complet':227 'data':12,207,220 'disk':212,224,250 'done':149 'drive':37,106 'ebay':39 'effect':209 'ensur':219 'enterpris':36 'exampl':180 'expens':26 'fast':93,163,177 'file':273 'first':151,264 'flush':186 'fsync':217 'fulli':231 'game':272 'get':34,76,185,237,274 'go':130 'gotten':29 'hdd':73,147,189,246 'hdds':13,49 'huge':41 'hundr':60 'idea':3 'incred':44 'larg':22 'librari':254 'like':51,127 'll':137,183,226 'load':265,288 'lot':10 'm':129 'might':153,259 'most':282 'move':138 'much':15,291 'nvme':68,89,238,278,284 'one':103,248 'perform':281 'perspect':99,196 'play':258,270 'price':20 'promot':275 'read/write':239 'realli':92,176 'run':57 'screen':289 'sever':59 'shorter':292 'slap':63 'slow':156,261 'slowli':184 'soon':198 'space':243 'speed':240,285 'ssd':142,205,235 'ssds':23,27,55 'steam':253 'storag':80 'subsequ':158 'super':155 'think':112 'thus':91 'time':152 'use':35,119,132,159 'user':97 'vm':134 'whatev':256 'wherea':21 'worth':78 'would':56 'write':167,172 'written':202,222,232"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1457701"
+editedAt: null
+createdAt: DateTimeImmutable @1700080753 {#4985
date: 2023-11-15 21:39:13.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: "What are the implications in regards to the lifespan of the disk used as cache? Any potential downsides?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700103963 {#5035
date: 2023-11-16 04:06:03.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
"@Max_P@lemmy.max-p.me"
]
+children: Doctrine\ORM\PersistentCollection {#5047 …}
+nested: Doctrine\ORM\PersistentCollection {#5043 …}
+votes: Doctrine\ORM\PersistentCollection {#5045 …}
+reports: Doctrine\ORM\PersistentCollection {#5049 …}
+favourites: Doctrine\ORM\PersistentCollection {#5051 …}
+notifications: Doctrine\ORM\PersistentCollection {#5053 …}
-id: 128878
-bodyTs: "'cach':15 'disk':12 'downsid':18 'implic':4 'lifespan':9 'potenti':17 'regard':6 'use':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://kbin.social/m/linux@lemmy.ml/t/628720/-/comment/3590177"
+editedAt: null
+createdAt: DateTimeImmutable @1700103963 {#5038
date: 2023-11-16 04:06:03.0 +01:00
}
} |
|
Show voter details
|
67 |
DENIED
|
edit
|
App\Entity\EntryComment {#5036
+user: Proxies\__CG__\App\Entity\User {#5041 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4986
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
Basically the idea is that if you have a lot of data, HDDs have much bigger capacities for the price, whereas large SSDs can be expensive. SSDs have gotten cheap, but you can get used enterprise drives on eBay with huge capacities for incredibly cheap. There’s 12TB HDDs for like $100. 12TB of SSDs would run you several hundreds.\n
\n
You can slap bcache on a 512GB NVMe backed by a 8TB HDD, and you get 8TB worth of storage, 512GB of which will be cached on the NVMe and thus really fast. But from the user’s perspective, it’s just one big 8TB drive. You don’t have to think about what is where, you just use it. You don’t have to be like, I’m going to use this VM so I’ll move it to the SSD and back to the HDD when done. The first time might be super slow but subsequent use will be very fast. It also caches writes too, so you can write up to 512GB really fast in this example and it’ll slowly get flushed to the HDD in the background. But from your perspective, as soon as it’s written to the SSD, the data is effectively commited to disk. If the application calls fsync to ensure data is written to disk, it’ll complete once it’s fully written to the SSD. You get NVMe read/write speeds and the space of an HDD.\n
\n
So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 26
+score: 0
+lastActive: DateTime @1700080753 {#4984
date: 2023-11-15 21:39:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4988 …}
+nested: Doctrine\ORM\PersistentCollection {#4990 …}
+votes: Doctrine\ORM\PersistentCollection {#4992 …}
+reports: Doctrine\ORM\PersistentCollection {#4994 …}
+favourites: Doctrine\ORM\PersistentCollection {#4996 …}
+notifications: Doctrine\ORM\PersistentCollection {#4998 …}
-id: 128024
-bodyTs: "'100':52 '12tb':48,53 '512gb':67,81,175 '8tb':72,77,105 'also':165 'applic':215 'back':69,144 'background':192 'basic':1 'bcach':64 'big':104,249 'bigger':16 'cach':86,166,279 'call':216 'capac':17,42 'cheap':30,45 'commit':210 'complet':227 'data':12,207,220 'disk':212,224,250 'done':149 'drive':37,106 'ebay':39 'effect':209 'ensur':219 'enterpris':36 'exampl':180 'expens':26 'fast':93,163,177 'file':273 'first':151,264 'flush':186 'fsync':217 'fulli':231 'game':272 'get':34,76,185,237,274 'go':130 'gotten':29 'hdd':73,147,189,246 'hdds':13,49 'huge':41 'hundr':60 'idea':3 'incred':44 'larg':22 'librari':254 'like':51,127 'll':137,183,226 'load':265,288 'lot':10 'm':129 'might':153,259 'most':282 'move':138 'much':15,291 'nvme':68,89,238,278,284 'one':103,248 'perform':281 'perspect':99,196 'play':258,270 'price':20 'promot':275 'read/write':239 'realli':92,176 'run':57 'screen':289 'sever':59 'shorter':292 'slap':63 'slow':156,261 'slowli':184 'soon':198 'space':243 'speed':240,285 'ssd':142,205,235 'ssds':23,27,55 'steam':253 'storag':80 'subsequ':158 'super':155 'think':112 'thus':91 'time':152 'use':35,119,132,159 'user':97 'vm':134 'whatev':256 'wherea':21 'worth':78 'would':56 'write':167,172 'written':202,222,232"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1457701"
+editedAt: null
+createdAt: DateTimeImmutable @1700080753 {#4985
date: 2023-11-15 21:39:13.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: "What are the implications in regards to the lifespan of the disk used as cache? Any potential downsides?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700103963 {#5035
date: 2023-11-16 04:06:03.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
"@Max_P@lemmy.max-p.me"
]
+children: Doctrine\ORM\PersistentCollection {#5047 …}
+nested: Doctrine\ORM\PersistentCollection {#5043 …}
+votes: Doctrine\ORM\PersistentCollection {#5045 …}
+reports: Doctrine\ORM\PersistentCollection {#5049 …}
+favourites: Doctrine\ORM\PersistentCollection {#5051 …}
+notifications: Doctrine\ORM\PersistentCollection {#5053 …}
-id: 128878
-bodyTs: "'cach':15 'disk':12 'downsid':18 'implic':4 'lifespan':9 'potenti':17 'regard':6 'use':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://kbin.social/m/linux@lemmy.ml/t/628720/-/comment/3590177"
+editedAt: null
+createdAt: DateTimeImmutable @1700103963 {#5038
date: 2023-11-16 04:06:03.0 +01:00
}
} |
|
Show voter details
|
68 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5036
+user: Proxies\__CG__\App\Entity\User {#5041 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4986
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
Basically the idea is that if you have a lot of data, HDDs have much bigger capacities for the price, whereas large SSDs can be expensive. SSDs have gotten cheap, but you can get used enterprise drives on eBay with huge capacities for incredibly cheap. There’s 12TB HDDs for like $100. 12TB of SSDs would run you several hundreds.\n
\n
You can slap bcache on a 512GB NVMe backed by a 8TB HDD, and you get 8TB worth of storage, 512GB of which will be cached on the NVMe and thus really fast. But from the user’s perspective, it’s just one big 8TB drive. You don’t have to think about what is where, you just use it. You don’t have to be like, I’m going to use this VM so I’ll move it to the SSD and back to the HDD when done. The first time might be super slow but subsequent use will be very fast. It also caches writes too, so you can write up to 512GB really fast in this example and it’ll slowly get flushed to the HDD in the background. But from your perspective, as soon as it’s written to the SSD, the data is effectively commited to disk. If the application calls fsync to ensure data is written to disk, it’ll complete once it’s fully written to the SSD. You get NVMe read/write speeds and the space of an HDD.\n
\n
So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 26
+score: 0
+lastActive: DateTime @1700080753 {#4984
date: 2023-11-15 21:39:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4988 …}
+nested: Doctrine\ORM\PersistentCollection {#4990 …}
+votes: Doctrine\ORM\PersistentCollection {#4992 …}
+reports: Doctrine\ORM\PersistentCollection {#4994 …}
+favourites: Doctrine\ORM\PersistentCollection {#4996 …}
+notifications: Doctrine\ORM\PersistentCollection {#4998 …}
-id: 128024
-bodyTs: "'100':52 '12tb':48,53 '512gb':67,81,175 '8tb':72,77,105 'also':165 'applic':215 'back':69,144 'background':192 'basic':1 'bcach':64 'big':104,249 'bigger':16 'cach':86,166,279 'call':216 'capac':17,42 'cheap':30,45 'commit':210 'complet':227 'data':12,207,220 'disk':212,224,250 'done':149 'drive':37,106 'ebay':39 'effect':209 'ensur':219 'enterpris':36 'exampl':180 'expens':26 'fast':93,163,177 'file':273 'first':151,264 'flush':186 'fsync':217 'fulli':231 'game':272 'get':34,76,185,237,274 'go':130 'gotten':29 'hdd':73,147,189,246 'hdds':13,49 'huge':41 'hundr':60 'idea':3 'incred':44 'larg':22 'librari':254 'like':51,127 'll':137,183,226 'load':265,288 'lot':10 'm':129 'might':153,259 'most':282 'move':138 'much':15,291 'nvme':68,89,238,278,284 'one':103,248 'perform':281 'perspect':99,196 'play':258,270 'price':20 'promot':275 'read/write':239 'realli':92,176 'run':57 'screen':289 'sever':59 'shorter':292 'slap':63 'slow':156,261 'slowli':184 'soon':198 'space':243 'speed':240,285 'ssd':142,205,235 'ssds':23,27,55 'steam':253 'storag':80 'subsequ':158 'super':155 'think':112 'thus':91 'time':152 'use':35,119,132,159 'user':97 'vm':134 'whatev':256 'wherea':21 'worth':78 'would':56 'write':167,172 'written':202,222,232"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1457701"
+editedAt: null
+createdAt: DateTimeImmutable @1700080753 {#4985
date: 2023-11-15 21:39:13.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: "What are the implications in regards to the lifespan of the disk used as cache? Any potential downsides?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700103963 {#5035
date: 2023-11-16 04:06:03.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
"@Max_P@lemmy.max-p.me"
]
+children: Doctrine\ORM\PersistentCollection {#5047 …}
+nested: Doctrine\ORM\PersistentCollection {#5043 …}
+votes: Doctrine\ORM\PersistentCollection {#5045 …}
+reports: Doctrine\ORM\PersistentCollection {#5049 …}
+favourites: Doctrine\ORM\PersistentCollection {#5051 …}
+notifications: Doctrine\ORM\PersistentCollection {#5053 …}
-id: 128878
-bodyTs: "'cach':15 'disk':12 'downsid':18 'implic':4 'lifespan':9 'potenti':17 'regard':6 'use':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://kbin.social/m/linux@lemmy.ml/t/628720/-/comment/3590177"
+editedAt: null
+createdAt: DateTimeImmutable @1700103963 {#5038
date: 2023-11-16 04:06:03.0 +01:00
}
} |
|
Show voter details
|
69 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
70 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5111
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#5036
+user: Proxies\__CG__\App\Entity\User {#5041 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4986
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
Basically the idea is that if you have a lot of data, HDDs have much bigger capacities for the price, whereas large SSDs can be expensive. SSDs have gotten cheap, but you can get used enterprise drives on eBay with huge capacities for incredibly cheap. There’s 12TB HDDs for like $100. 12TB of SSDs would run you several hundreds.\n
\n
You can slap bcache on a 512GB NVMe backed by a 8TB HDD, and you get 8TB worth of storage, 512GB of which will be cached on the NVMe and thus really fast. But from the user’s perspective, it’s just one big 8TB drive. You don’t have to think about what is where, you just use it. You don’t have to be like, I’m going to use this VM so I’ll move it to the SSD and back to the HDD when done. The first time might be super slow but subsequent use will be very fast. It also caches writes too, so you can write up to 512GB really fast in this example and it’ll slowly get flushed to the HDD in the background. But from your perspective, as soon as it’s written to the SSD, the data is effectively commited to disk. If the application calls fsync to ensure data is written to disk, it’ll complete once it’s fully written to the SSD. You get NVMe read/write speeds and the space of an HDD.\n
\n
So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 26
+score: 0
+lastActive: DateTime @1700080753 {#4984
date: 2023-11-15 21:39:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4988 …}
+nested: Doctrine\ORM\PersistentCollection {#4990 …}
+votes: Doctrine\ORM\PersistentCollection {#4992 …}
+reports: Doctrine\ORM\PersistentCollection {#4994 …}
+favourites: Doctrine\ORM\PersistentCollection {#4996 …}
+notifications: Doctrine\ORM\PersistentCollection {#4998 …}
-id: 128024
-bodyTs: "'100':52 '12tb':48,53 '512gb':67,81,175 '8tb':72,77,105 'also':165 'applic':215 'back':69,144 'background':192 'basic':1 'bcach':64 'big':104,249 'bigger':16 'cach':86,166,279 'call':216 'capac':17,42 'cheap':30,45 'commit':210 'complet':227 'data':12,207,220 'disk':212,224,250 'done':149 'drive':37,106 'ebay':39 'effect':209 'ensur':219 'enterpris':36 'exampl':180 'expens':26 'fast':93,163,177 'file':273 'first':151,264 'flush':186 'fsync':217 'fulli':231 'game':272 'get':34,76,185,237,274 'go':130 'gotten':29 'hdd':73,147,189,246 'hdds':13,49 'huge':41 'hundr':60 'idea':3 'incred':44 'larg':22 'librari':254 'like':51,127 'll':137,183,226 'load':265,288 'lot':10 'm':129 'might':153,259 'most':282 'move':138 'much':15,291 'nvme':68,89,238,278,284 'one':103,248 'perform':281 'perspect':99,196 'play':258,270 'price':20 'promot':275 'read/write':239 'realli':92,176 'run':57 'screen':289 'sever':59 'shorter':292 'slap':63 'slow':156,261 'slowli':184 'soon':198 'space':243 'speed':240,285 'ssd':142,205,235 'ssds':23,27,55 'steam':253 'storag':80 'subsequ':158 'super':155 'think':112 'thus':91 'time':152 'use':35,119,132,159 'user':97 'vm':134 'whatev':256 'wherea':21 'worth':78 'would':56 'write':167,172 'written':202,222,232"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1457701"
+editedAt: null
+createdAt: DateTimeImmutable @1700080753 {#4985
date: 2023-11-15 21:39:13.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: "What are the implications in regards to the lifespan of the disk used as cache? Any potential downsides?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700103963 {#5035
date: 2023-11-16 04:06:03.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
"@Max_P@lemmy.max-p.me"
]
+children: Doctrine\ORM\PersistentCollection {#5047 …}
+nested: Doctrine\ORM\PersistentCollection {#5043 …}
+votes: Doctrine\ORM\PersistentCollection {#5045 …}
+reports: Doctrine\ORM\PersistentCollection {#5049 …}
+favourites: Doctrine\ORM\PersistentCollection {#5051 …}
+notifications: Doctrine\ORM\PersistentCollection {#5053 …}
-id: 128878
-bodyTs: "'cach':15 'disk':12 'downsid':18 'implic':4 'lifespan':9 'potenti':17 'regard':6 'use':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://kbin.social/m/linux@lemmy.ml/t/628720/-/comment/3590177"
+editedAt: null
+createdAt: DateTimeImmutable @1700103963 {#5038
date: 2023-11-16 04:06:03.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
I don’t know, it’s going to depend a lot on usage pattern and cache hit ratio. It will probably do a lot more writes than normal to the cache drive as it evicts older stuff and replaces it. Everything has tradeoffs in the end.\n
\n
Another big tradeoff depending on the cache mode (ie. writeback mode) if the SSD dies, you can lose a fair bit of data. Not as catastrophic as a RAID0 would but pretty bad. And you probably want writeback for the fast writes.\n
\n
Thus I had 2 SSDs and 2 HDDs in RAID1, with the SSDs caching the HDDs. But it turns out my SSDs are kinda crap (they’re about as fast as the HDDs for sequential read/writes) and I didn’t see as much benefit as I hoped so now they’re independent ZFS pools.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1700106468 {#5107
date: 2023-11-16 04:47:48.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
"@Max_P@lemmy.max-p.me"
"@LoafyLemon@kbin.social"
]
+children: Doctrine\ORM\PersistentCollection {#5115 …}
+nested: Doctrine\ORM\PersistentCollection {#5117 …}
+votes: Doctrine\ORM\PersistentCollection {#5113 …}
+reports: Doctrine\ORM\PersistentCollection {#5119 …}
+favourites: Doctrine\ORM\PersistentCollection {#5121 …}
+notifications: Doctrine\ORM\PersistentCollection {#5123 …}
-id: 128978
-bodyTs: "'2':92,95 'anoth':47 'bad':79 'benefit':132 'big':48 'bit':67 'cach':16,31,53,102 'catastroph':72 'crap':113 'data':69 'depend':9,50 'didn':127 'die':61 'drive':32 'end':46 'everyth':41 'evict':35 'fair':66 'fast':87,118 'go':7 'hdds':96,104,121 'hit':17 'hope':135 'ie':55 'independ':140 'kinda':112 'know':4 'lose':64 'lot':11,24 'mode':54,57 'much':131 'normal':28 'older':36 'pattern':14 'pool':142 'pretti':78 'probabl':21,82 'raid0':75 'raid1':98 'ratio':18 're':115,139 'read/writes':124 'replac':39 'see':129 'sequenti':123 'ssd':60 'ssds':93,101,110 'stuff':37 'thus':89 'tradeoff':43,49 'turn':107 'usag':13 'want':83 'would':76 'write':26,88 'writeback':56,84 'zfs':141"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1460128"
+editedAt: DateTimeImmutable @1700373718 {#5104
date: 2023-11-19 07:01:58.0 +01:00
}
+createdAt: DateTimeImmutable @1700106468 {#5108
date: 2023-11-16 04:47:48.0 +01:00
}
} |
|
Show voter details
|
71 |
DENIED
|
edit
|
App\Entity\EntryComment {#5111
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#5036
+user: Proxies\__CG__\App\Entity\User {#5041 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4986
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
Basically the idea is that if you have a lot of data, HDDs have much bigger capacities for the price, whereas large SSDs can be expensive. SSDs have gotten cheap, but you can get used enterprise drives on eBay with huge capacities for incredibly cheap. There’s 12TB HDDs for like $100. 12TB of SSDs would run you several hundreds.\n
\n
You can slap bcache on a 512GB NVMe backed by a 8TB HDD, and you get 8TB worth of storage, 512GB of which will be cached on the NVMe and thus really fast. But from the user’s perspective, it’s just one big 8TB drive. You don’t have to think about what is where, you just use it. You don’t have to be like, I’m going to use this VM so I’ll move it to the SSD and back to the HDD when done. The first time might be super slow but subsequent use will be very fast. It also caches writes too, so you can write up to 512GB really fast in this example and it’ll slowly get flushed to the HDD in the background. But from your perspective, as soon as it’s written to the SSD, the data is effectively commited to disk. If the application calls fsync to ensure data is written to disk, it’ll complete once it’s fully written to the SSD. You get NVMe read/write speeds and the space of an HDD.\n
\n
So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 26
+score: 0
+lastActive: DateTime @1700080753 {#4984
date: 2023-11-15 21:39:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4988 …}
+nested: Doctrine\ORM\PersistentCollection {#4990 …}
+votes: Doctrine\ORM\PersistentCollection {#4992 …}
+reports: Doctrine\ORM\PersistentCollection {#4994 …}
+favourites: Doctrine\ORM\PersistentCollection {#4996 …}
+notifications: Doctrine\ORM\PersistentCollection {#4998 …}
-id: 128024
-bodyTs: "'100':52 '12tb':48,53 '512gb':67,81,175 '8tb':72,77,105 'also':165 'applic':215 'back':69,144 'background':192 'basic':1 'bcach':64 'big':104,249 'bigger':16 'cach':86,166,279 'call':216 'capac':17,42 'cheap':30,45 'commit':210 'complet':227 'data':12,207,220 'disk':212,224,250 'done':149 'drive':37,106 'ebay':39 'effect':209 'ensur':219 'enterpris':36 'exampl':180 'expens':26 'fast':93,163,177 'file':273 'first':151,264 'flush':186 'fsync':217 'fulli':231 'game':272 'get':34,76,185,237,274 'go':130 'gotten':29 'hdd':73,147,189,246 'hdds':13,49 'huge':41 'hundr':60 'idea':3 'incred':44 'larg':22 'librari':254 'like':51,127 'll':137,183,226 'load':265,288 'lot':10 'm':129 'might':153,259 'most':282 'move':138 'much':15,291 'nvme':68,89,238,278,284 'one':103,248 'perform':281 'perspect':99,196 'play':258,270 'price':20 'promot':275 'read/write':239 'realli':92,176 'run':57 'screen':289 'sever':59 'shorter':292 'slap':63 'slow':156,261 'slowli':184 'soon':198 'space':243 'speed':240,285 'ssd':142,205,235 'ssds':23,27,55 'steam':253 'storag':80 'subsequ':158 'super':155 'think':112 'thus':91 'time':152 'use':35,119,132,159 'user':97 'vm':134 'whatev':256 'wherea':21 'worth':78 'would':56 'write':167,172 'written':202,222,232"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1457701"
+editedAt: null
+createdAt: DateTimeImmutable @1700080753 {#4985
date: 2023-11-15 21:39:13.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: "What are the implications in regards to the lifespan of the disk used as cache? Any potential downsides?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700103963 {#5035
date: 2023-11-16 04:06:03.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
"@Max_P@lemmy.max-p.me"
]
+children: Doctrine\ORM\PersistentCollection {#5047 …}
+nested: Doctrine\ORM\PersistentCollection {#5043 …}
+votes: Doctrine\ORM\PersistentCollection {#5045 …}
+reports: Doctrine\ORM\PersistentCollection {#5049 …}
+favourites: Doctrine\ORM\PersistentCollection {#5051 …}
+notifications: Doctrine\ORM\PersistentCollection {#5053 …}
-id: 128878
-bodyTs: "'cach':15 'disk':12 'downsid':18 'implic':4 'lifespan':9 'potenti':17 'regard':6 'use':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://kbin.social/m/linux@lemmy.ml/t/628720/-/comment/3590177"
+editedAt: null
+createdAt: DateTimeImmutable @1700103963 {#5038
date: 2023-11-16 04:06:03.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
I don’t know, it’s going to depend a lot on usage pattern and cache hit ratio. It will probably do a lot more writes than normal to the cache drive as it evicts older stuff and replaces it. Everything has tradeoffs in the end.\n
\n
Another big tradeoff depending on the cache mode (ie. writeback mode) if the SSD dies, you can lose a fair bit of data. Not as catastrophic as a RAID0 would but pretty bad. And you probably want writeback for the fast writes.\n
\n
Thus I had 2 SSDs and 2 HDDs in RAID1, with the SSDs caching the HDDs. But it turns out my SSDs are kinda crap (they’re about as fast as the HDDs for sequential read/writes) and I didn’t see as much benefit as I hoped so now they’re independent ZFS pools.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1700106468 {#5107
date: 2023-11-16 04:47:48.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
"@Max_P@lemmy.max-p.me"
"@LoafyLemon@kbin.social"
]
+children: Doctrine\ORM\PersistentCollection {#5115 …}
+nested: Doctrine\ORM\PersistentCollection {#5117 …}
+votes: Doctrine\ORM\PersistentCollection {#5113 …}
+reports: Doctrine\ORM\PersistentCollection {#5119 …}
+favourites: Doctrine\ORM\PersistentCollection {#5121 …}
+notifications: Doctrine\ORM\PersistentCollection {#5123 …}
-id: 128978
-bodyTs: "'2':92,95 'anoth':47 'bad':79 'benefit':132 'big':48 'bit':67 'cach':16,31,53,102 'catastroph':72 'crap':113 'data':69 'depend':9,50 'didn':127 'die':61 'drive':32 'end':46 'everyth':41 'evict':35 'fair':66 'fast':87,118 'go':7 'hdds':96,104,121 'hit':17 'hope':135 'ie':55 'independ':140 'kinda':112 'know':4 'lose':64 'lot':11,24 'mode':54,57 'much':131 'normal':28 'older':36 'pattern':14 'pool':142 'pretti':78 'probabl':21,82 'raid0':75 'raid1':98 'ratio':18 're':115,139 'read/writes':124 'replac':39 'see':129 'sequenti':123 'ssd':60 'ssds':93,101,110 'stuff':37 'thus':89 'tradeoff':43,49 'turn':107 'usag':13 'want':83 'would':76 'write':26,88 'writeback':56,84 'zfs':141"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1460128"
+editedAt: DateTimeImmutable @1700373718 {#5104
date: 2023-11-19 07:01:58.0 +01:00
}
+createdAt: DateTimeImmutable @1700106468 {#5108
date: 2023-11-16 04:47:48.0 +01:00
}
} |
|
Show voter details
|
72 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5111
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#5036
+user: Proxies\__CG__\App\Entity\User {#5041 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4986
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
Basically the idea is that if you have a lot of data, HDDs have much bigger capacities for the price, whereas large SSDs can be expensive. SSDs have gotten cheap, but you can get used enterprise drives on eBay with huge capacities for incredibly cheap. There’s 12TB HDDs for like $100. 12TB of SSDs would run you several hundreds.\n
\n
You can slap bcache on a 512GB NVMe backed by a 8TB HDD, and you get 8TB worth of storage, 512GB of which will be cached on the NVMe and thus really fast. But from the user’s perspective, it’s just one big 8TB drive. You don’t have to think about what is where, you just use it. You don’t have to be like, I’m going to use this VM so I’ll move it to the SSD and back to the HDD when done. The first time might be super slow but subsequent use will be very fast. It also caches writes too, so you can write up to 512GB really fast in this example and it’ll slowly get flushed to the HDD in the background. But from your perspective, as soon as it’s written to the SSD, the data is effectively commited to disk. If the application calls fsync to ensure data is written to disk, it’ll complete once it’s fully written to the SSD. You get NVMe read/write speeds and the space of an HDD.\n
\n
So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 26
+score: 0
+lastActive: DateTime @1700080753 {#4984
date: 2023-11-15 21:39:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4988 …}
+nested: Doctrine\ORM\PersistentCollection {#4990 …}
+votes: Doctrine\ORM\PersistentCollection {#4992 …}
+reports: Doctrine\ORM\PersistentCollection {#4994 …}
+favourites: Doctrine\ORM\PersistentCollection {#4996 …}
+notifications: Doctrine\ORM\PersistentCollection {#4998 …}
-id: 128024
-bodyTs: "'100':52 '12tb':48,53 '512gb':67,81,175 '8tb':72,77,105 'also':165 'applic':215 'back':69,144 'background':192 'basic':1 'bcach':64 'big':104,249 'bigger':16 'cach':86,166,279 'call':216 'capac':17,42 'cheap':30,45 'commit':210 'complet':227 'data':12,207,220 'disk':212,224,250 'done':149 'drive':37,106 'ebay':39 'effect':209 'ensur':219 'enterpris':36 'exampl':180 'expens':26 'fast':93,163,177 'file':273 'first':151,264 'flush':186 'fsync':217 'fulli':231 'game':272 'get':34,76,185,237,274 'go':130 'gotten':29 'hdd':73,147,189,246 'hdds':13,49 'huge':41 'hundr':60 'idea':3 'incred':44 'larg':22 'librari':254 'like':51,127 'll':137,183,226 'load':265,288 'lot':10 'm':129 'might':153,259 'most':282 'move':138 'much':15,291 'nvme':68,89,238,278,284 'one':103,248 'perform':281 'perspect':99,196 'play':258,270 'price':20 'promot':275 'read/write':239 'realli':92,176 'run':57 'screen':289 'sever':59 'shorter':292 'slap':63 'slow':156,261 'slowli':184 'soon':198 'space':243 'speed':240,285 'ssd':142,205,235 'ssds':23,27,55 'steam':253 'storag':80 'subsequ':158 'super':155 'think':112 'thus':91 'time':152 'use':35,119,132,159 'user':97 'vm':134 'whatev':256 'wherea':21 'worth':78 'would':56 'write':167,172 'written':202,222,232"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1457701"
+editedAt: null
+createdAt: DateTimeImmutable @1700080753 {#4985
date: 2023-11-15 21:39:13.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: "What are the implications in regards to the lifespan of the disk used as cache? Any potential downsides?"
+lang: "en"
+isAdult: false
+favouriteCount: 0
+score: 0
+lastActive: DateTime @1700103963 {#5035
date: 2023-11-16 04:06:03.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
"@Max_P@lemmy.max-p.me"
]
+children: Doctrine\ORM\PersistentCollection {#5047 …}
+nested: Doctrine\ORM\PersistentCollection {#5043 …}
+votes: Doctrine\ORM\PersistentCollection {#5045 …}
+reports: Doctrine\ORM\PersistentCollection {#5049 …}
+favourites: Doctrine\ORM\PersistentCollection {#5051 …}
+notifications: Doctrine\ORM\PersistentCollection {#5053 …}
-id: 128878
-bodyTs: "'cach':15 'disk':12 'downsid':18 'implic':4 'lifespan':9 'potenti':17 'regard':6 'use':13"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://kbin.social/m/linux@lemmy.ml/t/628720/-/comment/3590177"
+editedAt: null
+createdAt: DateTimeImmutable @1700103963 {#5038
date: 2023-11-16 04:06:03.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
I don’t know, it’s going to depend a lot on usage pattern and cache hit ratio. It will probably do a lot more writes than normal to the cache drive as it evicts older stuff and replaces it. Everything has tradeoffs in the end.\n
\n
Another big tradeoff depending on the cache mode (ie. writeback mode) if the SSD dies, you can lose a fair bit of data. Not as catastrophic as a RAID0 would but pretty bad. And you probably want writeback for the fast writes.\n
\n
Thus I had 2 SSDs and 2 HDDs in RAID1, with the SSDs caching the HDDs. But it turns out my SSDs are kinda crap (they’re about as fast as the HDDs for sequential read/writes) and I didn’t see as much benefit as I hoped so now they’re independent ZFS pools.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 3
+score: 0
+lastActive: DateTime @1700106468 {#5107
date: 2023-11-16 04:47:48.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
"@Max_P@lemmy.max-p.me"
"@LoafyLemon@kbin.social"
]
+children: Doctrine\ORM\PersistentCollection {#5115 …}
+nested: Doctrine\ORM\PersistentCollection {#5117 …}
+votes: Doctrine\ORM\PersistentCollection {#5113 …}
+reports: Doctrine\ORM\PersistentCollection {#5119 …}
+favourites: Doctrine\ORM\PersistentCollection {#5121 …}
+notifications: Doctrine\ORM\PersistentCollection {#5123 …}
-id: 128978
-bodyTs: "'2':92,95 'anoth':47 'bad':79 'benefit':132 'big':48 'bit':67 'cach':16,31,53,102 'catastroph':72 'crap':113 'data':69 'depend':9,50 'didn':127 'die':61 'drive':32 'end':46 'everyth':41 'evict':35 'fair':66 'fast':87,118 'go':7 'hdds':96,104,121 'hit':17 'hope':135 'ie':55 'independ':140 'kinda':112 'know':4 'lose':64 'lot':11,24 'mode':54,57 'much':131 'normal':28 'older':36 'pattern':14 'pool':142 'pretti':78 'probabl':21,82 'raid0':75 'raid1':98 'ratio':18 're':115,139 'read/writes':124 'replac':39 'see':129 'sequenti':123 'ssd':60 'ssds':93,101,110 'stuff':37 'thus':89 'tradeoff':43,49 'turn':107 'usag':13 'want':83 'would':76 'write':26,88 'writeback':56,84 'zfs':141"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1460128"
+editedAt: DateTimeImmutable @1700373718 {#5104
date: 2023-11-19 07:01:58.0 +01:00
}
+createdAt: DateTimeImmutable @1700106468 {#5108
date: 2023-11-16 04:47:48.0 +01:00
}
} |
|
Show voter details
|
73 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
74 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5057
+user: Proxies\__CG__\App\Entity\User {#5058 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4986
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
Basically the idea is that if you have a lot of data, HDDs have much bigger capacities for the price, whereas large SSDs can be expensive. SSDs have gotten cheap, but you can get used enterprise drives on eBay with huge capacities for incredibly cheap. There’s 12TB HDDs for like $100. 12TB of SSDs would run you several hundreds.\n
\n
You can slap bcache on a 512GB NVMe backed by a 8TB HDD, and you get 8TB worth of storage, 512GB of which will be cached on the NVMe and thus really fast. But from the user’s perspective, it’s just one big 8TB drive. You don’t have to think about what is where, you just use it. You don’t have to be like, I’m going to use this VM so I’ll move it to the SSD and back to the HDD when done. The first time might be super slow but subsequent use will be very fast. It also caches writes too, so you can write up to 512GB really fast in this example and it’ll slowly get flushed to the HDD in the background. But from your perspective, as soon as it’s written to the SSD, the data is effectively commited to disk. If the application calls fsync to ensure data is written to disk, it’ll complete once it’s fully written to the SSD. You get NVMe read/write speeds and the space of an HDD.\n
\n
So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 26
+score: 0
+lastActive: DateTime @1700080753 {#4984
date: 2023-11-15 21:39:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4988 …}
+nested: Doctrine\ORM\PersistentCollection {#4990 …}
+votes: Doctrine\ORM\PersistentCollection {#4992 …}
+reports: Doctrine\ORM\PersistentCollection {#4994 …}
+favourites: Doctrine\ORM\PersistentCollection {#4996 …}
+notifications: Doctrine\ORM\PersistentCollection {#4998 …}
-id: 128024
-bodyTs: "'100':52 '12tb':48,53 '512gb':67,81,175 '8tb':72,77,105 'also':165 'applic':215 'back':69,144 'background':192 'basic':1 'bcach':64 'big':104,249 'bigger':16 'cach':86,166,279 'call':216 'capac':17,42 'cheap':30,45 'commit':210 'complet':227 'data':12,207,220 'disk':212,224,250 'done':149 'drive':37,106 'ebay':39 'effect':209 'ensur':219 'enterpris':36 'exampl':180 'expens':26 'fast':93,163,177 'file':273 'first':151,264 'flush':186 'fsync':217 'fulli':231 'game':272 'get':34,76,185,237,274 'go':130 'gotten':29 'hdd':73,147,189,246 'hdds':13,49 'huge':41 'hundr':60 'idea':3 'incred':44 'larg':22 'librari':254 'like':51,127 'll':137,183,226 'load':265,288 'lot':10 'm':129 'might':153,259 'most':282 'move':138 'much':15,291 'nvme':68,89,238,278,284 'one':103,248 'perform':281 'perspect':99,196 'play':258,270 'price':20 'promot':275 'read/write':239 'realli':92,176 'run':57 'screen':289 'sever':59 'shorter':292 'slap':63 'slow':156,261 'slowli':184 'soon':198 'space':243 'speed':240,285 'ssd':142,205,235 'ssds':23,27,55 'steam':253 'storag':80 'subsequ':158 'super':155 'think':112 'thus':91 'time':152 'use':35,119,132,159 'user':97 'vm':134 'whatev':256 'wherea':21 'worth':78 'would':56 'write':167,172 'written':202,222,232"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1457701"
+editedAt: null
+createdAt: DateTimeImmutable @1700080753 {#4985
date: 2023-11-15 21:39:13.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
> So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.\n
\n
I really love/hate how you can immediately understand the practical application of new technologies through the use of games.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 13
+score: 0
+lastActive: DateTime @1700094922 {#5055
date: 2023-11-16 01:35:22.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
"@Max_P@lemmy.max-p.me"
]
+children: Doctrine\ORM\PersistentCollection {#5059 …}
+nested: Doctrine\ORM\PersistentCollection {#5061 …}
+votes: Doctrine\ORM\PersistentCollection {#5063 …}
+reports: Doctrine\ORM\PersistentCollection {#5065 …}
+favourites: Doctrine\ORM\PersistentCollection {#5067 …}
+notifications: Doctrine\ORM\PersistentCollection {#5069 …}
-id: 128554
-bodyTs: "'applic':57 'big':3 'cach':33 'disk':4 'file':27 'first':18 'game':26,65 'get':28 'immedi':53 'librari':8 'load':19,42 'love/hate':49 'might':13 'most':36 'much':45 'new':59 'nvme':32,38 'one':2 'perform':35 'play':12,24 'practic':56 'promot':29 'realli':48 'screen':43 'shorter':46 'slow':15 'speed':39 'steam':7 'technolog':60 'understand':54 'use':63 'whatev':10"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.eco.br/comment/3605491"
+editedAt: null
+createdAt: DateTimeImmutable @1700094922 {#5056
date: 2023-11-16 01:35:22.0 +01:00
}
} |
|
Show voter details
|
75 |
DENIED
|
edit
|
App\Entity\EntryComment {#5057
+user: Proxies\__CG__\App\Entity\User {#5058 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4986
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
Basically the idea is that if you have a lot of data, HDDs have much bigger capacities for the price, whereas large SSDs can be expensive. SSDs have gotten cheap, but you can get used enterprise drives on eBay with huge capacities for incredibly cheap. There’s 12TB HDDs for like $100. 12TB of SSDs would run you several hundreds.\n
\n
You can slap bcache on a 512GB NVMe backed by a 8TB HDD, and you get 8TB worth of storage, 512GB of which will be cached on the NVMe and thus really fast. But from the user’s perspective, it’s just one big 8TB drive. You don’t have to think about what is where, you just use it. You don’t have to be like, I’m going to use this VM so I’ll move it to the SSD and back to the HDD when done. The first time might be super slow but subsequent use will be very fast. It also caches writes too, so you can write up to 512GB really fast in this example and it’ll slowly get flushed to the HDD in the background. But from your perspective, as soon as it’s written to the SSD, the data is effectively commited to disk. If the application calls fsync to ensure data is written to disk, it’ll complete once it’s fully written to the SSD. You get NVMe read/write speeds and the space of an HDD.\n
\n
So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 26
+score: 0
+lastActive: DateTime @1700080753 {#4984
date: 2023-11-15 21:39:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4988 …}
+nested: Doctrine\ORM\PersistentCollection {#4990 …}
+votes: Doctrine\ORM\PersistentCollection {#4992 …}
+reports: Doctrine\ORM\PersistentCollection {#4994 …}
+favourites: Doctrine\ORM\PersistentCollection {#4996 …}
+notifications: Doctrine\ORM\PersistentCollection {#4998 …}
-id: 128024
-bodyTs: "'100':52 '12tb':48,53 '512gb':67,81,175 '8tb':72,77,105 'also':165 'applic':215 'back':69,144 'background':192 'basic':1 'bcach':64 'big':104,249 'bigger':16 'cach':86,166,279 'call':216 'capac':17,42 'cheap':30,45 'commit':210 'complet':227 'data':12,207,220 'disk':212,224,250 'done':149 'drive':37,106 'ebay':39 'effect':209 'ensur':219 'enterpris':36 'exampl':180 'expens':26 'fast':93,163,177 'file':273 'first':151,264 'flush':186 'fsync':217 'fulli':231 'game':272 'get':34,76,185,237,274 'go':130 'gotten':29 'hdd':73,147,189,246 'hdds':13,49 'huge':41 'hundr':60 'idea':3 'incred':44 'larg':22 'librari':254 'like':51,127 'll':137,183,226 'load':265,288 'lot':10 'm':129 'might':153,259 'most':282 'move':138 'much':15,291 'nvme':68,89,238,278,284 'one':103,248 'perform':281 'perspect':99,196 'play':258,270 'price':20 'promot':275 'read/write':239 'realli':92,176 'run':57 'screen':289 'sever':59 'shorter':292 'slap':63 'slow':156,261 'slowli':184 'soon':198 'space':243 'speed':240,285 'ssd':142,205,235 'ssds':23,27,55 'steam':253 'storag':80 'subsequ':158 'super':155 'think':112 'thus':91 'time':152 'use':35,119,132,159 'user':97 'vm':134 'whatev':256 'wherea':21 'worth':78 'would':56 'write':167,172 'written':202,222,232"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1457701"
+editedAt: null
+createdAt: DateTimeImmutable @1700080753 {#4985
date: 2023-11-15 21:39:13.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
> So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.\n
\n
I really love/hate how you can immediately understand the practical application of new technologies through the use of games.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 13
+score: 0
+lastActive: DateTime @1700094922 {#5055
date: 2023-11-16 01:35:22.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
"@Max_P@lemmy.max-p.me"
]
+children: Doctrine\ORM\PersistentCollection {#5059 …}
+nested: Doctrine\ORM\PersistentCollection {#5061 …}
+votes: Doctrine\ORM\PersistentCollection {#5063 …}
+reports: Doctrine\ORM\PersistentCollection {#5065 …}
+favourites: Doctrine\ORM\PersistentCollection {#5067 …}
+notifications: Doctrine\ORM\PersistentCollection {#5069 …}
-id: 128554
-bodyTs: "'applic':57 'big':3 'cach':33 'disk':4 'file':27 'first':18 'game':26,65 'get':28 'immedi':53 'librari':8 'load':19,42 'love/hate':49 'might':13 'most':36 'much':45 'new':59 'nvme':32,38 'one':2 'perform':35 'play':12,24 'practic':56 'promot':29 'realli':48 'screen':43 'shorter':46 'slow':15 'speed':39 'steam':7 'technolog':60 'understand':54 'use':63 'whatev':10"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.eco.br/comment/3605491"
+editedAt: null
+createdAt: DateTimeImmutable @1700094922 {#5056
date: 2023-11-16 01:35:22.0 +01:00
}
} |
|
Show voter details
|
76 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5057
+user: Proxies\__CG__\App\Entity\User {#5058 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4986
+user: Proxies\__CG__\App\Entity\User {#4987 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4608
+user: App\Entity\User {#4621 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "I can’t quite figure out what would be the use cases where bcache would excel, except for hdds without cache or systems with very limited ram. Can you help me out with that?"
+lang: "en"
+isAdult: false
+favouriteCount: 11
+score: 0
+lastActive: DateTime @1700393791 {#4603
date: 2023-11-19 12:36:31.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4609 …}
+nested: Doctrine\ORM\PersistentCollection {#4611 …}
+votes: Doctrine\ORM\PersistentCollection {#4613 …}
+reports: Doctrine\ORM\PersistentCollection {#4615 …}
+favourites: Doctrine\ORM\PersistentCollection {#4617 …}
+notifications: Doctrine\ORM\PersistentCollection {#4619 …}
-id: 127974
-bodyTs: "'bcach':14 'cach':21 'case':12 'excel':16 'except':17 'figur':5 'hdds':19 'help':30 'limit':26 'quit':4 'ram':27 'system':23 'use':11 'without':20 'would':8,15"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://feddit.de/comment/4847042"
+editedAt: null
+createdAt: DateTimeImmutable @1700079907 {#4604
date: 2023-11-15 21:25:07.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
Basically the idea is that if you have a lot of data, HDDs have much bigger capacities for the price, whereas large SSDs can be expensive. SSDs have gotten cheap, but you can get used enterprise drives on eBay with huge capacities for incredibly cheap. There’s 12TB HDDs for like $100. 12TB of SSDs would run you several hundreds.\n
\n
You can slap bcache on a 512GB NVMe backed by a 8TB HDD, and you get 8TB worth of storage, 512GB of which will be cached on the NVMe and thus really fast. But from the user’s perspective, it’s just one big 8TB drive. You don’t have to think about what is where, you just use it. You don’t have to be like, I’m going to use this VM so I’ll move it to the SSD and back to the HDD when done. The first time might be super slow but subsequent use will be very fast. It also caches writes too, so you can write up to 512GB really fast in this example and it’ll slowly get flushed to the HDD in the background. But from your perspective, as soon as it’s written to the SSD, the data is effectively commited to disk. If the application calls fsync to ensure data is written to disk, it’ll complete once it’s fully written to the SSD. You get NVMe read/write speeds and the space of an HDD.\n
\n
So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 26
+score: 0
+lastActive: DateTime @1700080753 {#4984
date: 2023-11-15 21:39:13.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
]
+children: Doctrine\ORM\PersistentCollection {#4988 …}
+nested: Doctrine\ORM\PersistentCollection {#4990 …}
+votes: Doctrine\ORM\PersistentCollection {#4992 …}
+reports: Doctrine\ORM\PersistentCollection {#4994 …}
+favourites: Doctrine\ORM\PersistentCollection {#4996 …}
+notifications: Doctrine\ORM\PersistentCollection {#4998 …}
-id: 128024
-bodyTs: "'100':52 '12tb':48,53 '512gb':67,81,175 '8tb':72,77,105 'also':165 'applic':215 'back':69,144 'background':192 'basic':1 'bcach':64 'big':104,249 'bigger':16 'cach':86,166,279 'call':216 'capac':17,42 'cheap':30,45 'commit':210 'complet':227 'data':12,207,220 'disk':212,224,250 'done':149 'drive':37,106 'ebay':39 'effect':209 'ensur':219 'enterpris':36 'exampl':180 'expens':26 'fast':93,163,177 'file':273 'first':151,264 'flush':186 'fsync':217 'fulli':231 'game':272 'get':34,76,185,237,274 'go':130 'gotten':29 'hdd':73,147,189,246 'hdds':13,49 'huge':41 'hundr':60 'idea':3 'incred':44 'larg':22 'librari':254 'like':51,127 'll':137,183,226 'load':265,288 'lot':10 'm':129 'might':153,259 'most':282 'move':138 'much':15,291 'nvme':68,89,238,278,284 'one':103,248 'perform':281 'perspect':99,196 'play':258,270 'price':20 'promot':275 'read/write':239 'realli':92,176 'run':57 'screen':289 'sever':59 'shorter':292 'slap':63 'slow':156,261 'slowli':184 'soon':198 'space':243 'speed':240,285 'ssd':142,205,235 'ssds':23,27,55 'steam':253 'storag':80 'subsequ':158 'super':155 'think':112 'thus':91 'time':152 'use':35,119,132,159 'user':97 'vm':134 'whatev':256 'wherea':21 'worth':78 'would':56 'write':167,172 'written':202,222,232"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.max-p.me/comment/1457701"
+editedAt: null
+createdAt: DateTimeImmutable @1700080753 {#4985
date: 2023-11-15 21:39:13.0 +01:00
}
}
+root: App\Entity\EntryComment {#4608}
+body: """
> So one big disk for your Steam library and whatever you play might be slow on the first load but then as you play the game files gets promoted to the NVMe cache and perform mostly at NVMe speeds, and your loading screens are much shorter.\n
\n
I really love/hate how you can immediately understand the practical application of new technologies through the use of games.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 13
+score: 0
+lastActive: DateTime @1700094922 {#5055
date: 2023-11-16 01:35:22.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@FuzzChef@feddit.de"
"@Max_P@lemmy.max-p.me"
]
+children: Doctrine\ORM\PersistentCollection {#5059 …}
+nested: Doctrine\ORM\PersistentCollection {#5061 …}
+votes: Doctrine\ORM\PersistentCollection {#5063 …}
+reports: Doctrine\ORM\PersistentCollection {#5065 …}
+favourites: Doctrine\ORM\PersistentCollection {#5067 …}
+notifications: Doctrine\ORM\PersistentCollection {#5069 …}
-id: 128554
-bodyTs: "'applic':57 'big':3 'cach':33 'disk':4 'file':27 'first':18 'game':26,65 'get':28 'immedi':53 'librari':8 'load':19,42 'love/hate':49 'might':13 'most':36 'much':45 'new':59 'nvme':32,38 'one':2 'perform':35 'play':12,24 'practic':56 'promot':29 'realli':48 'screen':43 'shorter':46 'slow':15 'speed':39 'steam':7 'technolog':60 'understand':54 'use':63 'whatev':10"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.eco.br/comment/3605491"
+editedAt: null
+createdAt: DateTimeImmutable @1700094922 {#5056
date: 2023-11-16 01:35:22.0 +01:00
}
} |
|
Show voter details
|
77 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
78 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4681
+user: App\Entity\User {#4694 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Then wait for bcachefs to land in 6.7"
+lang: "en"
+isAdult: false
+favouriteCount: 10
+score: 0
+lastActive: DateTime @1700397582 {#4676
date: 2023-11-19 13:39:42.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4682 …}
+nested: Doctrine\ORM\PersistentCollection {#4684 …}
+votes: Doctrine\ORM\PersistentCollection {#4686 …}
+reports: Doctrine\ORM\PersistentCollection {#4688 …}
+favourites: Doctrine\ORM\PersistentCollection {#4690 …}
+notifications: Doctrine\ORM\PersistentCollection {#4692 …}
-id: 128096
-bodyTs: "'6.7':8 'bcachef':4 'land':6 'wait':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5340224"
+editedAt: null
+createdAt: DateTimeImmutable @1700082511 {#4677
date: 2023-11-15 22:08:31.0 +01:00
}
} |
|
Show voter details
|
79 |
DENIED
|
edit
|
App\Entity\EntryComment {#4681
+user: App\Entity\User {#4694 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Then wait for bcachefs to land in 6.7"
+lang: "en"
+isAdult: false
+favouriteCount: 10
+score: 0
+lastActive: DateTime @1700397582 {#4676
date: 2023-11-19 13:39:42.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4682 …}
+nested: Doctrine\ORM\PersistentCollection {#4684 …}
+votes: Doctrine\ORM\PersistentCollection {#4686 …}
+reports: Doctrine\ORM\PersistentCollection {#4688 …}
+favourites: Doctrine\ORM\PersistentCollection {#4690 …}
+notifications: Doctrine\ORM\PersistentCollection {#4692 …}
-id: 128096
-bodyTs: "'6.7':8 'bcachef':4 'land':6 'wait':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5340224"
+editedAt: null
+createdAt: DateTimeImmutable @1700082511 {#4677
date: 2023-11-15 22:08:31.0 +01:00
}
} |
|
Show voter details
|
80 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4681
+user: App\Entity\User {#4694 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Then wait for bcachefs to land in 6.7"
+lang: "en"
+isAdult: false
+favouriteCount: 10
+score: 0
+lastActive: DateTime @1700397582 {#4676
date: 2023-11-19 13:39:42.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4682 …}
+nested: Doctrine\ORM\PersistentCollection {#4684 …}
+votes: Doctrine\ORM\PersistentCollection {#4686 …}
+reports: Doctrine\ORM\PersistentCollection {#4688 …}
+favourites: Doctrine\ORM\PersistentCollection {#4690 …}
+notifications: Doctrine\ORM\PersistentCollection {#4692 …}
-id: 128096
-bodyTs: "'6.7':8 'bcachef':4 'land':6 'wait':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5340224"
+editedAt: null
+createdAt: DateTimeImmutable @1700082511 {#4677
date: 2023-11-15 22:08:31.0 +01:00
}
} |
|
Show voter details
|
81 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
82 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5002
+user: Proxies\__CG__\App\Entity\User {#5003 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4681
+user: App\Entity\User {#4694 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Then wait for bcachefs to land in 6.7"
+lang: "en"
+isAdult: false
+favouriteCount: 10
+score: 0
+lastActive: DateTime @1700397582 {#4676
date: 2023-11-19 13:39:42.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4682 …}
+nested: Doctrine\ORM\PersistentCollection {#4684 …}
+votes: Doctrine\ORM\PersistentCollection {#4686 …}
+reports: Doctrine\ORM\PersistentCollection {#4688 …}
+favourites: Doctrine\ORM\PersistentCollection {#4690 …}
+notifications: Doctrine\ORM\PersistentCollection {#4692 …}
-id: 128096
-bodyTs: "'6.7':8 'bcachef':4 'land':6 'wait':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5340224"
+editedAt: null
+createdAt: DateTimeImmutable @1700082511 {#4677
date: 2023-11-15 22:08:31.0 +01:00
}
}
+root: App\Entity\EntryComment {#4681}
+body: "BcacheFS is a very different animal from Bcache; it does not provide block device caching. See [bcachefs.org/FAQ/](https://bcachefs.org/FAQ/)"
+lang: "en"
+isAdult: false
+favouriteCount: 8
+score: 0
+lastActive: DateTime @1700131406 {#5000
date: 2023-11-16 11:43:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@PropaGandalf@lemmy.world"
]
+children: Doctrine\ORM\PersistentCollection {#5004 …}
+nested: Doctrine\ORM\PersistentCollection {#5006 …}
+votes: Doctrine\ORM\PersistentCollection {#5008 …}
+reports: Doctrine\ORM\PersistentCollection {#5010 …}
+favourites: Doctrine\ORM\PersistentCollection {#5012 …}
+notifications: Doctrine\ORM\PersistentCollection {#5014 …}
-id: 129749
-bodyTs: "'/faq/](https://bcachefs.org/faq/)':19 'anim':6 'bcach':8 'bcachef':1 'bcachefs.org':18 'bcachefs.org/faq/](https://bcachefs.org/faq/)':17 'block':13 'cach':15 'devic':14 'differ':5 'provid':12 'see':16"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.sdf.org/comment/5504676"
+editedAt: null
+createdAt: DateTimeImmutable @1700131406 {#5001
date: 2023-11-16 11:43:26.0 +01:00
}
} |
|
Show voter details
|
83 |
DENIED
|
edit
|
App\Entity\EntryComment {#5002
+user: Proxies\__CG__\App\Entity\User {#5003 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4681
+user: App\Entity\User {#4694 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Then wait for bcachefs to land in 6.7"
+lang: "en"
+isAdult: false
+favouriteCount: 10
+score: 0
+lastActive: DateTime @1700397582 {#4676
date: 2023-11-19 13:39:42.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4682 …}
+nested: Doctrine\ORM\PersistentCollection {#4684 …}
+votes: Doctrine\ORM\PersistentCollection {#4686 …}
+reports: Doctrine\ORM\PersistentCollection {#4688 …}
+favourites: Doctrine\ORM\PersistentCollection {#4690 …}
+notifications: Doctrine\ORM\PersistentCollection {#4692 …}
-id: 128096
-bodyTs: "'6.7':8 'bcachef':4 'land':6 'wait':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5340224"
+editedAt: null
+createdAt: DateTimeImmutable @1700082511 {#4677
date: 2023-11-15 22:08:31.0 +01:00
}
}
+root: App\Entity\EntryComment {#4681}
+body: "BcacheFS is a very different animal from Bcache; it does not provide block device caching. See [bcachefs.org/FAQ/](https://bcachefs.org/FAQ/)"
+lang: "en"
+isAdult: false
+favouriteCount: 8
+score: 0
+lastActive: DateTime @1700131406 {#5000
date: 2023-11-16 11:43:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@PropaGandalf@lemmy.world"
]
+children: Doctrine\ORM\PersistentCollection {#5004 …}
+nested: Doctrine\ORM\PersistentCollection {#5006 …}
+votes: Doctrine\ORM\PersistentCollection {#5008 …}
+reports: Doctrine\ORM\PersistentCollection {#5010 …}
+favourites: Doctrine\ORM\PersistentCollection {#5012 …}
+notifications: Doctrine\ORM\PersistentCollection {#5014 …}
-id: 129749
-bodyTs: "'/faq/](https://bcachefs.org/faq/)':19 'anim':6 'bcach':8 'bcachef':1 'bcachefs.org':18 'bcachefs.org/faq/](https://bcachefs.org/faq/)':17 'block':13 'cach':15 'devic':14 'differ':5 'provid':12 'see':16"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.sdf.org/comment/5504676"
+editedAt: null
+createdAt: DateTimeImmutable @1700131406 {#5001
date: 2023-11-16 11:43:26.0 +01:00
}
} |
|
Show voter details
|
84 |
DENIED
|
moderate
|
App\Entity\EntryComment {#5002
+user: Proxies\__CG__\App\Entity\User {#5003 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: App\Entity\EntryComment {#4681
+user: App\Entity\User {#4694 …}
+entry: App\Entity\Entry {#2400}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "Then wait for bcachefs to land in 6.7"
+lang: "en"
+isAdult: false
+favouriteCount: 10
+score: 0
+lastActive: DateTime @1700397582 {#4676
date: 2023-11-19 13:39:42.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4682 …}
+nested: Doctrine\ORM\PersistentCollection {#4684 …}
+votes: Doctrine\ORM\PersistentCollection {#4686 …}
+reports: Doctrine\ORM\PersistentCollection {#4688 …}
+favourites: Doctrine\ORM\PersistentCollection {#4690 …}
+notifications: Doctrine\ORM\PersistentCollection {#4692 …}
-id: 128096
-bodyTs: "'6.7':8 'bcachef':4 'land':6 'wait':2"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.world/comment/5340224"
+editedAt: null
+createdAt: DateTimeImmutable @1700082511 {#4677
date: 2023-11-15 22:08:31.0 +01:00
}
}
+root: App\Entity\EntryComment {#4681}
+body: "BcacheFS is a very different animal from Bcache; it does not provide block device caching. See [bcachefs.org/FAQ/](https://bcachefs.org/FAQ/)"
+lang: "en"
+isAdult: false
+favouriteCount: 8
+score: 0
+lastActive: DateTime @1700131406 {#5000
date: 2023-11-16 11:43:26.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
"@PropaGandalf@lemmy.world"
]
+children: Doctrine\ORM\PersistentCollection {#5004 …}
+nested: Doctrine\ORM\PersistentCollection {#5006 …}
+votes: Doctrine\ORM\PersistentCollection {#5008 …}
+reports: Doctrine\ORM\PersistentCollection {#5010 …}
+favourites: Doctrine\ORM\PersistentCollection {#5012 …}
+notifications: Doctrine\ORM\PersistentCollection {#5014 …}
-id: 129749
-bodyTs: "'/faq/](https://bcachefs.org/faq/)':19 'anim':6 'bcach':8 'bcachef':1 'bcachefs.org':18 'bcachefs.org/faq/](https://bcachefs.org/faq/)':17 'block':13 'cach':15 'devic':14 'differ':5 'provid':12 'see':16"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.sdf.org/comment/5504676"
+editedAt: null
+createdAt: DateTimeImmutable @1700131406 {#5001
date: 2023-11-16 11:43:26.0 +01:00
}
} |
|
Show voter details
|
85 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
86 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4754
+user: App\Entity\User {#4767 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "use ssds?"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1700127289 {#4749
date: 2023-11-16 10:34:49.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4755 …}
+nested: Doctrine\ORM\PersistentCollection {#4757 …}
+votes: Doctrine\ORM\PersistentCollection {#4759 …}
+reports: Doctrine\ORM\PersistentCollection {#4761 …}
+favourites: Doctrine\ORM\PersistentCollection {#4763 …}
+notifications: Doctrine\ORM\PersistentCollection {#4765 …}
-id: 129621
-bodyTs: "'ssds':2 'use':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://discuss.tchncs.de/comment/4905475"
+editedAt: null
+createdAt: DateTimeImmutable @1700127289 {#4750
date: 2023-11-16 10:34:49.0 +01:00
}
} |
|
Show voter details
|
87 |
DENIED
|
edit
|
App\Entity\EntryComment {#4754
+user: App\Entity\User {#4767 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "use ssds?"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1700127289 {#4749
date: 2023-11-16 10:34:49.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4755 …}
+nested: Doctrine\ORM\PersistentCollection {#4757 …}
+votes: Doctrine\ORM\PersistentCollection {#4759 …}
+reports: Doctrine\ORM\PersistentCollection {#4761 …}
+favourites: Doctrine\ORM\PersistentCollection {#4763 …}
+notifications: Doctrine\ORM\PersistentCollection {#4765 …}
-id: 129621
-bodyTs: "'ssds':2 'use':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://discuss.tchncs.de/comment/4905475"
+editedAt: null
+createdAt: DateTimeImmutable @1700127289 {#4750
date: 2023-11-16 10:34:49.0 +01:00
}
} |
|
Show voter details
|
88 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4754
+user: App\Entity\User {#4767 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: "use ssds?"
+lang: "en"
+isAdult: false
+favouriteCount: 2
+score: 0
+lastActive: DateTime @1700127289 {#4749
date: 2023-11-16 10:34:49.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4755 …}
+nested: Doctrine\ORM\PersistentCollection {#4757 …}
+votes: Doctrine\ORM\PersistentCollection {#4759 …}
+reports: Doctrine\ORM\PersistentCollection {#4761 …}
+favourites: Doctrine\ORM\PersistentCollection {#4763 …}
+notifications: Doctrine\ORM\PersistentCollection {#4765 …}
-id: 129621
-bodyTs: "'ssds':2 'use':1"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://discuss.tchncs.de/comment/4905475"
+editedAt: null
+createdAt: DateTimeImmutable @1700127289 {#4750
date: 2023-11-16 10:34:49.0 +01:00
}
} |
|
Show voter details
|
89 |
DENIED
|
ROLE_USER
|
null |
|
Show voter details
|
90 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4827
+user: App\Entity\User {#4840 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Thanks for writing this! Getting bcache set up the first time can be confusing, so this certainly helps.\n
\n
I’ll just drop one warning in here. With a setup very much like described here I’ve had severe data corruption and loss, so please make sure your data is properly and regularly backed up. To me it seemed like almost any unexpected or untimely power off would cause some data loss or significant corruption.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 6
+score: 0
+lastActive: DateTime @1700129102 {#4822
date: 2023-11-16 11:05:02.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4828 …}
+nested: Doctrine\ORM\PersistentCollection {#4830 …}
+votes: Doctrine\ORM\PersistentCollection {#4832 …}
+reports: Doctrine\ORM\PersistentCollection {#4834 …}
+favourites: Doctrine\ORM\PersistentCollection {#4836 …}
+notifications: Doctrine\ORM\PersistentCollection {#4838 …}
-id: 129669
-bodyTs: "'almost':60 'back':53 'bcach':6 'caus':68 'certain':17 'confus':14 'corrupt':40,74 'data':39,48,70 'describ':33 'drop':22 'first':10 'get':5 'help':18 'like':32,59 'll':20 'loss':42,71 'make':45 'much':31 'one':23 'pleas':44 'power':65 'proper':50 'regular':52 'seem':58 'set':7 'setup':29 'sever':38 'signific':73 'sure':46 'thank':1 'time':11 'unexpect':62 'untim':64 've':36 'warn':24 'would':67 'write':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5846844"
+editedAt: null
+createdAt: DateTimeImmutable @1700129102 {#4823
date: 2023-11-16 11:05:02.0 +01:00
}
} |
|
Show voter details
|
91 |
DENIED
|
edit
|
App\Entity\EntryComment {#4827
+user: App\Entity\User {#4840 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Thanks for writing this! Getting bcache set up the first time can be confusing, so this certainly helps.\n
\n
I’ll just drop one warning in here. With a setup very much like described here I’ve had severe data corruption and loss, so please make sure your data is properly and regularly backed up. To me it seemed like almost any unexpected or untimely power off would cause some data loss or significant corruption.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 6
+score: 0
+lastActive: DateTime @1700129102 {#4822
date: 2023-11-16 11:05:02.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4828 …}
+nested: Doctrine\ORM\PersistentCollection {#4830 …}
+votes: Doctrine\ORM\PersistentCollection {#4832 …}
+reports: Doctrine\ORM\PersistentCollection {#4834 …}
+favourites: Doctrine\ORM\PersistentCollection {#4836 …}
+notifications: Doctrine\ORM\PersistentCollection {#4838 …}
-id: 129669
-bodyTs: "'almost':60 'back':53 'bcach':6 'caus':68 'certain':17 'confus':14 'corrupt':40,74 'data':39,48,70 'describ':33 'drop':22 'first':10 'get':5 'help':18 'like':32,59 'll':20 'loss':42,71 'make':45 'much':31 'one':23 'pleas':44 'power':65 'proper':50 'regular':52 'seem':58 'set':7 'setup':29 'sever':38 'signific':73 'sure':46 'thank':1 'time':11 'unexpect':62 'untim':64 've':36 'warn':24 'would':67 'write':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5846844"
+editedAt: null
+createdAt: DateTimeImmutable @1700129102 {#4823
date: 2023-11-16 11:05:02.0 +01:00
}
} |
|
Show voter details
|
92 |
DENIED
|
moderate
|
App\Entity\EntryComment {#4827
+user: App\Entity\User {#4840 …}
+entry: App\Entity\Entry {#2400
+user: Proxies\__CG__\App\Entity\User {#1978 …}
+magazine: App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
}
+image: null
+domain: Proxies\__CG__\App\Entity\Domain {#1889 …}
+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 {#2414
date: 2023-11-16 17:37:38.0 +01:00
}
+ip: null
+adaAmount: 0
+tags: null
+mentions: null
+comments: Doctrine\ORM\PersistentCollection {#1688 …}
+votes: Doctrine\ORM\PersistentCollection {#1966 …}
+reports: Doctrine\ORM\PersistentCollection {#1965 …}
+favourites: Doctrine\ORM\PersistentCollection {#1368 …}
+notifications: Doctrine\ORM\PersistentCollection {#2426 …}
+badges: Doctrine\ORM\PersistentCollection {#2439 …}
+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 {#1793
date: 2023-11-18 15:55:06.0 +01:00
}
+createdAt: DateTimeImmutable @1700059909 {#2402
date: 2023-11-15 15:51:49.0 +01:00
}
}
+magazine: App\Entity\Magazine {#265}
+image: null
+parent: null
+root: null
+body: """
Thanks for writing this! Getting bcache set up the first time can be confusing, so this certainly helps.\n
\n
I’ll just drop one warning in here. With a setup very much like described here I’ve had severe data corruption and loss, so please make sure your data is properly and regularly backed up. To me it seemed like almost any unexpected or untimely power off would cause some data loss or significant corruption.
"""
+lang: "en"
+isAdult: false
+favouriteCount: 6
+score: 0
+lastActive: DateTime @1700129102 {#4822
date: 2023-11-16 11:05:02.0 +01:00
}
+ip: null
+tags: null
+mentions: [
"@Uluganda@lemmy.ml"
]
+children: Doctrine\ORM\PersistentCollection {#4828 …}
+nested: Doctrine\ORM\PersistentCollection {#4830 …}
+votes: Doctrine\ORM\PersistentCollection {#4832 …}
+reports: Doctrine\ORM\PersistentCollection {#4834 …}
+favourites: Doctrine\ORM\PersistentCollection {#4836 …}
+notifications: Doctrine\ORM\PersistentCollection {#4838 …}
-id: 129669
-bodyTs: "'almost':60 'back':53 'bcach':6 'caus':68 'certain':17 'confus':14 'corrupt':40,74 'data':39,48,70 'describ':33 'drop':22 'first':10 'get':5 'help':18 'like':32,59 'll':20 'loss':42,71 'make':45 'much':31 'one':23 'pleas':44 'power':65 'proper':50 'regular':52 'seem':58 'set':7 'setup':29 'sever':38 'signific':73 'sure':46 'thank':1 'time':11 'unexpect':62 'untim':64 've':36 'warn':24 'would':67 'write':3"
+ranking: 0
+commentCount: 0
+upVotes: 0
+downVotes: 0
+visibility: "visible "
+apId: "https://lemmy.ml/comment/5846844"
+editedAt: null
+createdAt: DateTimeImmutable @1700129102 {#4823
date: 2023-11-16 11:05:02.0 +01:00
}
} |
|
Show voter details
|
93 |
DENIED
|
edit
|
App\Entity\Magazine {#265
+icon: Proxies\__CG__\App\Entity\Image {#246 …}
+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 {#275
date: 2024-10-22 09:52:22.0 +02:00
}
+markedForDeletionAt: null
+tags: null
+moderators: Doctrine\ORM\PersistentCollection {#237 …}
+ownershipRequests: Doctrine\ORM\PersistentCollection {#233 …}
+moderatorRequests: Doctrine\ORM\PersistentCollection {#222 …}
+entries: Doctrine\ORM\PersistentCollection {#180 …}
+posts: Doctrine\ORM\PersistentCollection {#138 …}
+subscriptions: Doctrine\ORM\PersistentCollection {#200 …}
+bans: Doctrine\ORM\PersistentCollection {#117 …}
+reports: Doctrine\ORM\PersistentCollection {#103 …}
+badges: Doctrine\ORM\PersistentCollection {#81 …}
+logs: Doctrine\ORM\PersistentCollection {#71 …}
+awards: Doctrine\ORM\PersistentCollection {#1346 …}
+categories: Doctrine\ORM\PersistentCollection {#1823 …}
-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 {#269
date: 2024-10-22 09:53:16.0 +02:00
}
+apDeletedAt: null
+apTimeoutAt: null
+visibility: "visible "
+createdAt: DateTimeImmutable @1698929468 {#271
date: 2023-11-02 13:51:08.0 +01:00
}
} |
|
Show voter details
|