Last active
September 17, 2024 15:12
-
-
Save amatus/d8aca74aecebd9f810e3 to your computer and use it in GitHub Desktop.
Convert WD My Book Live from old iscsi mode to new ceph osd mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get -y purge iscsitarget | |
vi /etc/network/interfaces | |
cat > /etc/fstab << EOF | |
# /etc/fstab: static file system information. | |
# | |
# Use 'blkid' to print the universally unique identifier for a | |
# device; this may be used with UUID= as a more robust way to name devices | |
# that works even if disks are added and removed. See fstab(5). | |
# | |
# <file system> <mount point> <type> <options> <dump> <pass> | |
/dev/sda3 none swap sw 0 0 | |
EOF | |
reboot | |
scp drive0.local:"/boot/uImage /boot/apollo3g.dtb" /boot/ | |
scp -r drive0.local:/lib/modules/3.16.7+ /lib/modules/ | |
reboot | |
cat > /etc/apt/sources.list << EOF | |
deb http://http.debian.net/debian wheezy main | |
deb http://http.debian.net/debian jessie main | |
deb http://security.debian.org/ wheezy/updates main | |
deb http://http.debian.net/debian/ wheezy-updates main | |
deb http://http.debian.net/debian wheezy-backports main | |
EOF | |
cat > /etc/apt/preferences << EOF | |
Package: * | |
Pin: release n=jessie | |
Pin-Priority: -10 | |
EOF | |
apt-get update | |
apt-get install -y debian-keyring debian-archive-keyring | |
apt-get dist-upgrade -y | |
apt-get autoremove -y | |
apt-get install -y -t jessie libgoogle-perftools4 | |
apt-get install -y -t wheezy-backports btrfs-tools libleveldb1 | |
apt-get install -y python-requests binutils cryptsetup-bin gdisk parted hdparm uuid-runtime xfsprogs \ | |
libaio1 libnspr4 libnss3 libudev1 python-flask libboost-program-options1.49.0 \ | |
libboost-system1.49.0 libboost-thread1.49.0 | |
scp drive0.local:"*.deb" . | |
dpkg -i *.deb | |
scp drive0.local:/etc/ceph/ceph.conf /etc/ceph/ | |
scp drive0.local:/var/lib/ceph/bootstrap-osd/ceph.keyring /var/lib/ceph/bootstrap-osd/ | |
wipefs -o 0x10040 /dev/sda4 | |
ceph-disk prepare --cluster ceph --cluster-uuid `ceph-conf --lookup fsid` --fs-type btrfs /dev/sda4 | |
ceph-disk activate /dev/sda4 | |
grep /var/lib/ceph/osd /proc/mounts >> /etc/fstab | |
touch /var/lib/ceph/osd/*/sysvinit | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment