How to save data and run the server again / Ubuntu16.04?


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers How to save data and run the server again / Ubuntu16.04?
# 1  
Old 04-29-2019
How to save data and run the server again / Ubuntu16.04?

Hello,
I am running ubuntu 16.04 and I have rented a server three days ago.
I am with OVH and during image installation I did not merge hdd partitions, just proceed with custom installation configuration.
Today I rebooted and server went offline.
Company says: "Connect in rescue mode and check the possible reasons."
But I do not know how to proceed.
I'd appreciate your help.


Extra Info:

root@rescue:~# cat /proc/mdstat
Code:
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
md2 : active raid1 sda2[0] sdb2[1]
      1047488 blocks [2/2] [UU]

md3 : active raid1 sda3[0] sdb3[1]
      82226112 blocks [2/2] [UU]

md4 : active raid1 sda4[0] sdb4[1]
      3822690240 blocks [2/2] [UU]
      bitmap: 0/29 pages [0KB], 65536KB chunk

unused devices: <none>

root@rescue:~# fdisk -l
Code:
Disk /dev/ram0: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram1: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram2: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram3: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram4: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram5: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram6: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram7: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram8: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram9: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram10: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram11: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram12: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram13: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram14: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/ram15: 50 MiB, 52428800 bytes, 102400 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk /dev/sda: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E0C93F06-7ADC-4E84-A797-D1CB307F0F28

Device          Start        End    Sectors  Size Type
/dev/sda1        2048    1048575    1046528  511M EFI System
/dev/sda2     1048576    3143679    2095104 1023M Linux RAID
/dev/sda3     3143680  167596031  164452352 78.4G Linux RAID
/dev/sda4   167596032 7812976639 7645380608  3.6T Linux RAID
/dev/sda5  7812976640 7814023167    1046528  511M Linux swap

Disk /dev/sdb: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0A3AD712-C9F7-4521-B0D6-233FF9A28323

Device          Start        End    Sectors  Size Type
/dev/sdb1        2048    1048575    1046528  511M EFI System
/dev/sdb2     1048576    3143679    2095104 1023M Linux RAID
/dev/sdb3     3143680  167596031  164452352 78.4G Linux RAID
/dev/sdb4   167596032 7812976639 7645380608  3.6T Linux RAID
/dev/sdb5  7812976640 7814023167    1046528  511M Linux swap

Disk /dev/md4: 3.6 TiB, 3914434805760 bytes, 7645380480 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md3: 78.4 GiB, 84199538688 bytes, 164452224 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md2: 1023 MiB, 1072627712 bytes, 2094976 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Code:
root@rescue:~# mount /dev/md2 /mnt
root@rescue:~# cd /mnt/
root@rescue:/mnt# chroot /mnt
chroot: failed to run command ‘/bin/bash': No such file or directory

Thank you
Boris

Last edited by baris35; 04-29-2019 at 03:59 PM.. Reason: extra info added
# 2  
Old 04-29-2019
It needs /mnt/bin/bash to be present, or some other shell you specify like chroot /mnt /bin/sh

If /dev/md2 is not a "root directory", chroot will not work. Or you may need to mount further partitions inside /mnt. What does ls /mnt show? What ought to be in the other partitions?
# 3  
Old 04-29-2019
Thank you,
Is this a simple process to save data or more complicated?


Code:
root@rescue:/mnt# ls
config-4.9.168-xxxx-std-ipv6-64  initrd.img-4.9.168-xxxx-std-ipv6-64
efi                              System.map-4.9.168-xxxx-std-ipv6-64
grub                             vmlinuz-4.9.168-xxxx-std-ipv6-64
root@rescue:/# chroot /mnt /bin/sh
chroot: failed to run command ‘/bin/sh': No such file or directory

# 4  
Old 04-29-2019
I think that chroot wants /bin/bash or /bin/sh relative to /mnt i.e. /mnt/bin/bash or /mnt/bin/sh.
It only makes sense if it hold the OS.
But your /dev/md2 is not the OS disk (it looks like a /boot disk). Try to mount /dev/md3 instead (umount first).
# 5  
Old 04-29-2019
Thank you MadeInGermany,
Did not work. Then I call many ovh partner from Usa to Canada, Colombia to Brazil, Spain to France and Scandinavian counties, non of them responded.
Then, I reinstalled everything from scratch. I also received installation errors during new image installation and the company does not accept any failure message pop out on my screen. They say "that is not within the framework of our responsibility"
Lesson learnt: Backup all the time, do not trust any company.
I also had did it earlier but installation of codes will take too much time.
I will mark as "solved"

