page

Showing posts with label mount. Show all posts
Showing posts with label mount. Show all posts

Nov 22, 2018

Mount disks with HFS+ volumes ( used in Mac OS) in CentOS

http://opensysblog.directorioc.net/2015/07/centos-mount-disks-with-hfs-volumes.html
https://www.centos.org/forums/viewtopic.php?t=67360


https://askubuntu.com/questions/332315/how-to-read-and-write-hfs-journaled-external-hdd-in-ubuntu-without-access-to-os

$ sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
$ sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
$ sudo yum install kmod-hfsplus
$ sudo yum install kmod-hfs 
$ sudo yum install hfsplus-tools

after install, you might need reboot
 
By default, the partition will be mounted in read-only mode
use force option to activate read-write mode

$ sudo mount -t hfsplus -o force -o rw /dev/sdc2 /media/disk1/

Nov 12, 2018

Add a New Disk Larger Than 2TB to An Existing Linux

see more details in
https://www.tecmint.com/add-disk-larger-than-2tb-to-an-existing-linux/


# list current partitions

[lee@hwang29 ~]$ sudo fdisk -l




# move to disk
[lee@hwang29 ~]$ sudo fdisk /dev/sda


 
d : delete a partition  # deletes the partition. It will delete the data on the disk
w : write table to disk and exit

# write partition with parted
[lee@hwang29 ~]$ sudo parted /dev/sda

(parted) mklabel gpt   # set partition table format to GPT (GUID Partition Table)
(parted) mkpart primary 0GB 3000GB # create primary partition, assaing disk capacity
(parted) quit


# Creating an ext4 File System
[lee@hwang29 ~]$ sudo mkfs.ext4 /dev/sda

# mount disk
[lee@hwang29 ~]$ sudo mount /dev/sda /data_1

# add entry to /etc/fstab for permanent mounting
[lee@hwang29 ~]$ vim /etc/fstab
/dev/sda    /data_1    ext4    defaults    0    0


tip for naming the disk
- /dev/disk/by-id/scsi-SATA_ModelName_partion1 instead of  /dev/disk/sda
- if you are using multiple disk/partition and one of them is failed, it is easy to identify which disk and partition goes wrong
- if you change, add, move disk, it might cause problems because other disk already use name sda, sdb

Nov 7, 2018

mount iso file in linux

https://askubuntu.com/questions/164227/how-to-mount-an-iso-file


  1. Create a directory to serve as the mount location:
    sudo mkdir /mnt/iso
    
  2. Mount the ISO in the target directory:
    sudo mount -o loop path/to/iso/file/YOUR_ISO_FILE.ISO /mnt/iso
    
  3. Unmount the ISO:
    sudo umount /mnt/iso