Koozali.org: home of the SME Server

Contribs.org Forums => Koozali SME Server 10.x => Topic started by: calisun on June 19, 2021, 11:29:04 AM

Title: Trying to backup 9.2 to USB Drive
Post by: calisun on June 19, 2021, 11:29:04 AM
I bought a new 2TB USB drive to backup my server in preparation to upgrade to SME10.
At first I was unable to mount the drive since it was NTSF, so I had to reformat as FAT32.
Once FAT32, I was able to mount:
mount /dev/sdc1 /etc/usb
After I SSH logged in as Admin, I chose option 8 (perform backup to removable media) I got a following error screen: (Please advise)
Title: Re: Trying to backup 9.2 to USB Drive
Post by: brianr on June 19, 2021, 12:14:13 PM
I may be wrong, but I don't think you should have the USB drive mounted when you try to do the backup.
Title: Re: Trying to backup 9.2 to USB Drive
Post by: TerryF on June 19, 2021, 02:26:46 PM
No do not mount the drive
Title: Re: Trying to backup 9.2 to USB Drive
Post by: calisun on June 20, 2021, 04:54:04 AM
If I just plug in the drive, when I initiated the option 8, it sits there for a while than it tells me that no drive is found.
Title: Re: Trying to backup 9.2 to USB Drive
Post by: sages on June 20, 2021, 05:26:04 AM
I'd format the drive with ext3 or 4. You're doing a native linux backup not a dos/windoze backup. Definitely wouldn't be using fat or ntfs but that's a personnel preference.
Log onto the server and run tail /var/log/messages as you plug the drive in and see what it says. ie is it recognising the drive.
Title: Re: Trying to backup 9.2 to USB Drive
Post by: TerryF on June 20, 2021, 07:15:53 AM
If the system sees the USb drive but has an issue with the file system it will list it and error will be FS

I did a system recently with a 2tb USB HD and used straight FAT, my home system I use ext3 on a 1tb USB HD

Some USB HD do have issues being recognised

You could check if is being seen and what is seen...

[root@sme10final ~]# blkid
/dev/sr0: UUID="2021-06-07-20-19-10-00" LABEL="SME Server" TYPE="iso9660" PTTYPE="dos"
/dev/sda1: LABEL="BOOT" UUID="2c0b797e-3b1a-4489-94d3-e7ec36475233" TYPE="xfs"
/dev/sda2: LABEL="SWAP" UUID="3366581b-3133-47d6-a4f0-90d37616dc02" TYPE="swap"
/dev/sda3: LABEL="ROOT" UUID="f0c027df-166f-4607-a349-c7a16be02aff" TYPE="xfs"

[root@sme10final ~]# lsblk
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0   15G  0 disk
├─sda1   8:1    0  500M  0 part /boot
├─sda2   8:2    0  1.5G  0 part [SWAP]
└─sda3   8:3    0   13G  0 part /
sr0     11:0    1  1.4G  0 rom

Edit, ext3 not ext2
Title: Re: Trying to backup 9.2 to USB Drive
Post by: calisun on June 20, 2021, 07:36:40 AM
I re-formatted the drive in ext4,
Plugged it in without mounting,
Run option 8 and got attached error screen:

As requested, when running:
blkid
/dev/sdc1: LABEL="WD Elements" UUID="fa32208e-d886-43c9-97d1-007a29c47fe7" TYPE="ext4"

lsblk
sdc                      8:32   0  1.8T  0 disk 
└─sdc1                   8:33   0  1.8T  0 part 
Title: Re: Trying to backup 9.2 to USB Drive
Post by: sages on June 20, 2021, 07:51:02 AM
What is in the /var/log/messages and/or dmesg?
Depending upon what you see I'd also look at repartioning the drive and reformat. To me it seems like something low level on the drive that is tripping things up.
In sme9 ext3 is the default format so no reason why it shouldn't mount due to drive format so that leaves partitioning as a possibility.
Plug the drive in, check /var/log/messages to see what it says, then do a manual mount of the drive from the command line.
Read this howto https://wiki.koozali.org/USBDisks it's worked for me on several usb disks
Title: Re: Trying to backup 9.2 to USB Drive
Post by: calisun on June 20, 2021, 08:00:58 AM
when looking at messages, I see this:

