- Intro
- Notes
- Källor
Intro
These are my partitioning notes.
Sources, if any, are listed inline.
Notes
The primary GPT table is corrupt, but the backup appears OK, so that will be used
https://askubuntu.com/questions/386752/fixing-corrupt-backup-gpt-table
How to: CentOS 6 - Creating Larger than 2TB Partition with PARTED
https://www.atlantic.net/cloud-hosting/how-to-centos-6-creating-larger-2tb-partition-parted/
Fdisk doesn't work with partitions larger than 2 TB. Use parted instead.
# parted -a optimal /dev/sdb
> mklabel gpt
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost.Do you want to continue? Yes/No? Y
> mkpart primary ext4 0% 100%
Alternatives for two similarly sized partitions
> mkpart primary ext3 0% 50%
> mkpart primary ext4 50% 100%
Model: Msft Virtual Disk (scsi) Disk /dev/sdb: 3TB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 1049kB 3TB 3TB primary raid
Avsluta med q.
> q
#
Setting Up RAID 10 or 1+0 (Nested) in Linux - Part 6
https://www.tecmint.com/create-raid-10-in-linux/
Linux Hard Disk Format Command
https://www.cyberciti.biz/faq/linux-disk-format/
Various format options.
# mkfs.ext3 /dev/sdb1
# mkfs.ext4 /dev/sdb1
# mkfs.xfs /dev/sdb1
# mkdir /disk1
# mount /dev/sdb1 /disk1
# df -H
# e2label /dev/sdb1 /backup
Skriva ISO-avbildningar till USB
$ sudo dd if=veeam-recovery-media-3.0.2.iso of=/dev/sdf
$ sudo dd if=proxmox-ve_6.1-1.iso of=/dev/sdf bs=1M
Montera externa USB-enheter
Av nån anledning monteras externa usb-enheter av root på Ubuntu. Detta gör att vanliga användare inte kan skriva till enheten.
Enligt webben kan detta bero på vem som formatterar den externa enheten. Se de två alternativen nedan.
Alternativ 1
$ sudo id -u sorin
1000
Avmontera usb-enheten med din filhanterare eller "umount /media/sorin/sorin.500GB".
OBS! Nästa kommando kommer att radera hela enheten!
$ sudo mkfs.ext4 /dev/sdc1 -E root_owner=1000:1000
Notera att sdc1 kan vara något annat på ditt system!
När klart, montera som vanligt.
Alternativ 2
$ sudo chown -Rv sorin.sorin /media/sorin/
changed ownership of '/media/sorin/sorin.500GB/lost+found' from root:root to sorin:sorin
changed ownership of '/media/sorin/sorin.500GB' from root:root to sorin:sorin
changed ownership of '/media/sorin/' from root:root to sorin:sorin
Montera som vanligt efter ägarändringen.
Det är lite oklart om denna ändring kommer att följa med, om man monterar den externa usb-enheten på en annan dator. YYMV...
Källor
https://unix.stackexchange.com/questions/109723/how-portable-are-the-works-chmod-and-chown-commands