where is Proxmox /etc/pve/firewall/cluster.fw

WebShark25

New Member
Apr 19, 2016
5
0
1
40
Hi.

actually, im having an OVH Dedicated server
So, I ACCIDENTALY turned on firewall, and It did such a mess.
So, i went into rescue mode.

Now, I Want to know where is the "/etc/pve/firewall/cluster.fw" file?

I have 2x2 SATA (Softraid 1).
fdisk -l :

Disk /dev/sda: 1.8 TiB, 2000398934016 bytes, 3907029168 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
Disklabel type: gpt
Disk identifier: 35A43852-EDDD-4055-99E5-B99F98CA219F

Device Start End Sectors Size Type
/dev/sda1 40 2048 2009 1004.5K BIOS boot
/dev/sda2 4096 40962047 40957952 19.5G Linux RAID
/dev/sda3 40962048 43057151 2095104 1023M Linux RAID
/dev/sda4 43057152 3907018751 3863961600 1.8T Linux RAID

Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 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
Disklabel type: gpt
Disk identifier: A28DC9FF-648E-4825-8472-A1E163D41769

Device Start End Sectors Size Type
/dev/sdb1 40 2048 2009 1004.5K BIOS boot
/dev/sdb2 4096 40962047 40957952 19.5G Linux RAID
/dev/sdb3 40962048 43057151 2095104 1023M Linux swap
/dev/sdb4 43057152 3907018751 3863961600 1.8T Linux RAID

Disk /dev/md4: 1.8 TiB, 1978348273664 bytes, 3863961472 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/mapper/pve-data: 1.8 TiB, 1974049177600 bytes, 3855564800 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/md2: 19.5 GiB, 20953694208 bytes, 40925184 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
Disklabel type: dos
Disk identifier: 0x2052474d

Device Boot Start End Sectors Size Id Type
/dev/md2p1 ? 6579571 1924427647 1917848077 914.5G 70 DiskSecure Multi-Boot
/dev/md2p2 ? 1953251627 3771827541 1818575915 867.2G 43 unknown
/dev/md2p3 ? 225735265 225735274 10 5K 72 unknown
/dev/md2p4 2642411520 2642463409 51890 25.3M 0 Empty

Partition 2 does not start on physical sector boundary.

Partition 3 does not start on physical sector boundary.

Partition 4 does not start on physical sector boundary.


Partition table entries are not in disk order.




(I Have read more than 100 pages, and tried them all. including https://forum.proxmox.com/threads/ovh-proxmox-root-password-recover-help-please.15394/)

So, At first i could access /dev/md2 (it was /dev/sdb2 and /dev/sda2 ?) BUT when i chroot ed and i went to /etc/pve , there was no /firewall directory. (when Proxmox was OK, in web interface, it was showing the storage as "ROOT" storage)

So, accidentally i stopped the /dev/md2 , but there is another /dev/md4 (/dev/sdb4 and /dev/sda4) that is 1.8TB (in Proxmox VE it was showing that my local storage). but i can't chroot it.
I tried :
root@rescue:~# mount /dev/md4 /mnt/
mount: unknown filesystem type 'LVM2_member' (SEE it didnt worked. So i used:)
root@rescue:~# mount /dev/pve/data /mnt/
and it worked, but showing "chroot failed to run command /bin/bash...."
But when i do cd /mnt/images , my VMs are there.

So, after i accidentaly removed /dev/md2 , I tried to make it again:
mdadm --create /dev/md2 --level=raid1 --raid-devices=2 /dev/sdb2 /dev/sda2 (I forgot the original command...) And it worked successfully, but when i tried to mount it:

mount: /dev/md2 is write-protected, mounting read-only
NTFS signature is missing.
Failed to mount '/dev/md2': Invalid argument
The device '/dev/md2' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?


Then, i tried changing the UUID on: /etc/mdadm/mdadm.conf (i think), but didnt worked either.
at last, i tried mkntfs /dev/md2 ........................ Then i could mount it. But no files.

--UPDATE--
also read https://forum.proxmox.com/threads/root-password-reset-proxmox-ve-1-9.10280/ .
there is no /dev/pve/root . only /dev/pve/data is available. no other.
--END OF UPDATE--

What to do!?!?!
Its so urgunt help please..
thanks
 
Last edited:
the /etc/pve/... directory is pmxcfs, see more details on:

http://pve.proxmox.com/wiki/Proxmox_Cluster_file_system_(pmxcfs)
Now Im on rescue mode, What I need to install and what i need to do to edit the firewall file!??

OR:
How should i get backup of "example" VM ID 105? its IMAGE is about 120GB !!! but used space is about 5-6 GB. i need the files used. like the 'backup' button in proxmox VE interface.
What should i install and what should i do to get backup of the files of VM ID 105?
 
you could set a systemd timer or cronjob from your rescue system that disables the firewall ("pve-firewall stop") after booting the regular system. then you can reboot, wait for the cron job/timer/.. to trigger, ssh in, fix the FW settings and then disable the timer/cron job again (and start the firewall ;))
 
  • Like
Reactions: WebShark25
In rescue mode you should actually be able to run `pmxcfs -l` (local mode) and then modify/delete files in `/etc/pve/firewall/`. (Alternatively you can use the sqlite3 cli tool to modify /var/lib/pve-cluster/config.db, but back up the file first.)
 
Ok thx for replies, i just used the cron job way and it worked .
but as i made some edits, some of files were corrupt. No problem i fixed them.
Thanks :-)