summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarzyna Gorska <k.gorska@samsung.com>2018-11-21 08:16:55 (GMT)
committerKatarzyna Gorska <k.gorska@samsung.com>2018-11-22 12:17:06 (GMT)
commit8f81b8c377111a5a92b6d341d8a1a4c24b096f2c (patch)
tree3e8cb2b52934e6917d9af6a5eb79134838fc3cd7
parent63da454f4bb52a83a026d683f180f241727987d5 (diff)
downloadhost-8f81b8c377111a5a92b6d341d8a1a4c24b096f2c.zip
host-8f81b8c377111a5a92b6d341d8a1a4c24b096f2c.tar.gz
host-8f81b8c377111a5a92b6d341d8a1a4c24b096f2c.tar.bz2
Remove invalid symlinks in /dev/disk/by-uuidrefs/changes/99/193499/4
Sometimes invalid symlinks are created in /dev/disk/by-uuid. They make UUID healthcheck procedure more annoying. New feature was added to thanos_snap to remove those symlinks. Change-Id: Ieb555f5507bba519a4fe79e69d0058f794ba57a3 Signed-off-by: Katarzyna Gorska <k.gorska@samsung.com>
-rw-r--r--util/aliases3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/aliases b/util/aliases
index a8ea5d1..2652f46 100644
--- a/util/aliases
+++ b/util/aliases
@@ -131,11 +131,14 @@ uuid_healthcheck() {
# thanos_snap removes all ghost /dev/sd* files.
# This is a temporary solution we should fight the real problem.
+# TODO investigate the reasons why such files and links are created, and remove that cause.
thanos_snap() {
# this step should be done after entering maintenence, but you can never be too sure.
avengers_disassemble
# remove unneeded /dev/sd* files
ls -alF /dev/sd* | awk '$0 !~ /^b/{print $NF}' | xargs sudo rm
+ # remove invalid links from /dev/disk/by-uuid
+ find /dev/disk/by-uuid/ -xtype l | xargs sudo rm
}
# show_alllogs displays logs for given expression (build_nr, device, etc...)