[00:15] I have a folder with around 4500 subdirectories. How can I delete all subdirectories that are smaller than 100 MB? [01:01] I'm pretty sure all those subdirectories are smaller than 100MB :) [01:02] but I guess you mean the files inside them [01:03] you could script it in bash using a tool like 'du' [08:25] I need help with getting an mdadm raid to boot. power was lost on the server and when restored the OS would not boot. After POST all I see is a blinking cursor on a black screen. [08:28] I did 'grub-install' on both disks from an Ubuntu live session but now get errors when booting and end up in grub rescue [08:30] zetheroo: first up, which versions of things are you running? can you see both drives if booting up on a rescue usb thing? do you see any issues in smart data on the drives? [08:30] also, do you have a backup? [08:31] RoyK: I have both disks (SSDs) attached to my PC via USB dock at the moment [08:31] https://pastebin.com/K62C604U [08:31] the disks are both less than a month old [08:32] one of the errors when booting is 'unknown filesystem' [08:36] no, we don't have a current backup [08:38] what does lsblk have to say? [08:38] the age of the drives is generally irrelvant - drives can fail at any time [08:39] https://pastebin.com/ePn3BQ6t [08:39] please pastebin output of "smartctl -a /dev/sdX" [08:40] erm - nothing on the raid? is lvm installed on the machine? [08:40] also, please don't use pastebin.com - it's spammy - https://paste.ubuntu.com/ or similar is quieter and works well ;) [08:41] https://paste.ubuntu.com/p/vff6PvF8bW/ [08:42] not sure about the LVM question - but very likely. [08:42] type 'vgs' [08:43] no output [08:43] looks like the drives are new-ish - only been running for a week or so [08:43] lvm2 was not installed on my PC so just installed it [08:43] yep [08:44] pvscan [08:44] No matching physical volumes found [08:44] just to check if there's some lvm stuff there [08:44] oh [08:44] could it be zfs? [08:44] hmm ... [08:44] not likely [08:44] since there's md0 [08:45] there really should be something visible there [08:45] was this setup with crypto or something? [08:45] no crypto [08:51] is there a way to mount the disk? [08:52] maybe it's better to get all the critical data out and just do a fresh install [08:52] there should be, but before that, you should see partitions/filesystems [08:52] and it's very strange that lsblk shows none [08:53] erm [08:53] osprober-linux-sda1 [08:53] what is that? [08:54] no idea ... looking it up [08:54] https://github.com/openzfs/zfs/discussions/9801 [08:54] ZOL ...? [08:55] I hope not [08:55] zfs on top of mdraid sounds like a bad dream [08:55] or a badtrip [08:56] what does 'file -s /dev/md0' have to say? [08:57] /dev/md0: Linux rev 1.0 ext4 filesystem data, UUID=99f7fdf9-6f9a-4069-856e-4db4c529741e (needs journal recovery) (extents) (64bit) (large files) (huge files) [08:57] hm - try to mount it somewhere [08:58] should I mount md0 or the individual disks? [08:58] md0 [08:58] the mirror seems to be in sync after all [09:01] mount: /mnt/raidarray: cannot mount /dev/md0 read-only. [09:01] mounting via fstab with: [09:01] UUID=99f7fdf9-6f9a-4069-856e-4db4c529741e /mnt/raidarray ext4 defaults 0 0 [09:02] read only, sounds like a dirty filesystem [09:04] oerheks: it is - it said above - power failure [09:04] https://paste.ubuntu.com/p/J7BwF4RMm6/ [09:05] zetheroo: any valuable data on it? [09:05] yep - it was our monitoring server :( [09:05] zetheroo: not to rub it in, but try to use a backup next time ;) [09:05] and it had no redundant PSU 😲 [09:05] zetheroo: keep a backup anyway [09:06] two backups, preferably, at least [09:06] yes, I know ... very bad practice with that :( [09:06] anyway [09:06] what does /proc/mdstat have to say now? [09:07] https://paste.ubuntu.com/p/gp4KnDYSSs/ [09:07] you might need to issue a raid sync/repair [09:07] echo repair > /sys/block/md0/md/sync_action [09:08] bash: /sys/block/md0/md/sync_action: Permission denied [09:08] 'sudo -i' first [09:08] ok, no output [09:08] check mdstat [09:09] it shouldn't take too long on a small ssd mirror [09:09] https://paste.ubuntu.com/p/sNhRTr4PNh/ [09:10] https://paste.ubuntu.com/p/7WcdJM8xPT/ [09:12] try to stop it and reassemble [09:12] mdadm --stop /dev/md0 ; mdadm --asseble --scan [09:12] mdadm: /dev/md/0 has been started with 2 drives. [09:13] checkk mdstat [09:13] md0 : active (read-only) ... [09:13] anything interesting in dmesg? [09:13] dmesg -T to get proper timestamps [09:14] https://paste.ubuntu.com/p/ZGPRcFTDvC/ [09:17] stop it again and try 'mdadm --assemble /dev/md0 --run' [09:17] never seen it go into read-only mode like that before [09:17] oh ... I got it to mount [09:17] at least I think so ... it's mounted read-only though [09:18] UUID=99f7fdf9-6f9a-4069-856e-4db4c529741e /mnt/raidarray ext4 noload 0 0 [09:18] used the noload option [09:18] is that ok, or should I unmount it? [09:18] good, get the data off the system first [09:18] after mount - a I see 'mount: /mnt/raidarray: WARNING: device write-protected, mounted read-only.' [09:19] did you try with --run? [09:19] no, should I unmount it and do that? [09:20] try to umount, stop and reassemble with --run to see if it gets up without readonly [09:20] ok [09:21] md0 : active (read-only) [09:21] esc [09:21] sec [09:21] k [09:23] hm - you might want to try mdadm -w /dev/md0 [09:23] mdadm: failed to set writable for /dev/md0: Read-only file system [09:24] do you have another disk around to test if drives plugged into that thing become writable? [09:24] oh, you mean the USB dock might be the problem? [09:25] I have no idea, but I've never seen disks struggle with getting read-write like this [09:25] ok, will try another disk in the same USB dock ... [09:27] plugged in another disk and it seems to also be read-only [09:28] although root can write to it ... [09:29] weird [09:30] what's in dmesg? [09:31] https://paste.ubuntu.com/p/bJhhhSQ9K6/ [09:31] I plugged in the two md0 SSDs again [09:31] [Mi Dez 23 10:30:06 2020] sd 1:0:0:1: [sdd] Write Protect is off [09:32] that's good [09:32] what happens if you reassemble the raid? [09:33] not sure how to do that ... looking it up ... [09:34] mdadm --assemble /dev/md0 [09:34] or mdadm --assemble --scan [09:35] if there's an md0 already, --stop it [09:36] hey [09:36] md0 : active raid1 sdd1[2] sdc1[3] [09:36] :) [09:36] now try to mount it, get the data off and fsck it [09:37] normally just mounting it should take care of those things missing [09:37] it's jouranlled after all [09:37] https://paste.ubuntu.com/p/khs8B4FQfD/ [09:37] ok [09:37] did it mount? [09:38] clean, active ync, sounds good [09:39] yes, it mounted with 'defaults' in fstab [09:40] you may want to umount it and fsck it just for kicks [09:40] but first get the data off, right? or is fsck safe ...? [09:40] should be safe [09:41] can you pastebin lsblk output again? [09:43] https://paste.ubuntu.com/p/5CCxVbRx89/ [09:43] I'm grabbing the data just to be safe ... [09:44] and then 'fsck /dev/md0' ? [09:44] looks good [09:44] just umount before fsck [09:44] ok [09:45] it won't let you fsck a mounted filesystem unless you --force it, which is generally an extremely bad idea ;) [09:58] ok .. unmounted and going to run fsck on it [09:59] https://paste.ubuntu.com/p/bTTwJFcCsq/ [10:19] where to now? :) [10:25] RoyK: are you still there? === falcojr5 is now known as falcojr [11:59] Btw ... I ended up trying Boot Repair on it from an Ubuntu Live Session .. and it's fixed :) [13:37] /part [14:18] Is it safe to do-release-upgrade to 20.04.1 LTS yet? :D [14:29] !20.04 [14:29] Ubuntu 20.04 (Focal Fossa) is the 32nd release of Ubuntu and is the current !LTS release. Download at https://ubuntu.com/download - Release notes at https://wiki.ubuntu.com/FocalFossa/ReleaseNotes [15:01] Someone should maybe update ubot3 to not refer to Ubuntu 20.04 as an !LTS release? [15:01] !LTS [16:49] !20.10 [16:49] Ubuntu 20.10 (Groovy Gorilla) is the 33rd release of Ubuntu and is the current regular release. Download at https://ubuntu.com/download - Release notes at https://wiki.ubuntu.com/GroovyGorilla/ReleaseNotes [16:49] andol: But ... 20.04 is an lts release [17:02] dang, 33 releases of ubuntu already [17:13] juliank: Yes, and hence not a !LTS release. [17:13] andol: ! is like a hashtag [17:13] it's like saying it's the current #LTS release [17:13] is systemd-resolve supposed to completely ignore my secondary nameserver entry? [17:13] !LTS [17:14] arguably ubot3 does not implement the LTS command right now [17:16] !lts [17:16] Hm [17:17] juliank: Yeah, but given the meaning a ! prefix generally has I'd say the result just ends up being somewhat confusing. [17:33] lol, now netplan isn't respecting the routes I've defined. so glad we left ifupdown that acutally worked for this. [17:37] goddamn bugs in 18.04 [18:53] mybalzitch: if you don't have a question then please don't rant. [18:53] as for netplan not respecting the routes you've defined that USUALLY means your routes are wrong [18:54] teward: its a confirmed bug in 18.04 of netplan not applying changes properly, and I'll rant all I like thanks very much [18:54] no, you won't, not here you won't anyways. This is a support channel, not a rant channel. [18:54] you can take your rants elsewhere. [18:54] okay [22:35] hi [22:35] I need to restart a service each 5 minutes [22:35] I made a script with service service_name restart [22:35] and set to restart each 5 minutes [22:35] I know it runs fine cause another line in the script is running [22:35] but the service command doesn't seem to work [22:36] any idea? [22:39] DeeJayTwo: are you running this script from cron or something similar? [22:50] use a systemd unit, like this? https://unix.stackexchange.com/a/265619 where RestartSec=300s ofcourse