The firewall was turned on, then the SSH connection was blocked, and I disconnected from the server again

0

I opened the firewall, the 22 port of ssh was blocked, I don't know, opened ftp and the connection to the server was broken. Now I can't log in to turn off the firewall, according to the Internet, you can attach its hard disk to another server, and then modify the configuration file, but after I hung up, I found that I couldn't open the hard disk at all, to check and say what needs to be formatted, or there is no file system, to create a file system, and there is a prompt, if there is original data, it will be formatted. I just want the data inside, I want to connect back, I want to mount to other services, and see if I can shut down the server.

asked a year ago262 views
1 Answer
0
Accepted Answer
profile picture
EXPERT
answered a year ago
  • Step three I was in trouble. I don't know how to create a file system for a partition, like: NAME FSTYPE LABEL UUID MOUNTPOINT xvdf
    ├─xvdf1 ext4 1.0 cloudimg-rootfs cda0c0a7-e64a-4413-85a5-a0235f6f567f
    ├─xvdf14
    └─xvdf15 vfat FAT32 UEFI 54D6-C8B8 You can see that xvdf14 does not have a file system, how can I do it? The case only says that if there is no file system, it is created: sudo mkfs -t xfs /dev/xvdf

  • But that's for all of it (I mean, if you're using xvdf, then xvdf1 xvdf14 xvdf15 will all create xfs filesystems, but sort of partitions already have filesystems)? I also tried this command, but it shows mkfs.xfs: /dev/xvdf appears to contain a partition table (gpt). mkfs.xfs: Use the -f option to force overwrite.

    After that I tried adding a file system for that partition separately: sudo mkfs -t xfs /dev/xvdf/xvdf14 display Error accessing specified device /dev/xvdf/xvdf14: Not a directory I don't know how to add a separate file system for a partition, and the tutorial doesn't tell you how to add a separate file system for a partition, or if some subpartitions (like my example above) have a file system, then the large partition does not need a file system? I'm stuck in step three, prompting when I perform mount wrong fs type, bad option, bad superblock on /dev/xvdf, missing codepage or helper program, or other error.

  • When mounting the EBS that contains the data, do not execute commands that set up the file system.
    As noted in the documentation, the data will be lost.

    Do not use this command if you're mounting a volume that already has data on it (for example, a volume that was created from a snapshot). Otherwise, you'll format the volume and delete the existing data.

    If you mount it according to the original file system, it should be fine.

    mount -t ext4 /dev/xvdf /mnt/temp
    
  • I used this command and then prompted:

    sudo mount -t ext4 /dev/xvdf /mnt/temp
    mount: /mnt/temp: /dev/xvdf already mounted or mount point busy.
    

    when I use:

    sudo fuser -mv /mnt/temp
    

    It prompted:

                         USER        PID ACCESS COMMAND
    /mnt/temp:           root     kernel mount /
                         root          1 .rce. systemd
                         root          2 .rc.. kthreadd
                         root          3 .rc.. rcu_gp
                         root          4 .rc.. rcu_par_gp
                         root          5 .rc.. slub_flushwq
                         root          6 .rc.. netns
                         root          7 .rc.. kworker/0:0-events
                         root          8 .rc.. kworker/0:0H-events_highpri
                         root          9 .rc.. kworker/u30:0-events_power_efficient
                         root         10 .rc.. mm_percpu_wq
                         root         11 .rc.. rcu_tasks_rude_kthread
                         root         12 .rc.. rcu_tasks_trace_kthread
                         root         13 .rc.. ksoftirqd/0
                         root         14 .rc.. rcu_sched
                         root         15 .rc.. migration/0
                         root         16 .rc.. idle_inject/0
                         root         18 .rc.. cpuhp/0
                         root         20 .rc.. inet_frag_wq
                         root         21 .rc.. kauditd
                         root         22 .rc.. khungtaskd
                         ...
    
  • But when I use:

    cd /mnt/temp
    

    and

    ls
    

    There is nothing

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions