{"action":"created","issue":{"url":"https://api.github.com/repos/ceph/ceph-ansible/issues/9","labels_url":"https://api.github.com/repos/ceph/ceph-ansible/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/ceph/ceph-ansible/issues/9/comments","events_url":"https://api.github.com/repos/ceph/ceph-ansible/issues/9/events","html_url":"https://github.com/ceph/ceph-ansible/issues/9","id":28892790,"number":9,"title":"Ability to manage LVM journals","user":{"login":"leseb","id":912735,"avatar_url":"https://avatars.githubusercontent.com/u/912735?v=3","gravatar_id":"","url":"https://api.github.com/users/leseb","html_url":"https://github.com/leseb","followers_url":"https://api.github.com/users/leseb/followers","following_url":"https://api.github.com/users/leseb/following{/other_user}","gists_url":"https://api.github.com/users/leseb/gists{/gist_id}","starred_url":"https://api.github.com/users/leseb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leseb/subscriptions","organizations_url":"https://api.github.com/users/leseb/orgs","repos_url":"https://api.github.com/users/leseb/repos","events_url":"https://api.github.com/users/leseb/events{/privacy}","received_events_url":"https://api.github.com/users/leseb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ceph/ceph-ansible/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2014-03-06T16:30:57Z","updated_at":"2015-07-13T18:14:22Z","closed_at":null,"body":"I believe there is a use case behind the lvm journals.\r\nFor instance you can do:\r\n\r\n2 SSDs:\r\n\r\n* tiny mdadm raid 1 setup for the system; let’s say /dev/sda1 and /dev/sdb1\r\n* then you still have:\r\n\t* /dev/sda2\r\n\t* /dev/sdb2\r\n\r\nThey can both host journals, and you usually want to manage them with lvm, this is easier than managing partition."},"comment":{"url":"https://api.github.com/repos/ceph/ceph-ansible/issues/comments/121011180","html_url":"https://github.com/ceph/ceph-ansible/issues/9#issuecomment-121011180","issue_url":"https://api.github.com/repos/ceph/ceph-ansible/issues/9","id":121011180,"user":{"login":"alsotoes","id":758022,"avatar_url":"https://avatars.githubusercontent.com/u/758022?v=3","gravatar_id":"","url":"https://api.github.com/users/alsotoes","html_url":"https://github.com/alsotoes","followers_url":"https://api.github.com/users/alsotoes/followers","following_url":"https://api.github.com/users/alsotoes/following{/other_user}","gists_url":"https://api.github.com/users/alsotoes/gists{/gist_id}","starred_url":"https://api.github.com/users/alsotoes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alsotoes/subscriptions","organizations_url":"https://api.github.com/users/alsotoes/orgs","repos_url":"https://api.github.com/users/alsotoes/repos","events_url":"https://api.github.com/users/alsotoes/events{/privacy}","received_events_url":"https://api.github.com/users/alsotoes/received_events","type":"User","site_admin":false},"created_at":"2015-07-13T18:14:22Z","updated_at":"2015-07-13T18:14:22Z","body":"I have to use LVM because the SCSI driver used by my PCIe flash card supports only 15 partitions, and the solution after create all using ceph-deploy osd create was this code in a for on my shell script.\r\nMy journal partitons are like:\r\n/dev/mapper/vg_journal-lv_journal1p1\r\n/dev/mapper/vg_journal-lv_journal2p1\r\netc...\r\n\r\nAnd mi osd partitions are like:\r\n/dev/sdb1\r\n/dev/sdc1\r\netc...\r\n\r\n```bash\r\n#!/bin/sh\r\n\r\nSERVER=$1\r\nPARTITIONS=\"b c d e f g h i j k l m n o p q r s t u v w\"\r\nPIVOT=\"/mnt/osd-pivot\"\r\nAUX=1 \r\n\r\nfor i in $PARTITIONS; do\r\n  \tceph-deploy --overwrite-conf osd --zap-disk create $SERVER:sd$i:/dev/mapper/vg_journal-lv_journal$AUX\r\n  \tssh ${SERVER} mkdir -p ${PIVOT}\r\n  \tssh ${SERVER} mount /dev/sd${i}1 ${PIVOT}\r\n\r\n  \tLVM_UUID=$(ssh ${SERVER} ls -l ${PIVOT}/journal | awk '{split($0,array,\" \")} END{print array[11]}' | sed  's|/dev/disk/by-partuuid/||g')\r\n  \tOSD_ID=$(ssh ${SERVER} cat ${PIVOT}/whoami)\r\n\r\n  \tssh ${SERVER} umount ${PIVOT}\r\n  \tssh ${SERVER} \"mkdir -p /var/lib/ceph/osd/ceph-${OSD_ID}\"\r\n  \tssh ${SERVER} \"rm -f /dev/disk/by-partuuid/${LVM_UUID}\"\r\n  \tssh ${SERVER} \"cd /dev/disk/by-partuuid/ ; ln -s /dev/mapper/vg_journal-lv_journal${AUX}p1 ${LVM_UUID}\"    \r\n  \tAUX=$(( $AUX + 1 ))\r\ndone\r\nssh ${SERVER} rm -rf ${PIVOT}\r\n\r\n"}}