...
SMCi/IR6028 | hostname | spec | memo |
---|---|---|---|
2019000738 | 143-u16-siot | E5-2680 v4 2.40GHz (14C 28T) 2ea DDR4 192GB (2400MHz 16GB 2R 8ea) sd{a,b} INTEL SSD 480G8 sd{c,d} Seagate ST8000VN004 8TB 10GbT Onboard ( X10DRI-T ) | DS19A7S9004 |
2019000739 | 144-u20-siot | DS19A7S9003 |
백업
143-u16-siot 서버
코드 블럭 | ||||
---|---|---|---|---|
| ||||
# hostname 143-u16-siot # cat /etc/network/interfaces auto em1 iface em1 inet static address 150.xxx.yyy.143 netmask 255.255.255.192 network 150.xxx.yyy.128 broadcast 150.xxx.yyy.191 gateway 150.xxx.yyy.129 dns-nameservers 134.75.30.1 # free -h total used free shared buff/cache available Mem: 125G 1.4G 111G 25M 12G 123G Swap: 127G 0B 127G # top top - 18:18:30 up 44 days, 7:11, 9 users, load average: 0.00, 0.01, 0.02 Tasks: 521 total, 1 running, 520 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem : 13191679+total, 11733267+free, 1424996 used, 13159128 buff/cache KiB Swap: 13410304+total, 13410304+free, 0 used. 12973902+avail Mem # cat /etc/os-release NAME="Ubuntu" VERSION="16.04.7 LTS (Xenial Xerus)" # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 447.1G 0 disk ├─sda1 8:1 0 319.2G 0 part / ├─sda2 8:2 0 1K 0 part └─sda5 8:5 0 127.9G 0 part [SWAP] sdb 8:16 0 447.1G 0 disk └─sdb1 8:17 0 447.1G 0 part /data sdc 8:32 0 7.3T 0 disk sdd 8:48 0 7.3T 0 disk # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 315G 5.5G 293G 2% / /dev/sdb1 440G 71M 418G 1% /data # ls -al /data total 24 drwxr-xr-x 3 root root 4096 Jul 12 2019 . drwxr-xr-x 24 root root 4096 Aug 29 15:19 .. drwx------ 2 root root 16384 Jul 12 2019 lost+found # boot using ubuntu 20 desktop image > live # update apt repo # apt install dump # mkdir /mnt/143 # mount /dev/sda1 /mnt/143 # dd if=/dev/zero of=/mnt/143/zerofile bs=1G # rm /mnt/143/zerofile # umount /mnt/143 # shirink partition using gparted # lsblk /dev/sda NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 447.1G 0 disk ├─sda1 8:1 0 10G 0 part / ├─sda2 8:2 0 1K 0 part └─sda5 8:5 0 127.9G 0 part [SWAP] # dump -0uf /data/143-u16-siot-sda1-ext4.dump /dev/sda1 DUMP: Date of this level 0 dump: Thu Oct 12 19:58:42 2023 DUMP: Dumping /dev/sda1 (/) to /data/143-u16-siot-sda1-ext4.dump DUMP: Label: none DUMP: Writing 10 Kilobyte records DUMP: mapping (Pass I) [regular files] DUMP: mapping (Pass II) [directories] DUMP: estimated 5835803 blocks. DUMP: Volume 1 started with block 1 at: Thu Oct 12 19:58:43 2023 DUMP: dumping (Pass III) [directories] DUMP: dumping (Pass IV) [regular files] DUMP: Closing /data/143-u16-siot-sda1-ext4.dump DUMP: Volume 1 completed at: Thu Oct 12 19:59:08 2023 DUMP: Volume 1 5804480 blocks (5668.44MB) DUMP: Volume 1 took 0:00:25 DUMP: Volume 1 transfer rate: 232179 kB/s DUMP: 5804480 blocks (5668.44MB) on 1 volume(s) DUMP: finished in 25 seconds, throughput 232179 kBytes/sec DUMP: Date of this level 0 dump: Thu Oct 12 19:58:42 2023 DUMP: Date this dump completed: Thu Oct 12 19:59:08 2023 DUMP: Average transfer rate: 232179 kB/s DUMP: DUMP IS DONE # scp 143-u16-siot-sda1-ext4.dump 191-u20-restore:~ |
코드 블럭 | ||||
---|---|---|---|---|
| ||||
# hostname
143-u16-siot
# cat /etc/network/interfaces
auto em1
iface em1 inet static
address 150.xxx.yyy.143
netmask 255.255.255.192
network 150.xxx.yyy.128
broadcast 150.xxx.yyy.191
gateway 150.xxx.yyy.129
dns-nameservers 134.75.30.1
# free -h
total used free shared buff/cache available
Mem: 125G 1.4G 111G 25M 12G 123G
Swap: 127G 0B 127G
# top
top - 18:18:30 up 44 days, 7:11, 9 users, load average: 0.00, 0.01, 0.02
Tasks: 521 total, 1 running, 520 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 13191679+total, 11733267+free, 1424996 used, 13159128 buff/cache
KiB Swap: 13410304+total, 13410304+free, 0 used. 12973902+avail Mem
# cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.7 LTS (Xenial Xerus)"
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 447.1G 0 disk
├─sda1 8:1 0 319.2G 0 part /
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 127.9G 0 part [SWAP]
sdb 8:16 0 447.1G 0 disk
└─sdb1 8:17 0 447.1G 0 part /data
sdc 8:32 0 7.3T 0 disk
sdd 8:48 0 7.3T 0 disk
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 315G 5.5G 293G 2% /
/dev/sdb1 440G 71M 418G 1% /data
# ls -al /data
total 24
drwxr-xr-x 3 root root 4096 Jul 12 2019 .
drwxr-xr-x 24 root root 4096 Aug 29 15:19 ..
drwx------ 2 root root 16384 Jul 12 2019 lost+found
# boot using ubuntu 20 desktop image > live
# update apt repo
# apt install dump
# shirink partition using gparted
# lsblk /dev/sda
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 447.1G 0 disk
├─sda1 8:1 0 10G 0 part /
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 127.9G 0 part [SWAP]
# dump -0uf /data/143-u16-siot-sda1-ext4.dump /dev/sda1
DUMP: Date of this level 0 dump: Thu Oct 12 19:58:42 2023
DUMP: Dumping /dev/sda1 (/) to /data/143-u16-siot-sda1-ext4.dump
DUMP: Label: none
DUMP: Writing 10 Kilobyte records
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 5835803 blocks.
DUMP: Volume 1 started with block 1 at: Thu Oct 12 19:58:43 2023
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
DUMP: Closing /data/143-u16-siot-sda1-ext4.dump
DUMP: Volume 1 completed at: Thu Oct 12 19:59:08 2023
DUMP: Volume 1 5804480 blocks (5668.44MB)
DUMP: Volume 1 took 0:00:25
DUMP: Volume 1 transfer rate: 232179 kB/s
DUMP: 5804480 blocks (5668.44MB) on 1 volume(s)
DUMP: finished in 25 seconds, throughput 232179 kBytes/sec
DUMP: Date of this level 0 dump: Thu Oct 12 19:58:42 2023
DUMP: Date this dump completed: Thu Oct 12 19:59:08 2023
DUMP: Average transfer rate: 232179 kB/s
DUMP: DUMP IS DONE
# scp 143-u16-siot-sda1-ext4.dump 191-u20-restore:~ |
...
144-u20-siot 서버
코드 블럭 | ||||
---|---|---|---|---|
| ||||
# hostname 144-u20-siot # cat /etc/network/interfaces auto eno1 iface eno1 inet static address 150.xxx.yyy.144 netmask 255.255.255.192 network 150.xxx.yyy.128 broadcast 150.xxx.yyy.191 gateway 150.xxx.yyy.129 dns-nameservers 134.75.30.1 # cat /etc/os-release NAME="Ubuntu" VERSION="20.04.2 LTS (Focal Fossa)" # free -h total used free shared buff/cache available Mem: 125Gi 4.6Gi 72Gi 3.0Mi 48Gi 121Gi Swap: 127Gi 0B 127Gi # top top - 18:18:57 up 44 days, 6:33, 3 users, load average: 0.00, 0.07, 0.14 Tasks: 571 total, 1 running, 570 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.1 us, 0.2 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 128811.3 total, 74374.8 free, 4752.9 used, 49683.6 buff/cache MiB Swap: 130960.0 total, 130960.0 free, 0.0 used. 124245.5 avail Mem # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 447.1G 0 disk ├─sda1 8:1 0 319.2G 0 part / ├─sda2 8:2 0 1K 0 part └─sda5 8:5 0 127.9G 0 part [SWAP] sdb 8:16 0 447.1G 0 disk └─sdb1 8:17 0 447.1G 0 part /data sdc 8:32 0 7.3T 0 disk └─sdc1 8:33 0 7.3T 0 part └─md1 9:1 0 7.3T 0 raid1 /sensordata sdd 8:48 0 7.3T 0 disk └─sdd1 8:49 0 7.3T 0 part └─md1 9:1 0 7.3T 0 raid1 /sensordata # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 315G 22G 277G 8% / /dev/sdb1 440G 71M 418G 1% /data /dev/md1 7.3T 271M 6.9T 1% /sensordata # ls -al /data total 24 drwxr-xr-x 3 root root 4096 Jul 12 2019 . drwxr-xr-x 24 root root 4096 Aug 29 15:19 .. drwx------ 2 root root 16384 Jul 12 2019 lost+found # boot using ubuntu 20 desktop image > live # update apt repo # apt install dump # after resize partion using gparted # lsblk /dev/sda NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 447.1G 0 disk ├─sda1 8:1 0 25G 0 part / ├─sda2 8:2 0 1K 0 part └─sda5 8:5 0 127.9G 0 part [SWAP] # dump -0uf /data/144-u20-siot-sda1-ext4.dump /dev/sda1 # finding missing file # mount /dev/sda1 /mnt/144 # cd /mnt/144 # tar cvf 144-u20-siot-sda1-missing.tar \ ./root/the-things-stack/.env/data/cockroach/logs/cockroach.1c6de5250b5c.root.2021-06-02T01_23_17Z.000001.log \ ./root/the-things-stack/.env/data/cockroach/logs/cockroach-pebble.84cf7ca90fe7.root.2021-06-02T01_28_31Z.000001.log \ ./root/.cache/go-build/5f/5fb6bae581d50f79d52eb63a20fa0b0d0b160445f689f7426f91015bbfcc943c-a \ ./root/go/lorawan-stack/.env/data/cockroach/logs/heap_profiler/memprof.2021-06-01T08_04_27.767.25543160.pprof \ ./root/go/lorawan-stack/.env/data/cockroach/MANIFEST-000021 # scp 144-u20-siot-sda1-ext4.dump 191-u20-restore:~ # scp 144-u20-siot-sda1-missing.tar 191-u20-restore:~ |
...