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