Jun 19 22:18:34 home-ser kernel: usb 1-8: new high speed USB device number 3 using ehci_hcd
Jun 19 22:18:34 home-ser kernel: usb 1-8: New USB device found, idVendor=1058, idProduct=2621
Jun 19 22:18:34 home-ser kernel: usb 1-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jun 19 22:18:34 home-ser kernel: usb 1-8: Product: Elements 2621
Jun 19 22:18:34 home-ser kernel: usb 1-8: Manufacturer: Western Digital
Jun 19 22:18:34 home-ser kernel: usb 1-8: SerialNumber: 57584D324132313456464132
Jun 19 22:18:34 home-ser kernel: usb 1-8: configuration #1 chosen from 1 choice
Jun 19 22:18:34 home-ser kernel: scsi5 : SCSI emulation for USB Mass Storage devices
Jun 19 22:18:35 home-ser kernel: scsi 5:0:0:0: Direct-Access     WD       Elements 2621    1030 PQ: 0 ANSI: 6
Jun 19 22:18:35 home-ser kernel: sd 5:0:0:0: Attached scsi generic sg2 type 0
Jun 19 22:18:38 home-ser kernel: sd 5:0:0:0: [sdc] Spinning up disk......ready
Jun 19 22:18:38 home-ser kernel: sd 5:0:0:0: [sdc] 3906963456 512-byte logical blocks: (2.00 TB/1.81 TiB)
Jun 19 22:18:38 home-ser kernel: sd 5:0:0:0: [sdc] Write Protect is off
Jun 19 22:18:38 home-ser kernel: sd 5:0:0:0: [sdc] Assuming drive cache: write through
Jun 19 22:18:38 home-ser kernel: sd 5:0:0:0: [sdc] Assuming drive cache: write through
Jun 19 22:18:38 home-ser kernel: sdc: sdc1
Jun 19 22:18:38 home-ser kernel: sd 5:0:0:0: [sdc] Assuming drive cache: write through
Jun 19 22:18:38 home-ser kernel: sd 5:0:0:0: [sdc] Attached SCSI disk
Jun 19 22:18:38 home-ser ata_id[8137]: HDIO_GET_IDENTITY failed for '/dev/sdc'
Jun 19 22:20:56 home-ser kernel: EXT4-fs (sdc1): couldn't mount RDWR because of unsupported optional features (400)
Title: Re: Trying to backup 9.2 to USB Drive
Post by: sages on June 20, 2021, 08:15:30 AM
Check the partioning type, I suspect you have the type set to dos/fat and now it's formatted as ext4.
Nuke the partitioning on the usb drive, repartition, default partition type should be linux (guessing fd00) then reformat ext4.
follow instructions in link in my previous post.
[edit] just the partioning and format part
Title: Re: Trying to backup 9.2 to USB Drive
Post by: Jean-Philippe Pialasse on June 20, 2021, 11:31:09 AM
Quote
Jun 19 22:20:56 home-ser kernel: EXT4-fs (sdc1): couldn't mount RDWR because of unsupported optional features (400)

you did say you used ext4, but with what did you format to ext4 ?

ext4 has been redefined multiple time since the creation of SME 9 / CentOS 6 /RHEL 6....
some of the options of ext4 are not available on SME9 and make the partition not recognizable if you have formatted in ext4 using a newer OS like a fresh Ubuntu or Fedora....
Please use the SME to format as ext4 or use ext3 if you want to format from a different machine.
Title: Re: Trying to backup 9.2 to USB Drive
Post by: ReetP on June 20, 2021, 11:37:16 AM
Do you even need journalling on a backup USB drive?
Title: Re: Trying to backup 9.2 to USB Drive
Post by: sages on June 20, 2021, 03:31:05 PM
Do you even need journalling on a backup USB drive?
That might be technically correct but it won't hurt or prevent the USB drive from being mounted. The OP is just trying to get his drive to mount so he can backup then upgrade.
At least following the wiki will get his drive into a known working state.
[edit] googling the error message suggests that JPP is on the right path.
Format the drive in ext3 and/or use the sme9 system to do the formatting.
Title: Re: Trying to backup 9.2 to USB Drive
Post by: calisun on June 21, 2021, 03:39:08 AM
you did say you used ext4, but with what did you format to ext4 ?

ext4 has been redefined multiple time since the creation of SME 9 / CentOS 6 /RHEL 6....
some of the options of ext4 are not available on SME9 and make the partition not recognizable if you have formatted in ext4 using a newer OS like a fresh Ubuntu or Fedora....
Please use the SME to format as ext4 or use ext3 if you want to format from a different machine.

You are correct, I am using laptop with Linux Mint to format.
I re-formatted to ext3 and it recognized the drive and started the backup.
Thank you.
Title: Re: Trying to backup 9.2 to USB Drive
Post by: Jean-Philippe Pialasse on June 21, 2021, 05:10:42 AM
[edit] googling the error message suggests that JPP is on the right path.
been there, done that.
was with a proxmox formatting  thin-lvm partition in ext4 to transfer data to a SME9 ....
Title: Re: Trying to backup 9.2 to USB Drive
Post by: calisun on June 21, 2021, 06:31:39 AM
Once again, thank you all for your help, much appreciated.

I do have one question,
why is the "perform backup to removable media" option not available inside Server-Manager, in the "Backup or restore server data" section, but it is only visible when one SSH as Admin?
Title: Re: Trying to backup 9.2 to USB Drive
Post by: Jean-Philippe Pialasse on June 21, 2021, 08:02:18 AM
Once again, thank you all for your help, much appreciated.

I do have one question,
why is the "perform backup to removable media" option not available inside Server-Manager, in the "Backup or restore server data" section, but it is only visible when one SSH as Admin?

that is a good question...

probably for the very same reason there is not yet an automatic backup when you plug your drive  https://bugs.koozali.org/show_bug.cgi?id=4742

or why there is no manual workstation backup https://bugs.koozali.org/show_bug.cgi?id=5702

.... missing developer time

and also because the NFR has not been raised against e-smith-backup : https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=NEEDINFO&bug_status=IN_PROGRESS&bug_status=RESOLVED&bug_status=VERIFIED&cf_package=e-smith-backup&classification=SME%20Server&component=Build&component=Cleanup&component=Console&component=e-smith-%2A%2Fsmeserver-%2A%20packages&component=Installer&component=Kernel%20modules&component=New%20Feature%20Request&component=Security&component=server-manager&component=Translations&component=Unknown&component=Webmail&list_id=94600&product=SME%20Server%2010.X&product=SME%20Server%208.X&product=SME%20Server%209.X&product=SME%20Server%20Future&resolution=---&resolution=FIXED&saved_report_id=11

so first you could raise the NFR bug ;)