Re: [GLLUG] Replacement disk in RAID
On Sun 2023-04-30 08.58.51, Greater London Linux User Group wrote: On 30/04/2023 08:04, Dr. Axel Stammler via GLLUG wrote: RAID 1 ┌ RAID 4 ┌ A │ └ B ← needs to be replaced │ RAID 4 ┌ C └ └ D I'm a bit out of practice with RAID, but how can you have a RAID 4 array with only two disks? I thought RAID 4 had a dedicated parity disk? I think I got things mixed up, sorry; you are right, of course. I created this logical volume three years ago: mirrored logical volume ┌ A C └ B D B has failed. Thank you for helping me clear this up here. Axel signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Replacement disk in RAID
On Sun 2023-04-30 08.53.42, James Dutton wrote: Another thing to consider is something called "Object stores". This is where the redundancy is handled at the filesystem or above instead of the physical disk. It lets you do things like "Store each file on at least 2 different physical disks." An advantage to "Object stores" is you can easily mix disks of different sizes, add new disks, replace faulty ones with ones of different size and the "Object store" takes care of the distribution of files. btrfs is an example of such an "Object store" filesystem, but there are many others. Wow. Thank you. This sounds _very_ interesting, even for the whole system. How would I go about converting this setup to a much more flexible BTRFS setup? (I'll probably have to wait until I have a lot of time at my hands.) Cheers, Axel signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
[GLLUG] Replacement disk in RAID
Good morning, one of four hds in my LVM2 raid has stopped reacting to SMART commands or anything else. The 16 TB raid system contains four 8 TB hds in a RAID 1 set of two RAID 4 pairs: RAID 1 ┌ RAID 4 ┌ A │└ B ← needs to be replaced │ RAID 4 ┌ C └└ D So I need to replace hard disk B, buy a new disk and integrate it. Should I replace disk A, too, as it is of the same age? If not, should the replacement B be larger so that in the future I can grow the array? Should I get an HDD or an SSD? Any tips on the choice of hard disk (size, parameters, maker) as well as on the procedure would be much appreciated. Axel signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
[GLLUG] How can I find out if external audio is connected?
Hi, I would like to remind myself of external amplifiers uselessly running so I would like to play a short sound signal once in a while if there is no audio playing. OTOH, the signal should obviously not be played over the built-in speakers. So, how can I find out (preferably using a command-line utility in a script) which of the ‘audio out’ connectors are actually connected to anything (or just have a plug in them) and if anything is played over these connections? Any remarks greatly appreciated, Axel signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Link two RAIDs in one LVM?
Hi, And thanks again, I have followed your advice, creating an 8TB mirrored logical volume on my two new drives, i.e. using 1 mirror = 2 copies. On Mon 2020-05-11 13.15.55, Greater London Linux User Group wrote: Hi, What size are the partitions on the old 8TB disks? Is it a single partition for all 8TB ? If you have a separate data from the OS partition: you could "rsync -avpP" the data/image/picture/whatever files over to the new disks on top of LVM. You could handle the OS partition offline. You can then do a final "catch up" rsync of the data in offline mode. Once everything is copied and you have unmounted the old disks, and have everything booting and running nicely on the new disks. You could then wipe the old disks, and redo them with LVM on them. I would allow at least a day or two for the first rsync of 8TB. What do you think of the following procedure? Once I have copied and tested everything, I wipe the old disks and add them to the 8TB LV as copies #2 and #3. After synchronisation, I remove one of the new disks and one of the old ones, wipe them again and then extend or resize the LV to contain two pairs of mirrored 8TB data = 16TB. As each pair would consist of an old disk combined with a new one, would the whole system not be less likely to be destroyed by two disks failing simultaneously? What are the exact command combinations to accomplish this? (vgextend, vgcreate, lvextend, lvresize) signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Link two RAIDs in one LVM?
Hi, On Mon 2020-05-11 22.31.44, James Courtier-Dutton wrote: Which filesystem are you using on the old 8TB disk? For example, if it is btrfs, you don't have to copy anything about. btrfs does its own raid 0. You can just add more disks as you need them and btrfs just uses them. Interesting. I did not know about this and just went with the flow during installation and used ext4. signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Link two RAIDs in one LVM?
Hi, And thank you for all contributions. On Mon 2020-05-11 19.40.15, Greater London Linux User Group wrote: On Mon, May 11, 2020 at 01:15:55PM +0100, James Courtier-Dutton via GLLUG wrote: If you have a separate data from the OS partition: you could "rsync -avpP" the data/image/picture/whatever files over to the new disks on top of LVM. You could handle the OS partition offline. You can then do a final "catch up" rsync of the data in offline mode. Can I add a suggestion to use '-H' ('--hard-links') to the list of rsync options to make sure that files which are hard links are not copied as separate non-linked files? This is important for the OS partitions, where several deb packages install the same file under different names (eg bzip2). It does have the downside of being slightly slower as it has to check for hard links, so might be skipped for those filesystems where you know there are no hard links. I feel rather nervous as I am about to do all this, and I do have some questions (see below). 1. Create Physical Volumes on the two new 8 TB hard disk drives: pvcreate /dev/sdc pvcreate /dev/sde 2. Create a Volume Group containing these Physical Volumes vgcreate vg_blobs /dev/sdc /dev/sde 3. Create a mirrored Logical Volume using this Volume Group lvcreate -n lv_blobs -m1 vg_blobs Questions: - How do I make the new volume use all available space? Will mirroring choose the physical volumes automatically? - Where does the log go? = Do I need a partition on a separate disk for it? How large should it be and how do I incorporate it? 4. Create a new file system on the mirrored LV mkfs.ext4 /dev/vg_blobs/lv_blobs 5. Copy the data from the existing RAID-1 system (on sda and sdb) to the new mirrored LV rsync -at # or -avpP or -avpPH? 6. How do I then remove sda + sdb from RAID-1 md127p1? 7. How do I eliminate RAID-1 md127p1? 8. Create Physical Volumes on the two old 8 TB hard disk drives: pvcreate /dev/sda pvcreate /dev/sdb 9. Do I now extend the Volume Group created in step 2 or do I create a new Volume Group? vgextend vg_blobs Or: vgcreate vg_blobs2 10. ? lvextend Or: lvresize 11. Grow the filesystem to 16 TB. Are there any more ideas concerning these commands and their options? signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Link two RAIDs in one LVM?
Hi, On Mon 2020-05-11 10.58.13, Greater London Linux User Group wrote: I believe modern mdadm can reshape a RAID-1 into a RAID-0 then a RAID-0 into a RAID-10 and then add extra devices. https://www.berthon.eu/2017/converting-raid1-to-raid10-online/ There will be a scary time when it is RAID-0 and therefore no redundancy. Well, to make it less scary this idea includes the --backup-file option but I do not know what this backup file will contain. Either, it is all the data — then I defdinitely do not have room for it and it would take about as much time as using R Sync to move to a new Logical Volume. Or, it is just RAID configuration data — in that case, it is much too scary for me. signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Link two RAIDs in one LVM?
Hi, On Mon 2020-05-11 10.02.00, Greater London Linux User Group wrote: On 10/05/2020 21:35, Andy Smith via GLLUG wrote: Hello, On Sun, May 10, 2020 at 10:03:32PM +0200, Dr. Axel Stammler via GLLUG wrote: On Sun 2020-05-10 08.53.16, James Courtier-Dutton wrote: So, I think moving to an "LVM mirror" solution is your best bet for future extensibility. I haven't reviewed all the recent replies, but is there any reason why you can't add the the two new disks of the same size and migrate from RAID 1 to RAID 10, e.g: https://blog.voina.org/convert-an-existing-2-disk-raid-1-to-a-4-disk-raid-10/ (though that has LVM on top, shouldn't make a difference in these circumstances, just a quick search, there's many other references, YMMV) Unfortunately, there is no LVM on top of the existing RAID-1 system. signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Link two RAIDs in one LVM?
Hi, Andy, On Sun 2020-05-10 20.35.20, Greater London Linux User Group wrote: On Sun, May 10, 2020 at 10:03:32PM +0200, Dr. Axel Stammler via GLLUG wrote: On Sun 2020-05-10 08.53.16, James Courtier-Dutton wrote: >So, I think moving to an "LVM mirror" solution is your best bet for >future extensibility. After reviewing all options, this indeed seems to be the best one in my case. But it still doesn't let you move filesystems that aren't on LVM in to LVM. I don't understand why you keep thinking that LVM lets you do this. My very first reply to you pointed out this would be an issue for you! Thank you, and I am sorry I did not make it clear that I had dropped that idea. I'll do what was suggested here: create a mirrored LV on the new drives, use R Sync to copy my data from my old RAID-1 system to the LV, create new physical volumes on the old drives (destroying the RAID), and extend the volume group and the logical volume. signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Link two RAIDs in one LVM?
Hi, On Mon 2020-05-11 13.15.55, Greater London Linux User Group wrote: What size are the partitions on the old 8TB disks? Is it a single partition for all 8TB ? Yes, it is. The system is on a separate hard disk drive. If you have a separate data from the OS partition: you could "rsync -avpP" the data/image/picture/whatever files over to the new disks on top of LVM. You could handle the OS partition offline. You can then do a final "catch up" rsync of the data in offline mode. Once everything is copied and you have unmounted the old disks, and have everything booting and running nicely on the new disks. You could then wipe the old disks, and redo them with LVM on them. I would allow at least a day or two for the first rsync of 8TB. signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Link two RAIDs in one LVM?
On Sun 2020-05-10 08.53.16, James Courtier-Dutton wrote: So, there is a solution that uses tiled RAID. LVM has a "mirror" option. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/cluster_logical_volume_manager/mirrored_volumes If you used that, you would not need a RAID layer at all. You would create all the disks as a LVM volume group, and then create LVM partitions using the LVM mirror option. An LVM mirror divides the device being copied into regions that are typically 512KB in size, so a big improvement over the 500GB chunks suggestion above. This would also give flexibility, you could choose some of your data to be "mirror" and some not. LVM "mirror" also lets you migrate data while it is still mounted. You have the original LVM volume, mirror it onto a new disk, remove the original copy. So, I think moving to an "LVM mirror" solution is your best bet for future extensibility. After reviewing all options, this indeed seems to be the best one in my case. As I am doing for the first time — are these the correct steps? * additional sources I looked at: - https://wiki.debian.org/LVM - https://www.debian.org/doc/manuals/debian-handbook/advanced-administration.en.html#sect.raid-and-lvm [new hard disk drives, still blank: sdc, sde; old hard disk drives as RAID-1 system md127p1] pvcreate /dev/sdc pvcreate /dev/sde vgcreate vg_blobs /dev/sdc /dev/sde lvcreate -n lv_blobs -m1 vg_blobs # How do I make the new volume use all available space? Will mirroring choose the physical volumes automatically? Where does the log go? = Do I need a partition on a separate disk for it? How large should it be and how do I incorporate it? mkfs.ext4 /dev/vg_blobs/lv_blobs rsync … # old RAID-1 system ↔ new mirrored volume group # ? remove sda + sdb from RAID-1 md127p1 # ? eliminate RAID-1 md127p1 pvcreate /dev/sda pvcreate /dev/sdb vgextend vg_blobs *** # or vgcreate vg_blobs2 ? lvextend / lvresize # ? # grow filesystem signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Link two RAIDs in one LVM?
Thank you. On Sun 2020-05-10 07.39.31, Greater London Linux User Group wrote: On 09/05/2020 20:32, Dr. Axel Stammler via GLLUG wrote: On Sat 2020-05-09 11.24.15, Greater London Linux User Group wrote: How do you intend to combine them? You won't be able to put your existing array into the LVM without destroying its contents. https://www.debian.org/doc/manuals/debian-handbook/advanced-administration.en.html#sect.raid-and-lvm says you can use lvresize and resize2fs to do just that. I am still hoping this will work. I think you may be mis-reading the manual. What you can do is increase the size of an existing Logical Volume, but you can't do an in-situ conversion of an existing non-LV filing system. You are quite right, I was mis-reading the manual. So I cannot incorporate an existing filesystem (no matter whether regular or on a RAID-1 system) into a new Logical Volume system; I see. It really sounded to good to be true: ”RAID-1+0: This isn't strictly speaking, a RAID level, but a stacking of two RAID groupings. Starting from 2×N disks, one first sets them up by pairs into N RAID-1 volumes; these N volumes are then aggregated into one, either by “linear RAID” or (increasingly) by LVM. This last case goes farther than pure RAID, but there's no problem with that.“ One thing which might work for you is to make your two new drives into a RAID1 set and then use resulting device as your first Physical Volume. Create a large logical volume within it, copy all your existing files over (boring), delete the partition on the old RAID1 set, create a second PV, add it to your Volume Group and then expand the LV. It does mean moving all your data from old drives to new, but at least you'd then end up with one much larger filing system. Hmm. How long would it take to copy (nearly) 8 TB? Obviously I would have to prevent any write access for that period of time. signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Link two RAIDs in one LVM?
Hi, Thank you for your detailed look at possible setups. I remembered my old setup incorrectly, though, so that I am not sure everything is applicable. My original (2016) setup included two hard disk drives of not 4 TB but 8 TB capacity in a RAID-1 that has reached 92 per cent capacity. On Tue 2020-04-28 13.19.10, James Courtier-Dutton wrote: First for RAID, avoid SMR HDDs. (Shingled magnetic recording) I would probably RAID 5 them. 4+4 = 8 for the first disk, against the two other 8 disks. So, say disks are A(4TB), B(4TB), C(8TB), D(8TB) Partitions the 8TB in half. A(4TB), B(4TB), C1(4TB), C2(4TB), D1(4TB), D2(4TB) RAID 5: A,C1,D1 RAID 5: B,C2,D2 Then put the two RAID arrays in the same LVM VG, so that they look like one big disk for the OS. Another alternative is using XFS or BTRFS and configure them with replicas. That is where the filesystem does the replication, thus not needing RAID at all. As 8 TB hard drives still seem to be the best value for money per TB, I have ordered two more, making sure they use perpendicular magnetic recording. The existing drives look fine both in SMART logs and tests (I even have a 1 TB from 2009 in perfect working order, cannot imagine how.), so my first idea was to create a new RAID-1 and to combine the two resulting systems via Logical Volume Management. What do you think? Or, you could take the approach I take. I remove the old 4TB disks and only copy the few files I need on to the 8TB disks going forward. I can always plug the old 4TB disks in if I need an old file. I have written my own indexer for this. It scans the whole disk, creating an index and thumbnails and then only store the index and thumbnails on the 8TB disks. The index is stored in Elastic Search, so makes it easy to find the files again, and also which disk they are on. So, files I hardly ever need are stored on powered off disks. Unfortunately, in my case, I cannot tell which data are going to be needed more often or sooner. Kind regards, Axel signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Link two RAIDs in one LVM?
Hi, On Tue 2020-04-28 16.10.42, Greater London Linux User Group wrote: Next up, if your drives don't support SCTERC timeout facility then this is not ideal for a Linux RAID system but can be worked around Thanks. This is another great tip. Is there any way to find out if a drive has that problem before buying it? Cheers, Axel signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Link two RAIDs in one LVM?
On Tue 2020-04-28 13.19.10, James Courtier-Dutton wrote: First for RAID, avoid SMR HDDs. (Shingled magnetic recording) Hi, Thanks for these valuable tips, especially the one about SMR. I have looked at the topic in more detail and I am really glad I did. Could you suggest a way of finding non-SMR hard disk drives, especially at decent prices? Kind regards, Axel -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
[GLLUG] Link two RAIDs in one LVM?
Hi, I have a 4 TB RAID system (two identical hard disks combined in a RAID-1, created using mdadm). Now, after a few years, this has reached 90% capacity, and I am thinking about first adding another similar 8 TB RAID system and then combining them into one 12 GB RAID 1+0 filesystem. I should be grateful for any tips, especially about buying two 8 TB harddisks. Which hardware parameters should I look at? Which method should I use to combine both RAID systems into one? - linear RAID - RAID-0 - Large Volume Management (using pvcreate, vgcreate, lvcreate) Axel -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
[GLLUG] XMPP clients? Movim?
Hi, I have been using different XMPP clients (under Debian and Lineage) over time with rather mixed results, e.g. Gajim, Conversations and A Talk, using my own Prosody setup. Prosody seems to offer a lot, at least in conjunction with A Talk, more than the other clients support, which also seem a bit unreliable. Has anyone tried different clients (especially under Debian), e.g. Dino, Finch, M Cabber, Poezio, or Kadu? What about the audio and video calls A Talk seems to offer? I cannot even find anyone to try these things out with. An alternative seems to be Movim but I could not get the server to work under Debian Buster. What do you think of using one of their own servers with a Lineage client? Does that not defeat the purpose of moving away from commercial anti-social media like Whats App? Axel signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Server in London
Thank you very much for making me aware of all those options. I have started looking into several of them, which may obviously take a minute or two. OTOH, I feel rather disinclined to work with any but the smallest companies as large companies bring their own agenda which is usually quite different from mine. I have once tried a virtual server, with some extremely pleasant and some not so pleasant results. If the GLLUG has a meeting at the beginning of next week, it might be best to just have a chat there. Moreover, I have unwisely already set up a tiny box to connect somewhere, so I feel a bit reluctant to give up on it. signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Server in London
Hello, James, the data is private. The server should only be accessible to me via VPN and SSH. There should be no public access. The internet connection should be provided via ethernet cable; there should be no wireless capability. My core data (authored by myself) is in databases and text files and less than 100 GB. Then there are copyrighted text and media files which I use perfectly legally but which I have no right (and no wish) to make available to anyone else. All in all I'll use an SSD of about 500 GB for the Debian system and the data. Just to make sure: The server will contain no adult or violent material and obviously no illegal material. The data will be kept up to date using downloads or synchronisation (rsync, unison) about once a day. The times could be open to negotiation. Any other data transfers would be quite small. I plan to use a slow CPU and no HDD (only SSD) so I can do without any mechanical parts like HDDs and fans. Kind regards Axel On Thu 2019-10-10 22.14.36, James Courtier-Dutton wrote: > What size is the data/database/files you wish store online ? > Some idea as to how busy it might be? > If I understand it correctly, you have some data that you wish to > access when not at home. > Your home internet is slow and un-reliable, so you would like to put > is somewhere that has more reliable internet links. > Is the data private or public for everyone to view? signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug
Re: [GLLUG] Server in London
Hello, David, Thanks for your quick reply. My internet connection is slow and unreliable, and my power supply has (on rare occasions) failed, too. Part of the server would be devoted to database replication. I don't want to work with any cloud systems offered by big companies. And, in a pinch I could ask for the server to be handed to me. Regards Axel On Thu 2019-10-10 20.48.15, Dawid Olesinski via GLLUG wrote: >Sorry but obvious question is why do you care about physical location of >your server if you won't require physical access to it? signature.asc Description: PGP signature -- GLLUG mailing list GLLUG@mailman.lug.org.uk https://mailman.lug.org.uk/mailman/listinfo/gllug