Thank you
Boris
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run sql query in shell script and output data save as delimited text

I want to run sql query in shell script and output data save as delimited text (delimited text would be comma) Code: SPOOL_FILE=/pgedw/dan.txt SQL=/pgedw/dan.sql sqlplus -s username/password@myhost:port/servicename <<EOF set head on set COLSEP , set linesize 32767 SET TRIMSPOOL ON SET... (8 Replies)
Discussion started by: Jaganjag
8 Replies

2. UNIX for Dummies Questions & Answers

Get a data and save

If I have a A.log 1 Air Flow Monitor : 34.070 Degrees C 2 Air Flow Monitor : 41.730 Degrees C 3 Air Flow Monitor : 35.340 Degrees C 4 Air Flow Monitor : 33.370 Degrees C 5 Air Flow Monitor : 36.770 Degrees C 6 Air Flow Monitor : 45.910 Degrees C 7 Air Flow Monitor ... (1 Reply)
Discussion started by: sabercats
1 Replies

3. UNIX for Advanced & Expert Users

How to save a data of a file into a variable?

My requirement is to read a column data from a file & save it in a variable for each row & process it. I am using the below code- Leadlines="$TGTFILE/Error.txt">>$log_file while read line do id = ` echo $line | cut -d "," -f1 ` email = ` echo $line | cut -d "," -f2 ` ----------- done My... (2 Replies)
Discussion started by: saga20
2 Replies

4. UNIX for Dummies Questions & Answers

How to save and run a list of commands?

Dear every one, I am working with the data of my lab program and I have to do many times by the same list of some commands (grep, then save to file, then use awk to delete odd lines, save to file, use awk to delete even lines, save to file...). Is there any way to save a list of command which I... (4 Replies)
Discussion started by: phamnu
4 Replies

5. Shell Programming and Scripting

Get Permissions and save to data

Hi all; I have the following code which gives me kind of what I need: #!/usr/bin/perl use Fcntl ':mode'; # if ($ARGV ne "") { $filename = $ARGV; } else { print "Please specify a file!\n"; exit; } # if... (2 Replies)
Discussion started by: gvolpini
2 Replies

6. Shell Programming and Scripting

Save the output of the command run as other user

Dear All, I am writing a script and kind of stuck in a small thing. Cannot figure it out. so please help I am logged in as root user. I want to switch user to "user1" inside the script and execute a specific command lets say "pwd" and come back where i started. I know how to switch user,... (16 Replies)
Discussion started by: suhail.sadaqat
16 Replies

7. UNIX Desktop Questions & Answers

Why can't I save a VI file after entering data?

Hi I am new to linux, when I typed "vi FILE1" I was able to open VI editor. I added some data and I want to save the file and I tried :w but it threw me an error. "file1" E212: Can't open file for writing Press ENTER or type command to continue why I am not able to save it? I read it... (16 Replies)
Discussion started by: chinnanji
16 Replies

8. Homework & Coursework Questions

Option to save data thats displayed?

Im trying to come up with a simple shell script to display info about the current user.`pwd`; `date` ; `who am i` I want to give the option to save all the data thats display by the commands to a log file. With a timestamp as the name of the file This is where im stuck echo "Would you like to... (3 Replies)
Discussion started by: eddieq20
3 Replies

9. Linux

Configure apache to run with perl ... while running from browser it asks to save .pl

I have installed fedora 9 and trying to run .pl (perl files) from browser. I have below RPM installed: ---------------------------------- httpd-2.2.8-3.i386 mod_perl-2.0.3-21.i386 $cat /etc/httpd/conf.d/perl.conf LoadModule perl_module modules/mod_perl.so Alias /perl /var/www/perl... (4 Replies)
Discussion started by: sriram003
4 Replies

10. Filesystems, Disks and Memory

Can ZFS Save my Data

Hello, Our RAID and server recently crashed and we are trying to recover our data. The problem appears to be that the Veritas File System/Logical Volume Manger became corrupt on our RAID. We are down to our last option, which is to run some Veritas commands that "may" result in data loss. ... (1 Reply)
Discussion started by: stringman
1 Replies
Login or Register to Ask a Question